/** * Create selection handles in the style as predefined in DeltaEcore * @see DEGraphicalEditorTheme */ @Override protected List<Object> createSelectionHandles() { List<Object> list = new ArrayList<Object>(); MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost()); moveHandle.setDragTracker(getDragTracker()); if (isDragAllowed()) { moveHandle.setCursor(Cursors.SIZEALL); } else { moveHandle.setCursor(SharedCursors.ARROW); } // set line style to meet the predefined theme DEGraphicalEditorTheme theme = DEGraphicalEditor.getTheme(); LineBorder border = new LineBorder(); border.setColor(theme.getSelectionSecondaryColor()); border.setWidth(theme.getLineWidth()); moveHandle.setBorder(border); list.add(moveHandle); return list; }
@Override protected List<AbstractHandle> createSelectionHandles() { List<AbstractHandle> list = new ArrayList<AbstractHandle>(); MoveHandle handle = new MoveHandle((GraphicalEditPart) getHost()); handle.setBorder(new MarginBorder(5)); list.add(handle); // BandButtonPadHandle buttonPadHandle=new BandButtonPadHandle((GraphicalEditPart)getHost()); // buttonPadHandle.setBorder(null); // list.add(buttonPadHandle); // NonResizableHandleKit.addMoveHandle((GraphicalEditPart) getHost(), list); // list.add(new CellResizeHandle2((GraphicalEditPart) getHost(), PositionConstants.SOUTH)); // // if (hasNorth) // list.add(new CellResizeHandle2((GraphicalEditPart) getHost(), PositionConstants.NORTH)); return list; }
@Override public void activate() { super.activate(); moveHandle = new MoveHandle((GraphicalEditPart)getHost()) { @Override protected void paintFigure(Graphics graphics) { if (getHostFigure().isShowing()) { graphics.setBackgroundColor(getHostFigure().getBackgroundColor()); super.paintFigure(graphics); } } }; moveHandle.setOpaque(true); moveHandle.setBorder(null); getLayer(TreeTimelineDataEditPart.LAYER_DATA_ROWS_LAYER).add(moveHandle); }
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new DcaseTextSelectionEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableLabelEditPolicy() { protected List createSelectionHandles() { MoveHandle mh = new MoveHandle( (GraphicalEditPart) getHost()); mh.setBorder(null); return Collections.singletonList(mh); } }); }
/** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicy.DIRECT_EDIT_ROLE, new LabelDirectEditPolicy()); installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE, new DcaseTextSelectionEditPolicy()); installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableLabelEditPolicy() { protected List createSelectionHandles() { MoveHandle mh = new MoveHandle( (GraphicalEditPart) getHost()); mh.setBorder(null); return Collections.singletonList(mh); } }); installEditPolicy(EditPolicyRoles.OPEN_ROLE, new BasicLinkOpenEditPolicy()); }
@SuppressWarnings("unchecked") @Override protected List<Figure> createSelectionHandles() { List<Figure> list=super.createSelectionHandles(); List<IFigure> figures=this.getHostFigure().getChildren(); for(IFigure figure:figures){ if(figure instanceof Label){ list.add(new MoveHandle((GraphicalEditPart)this.getHost(),new MoveHandleLocator(figure))); } } return list; }
/** * @generated */ protected List createSelectionHandles() { MoveHandle moveHandle = new MoveHandle((GraphicalEditPart) getHost()); moveHandle.setBorder(null); moveHandle.setDragTracker(new DragEditPartsTrackerEx(getHost())); return Collections.singletonList(moveHandle); }
@Override protected List<Handle> createSelectionHandles() { List<Handle> list = new ArrayList<Handle>(); GraphicalEditPart geditPart = getHost(); list.add(new CellResizeHandle2(geditPart, PositionConstants.SOUTH)); list.add(new CellResizeHandle2(geditPart, PositionConstants.NORTH)); list.add(new CellResizeHandle2(geditPart, PositionConstants.EAST)); list.add(new CellResizeHandle2(geditPart, PositionConstants.WEST)); MoveHandle hand = new CellMoveHandle(geditPart, true, true); list.add(hand); return list; }
@Override protected List<Handle> createSelectionHandles() { List<Handle> list = new ArrayList<Handle>(); GraphicalEditPart geditPart = getHost(); list.add(new CellResizeHandle2(geditPart, PositionConstants.SOUTH)); list.add(new CellResizeHandle2(geditPart, PositionConstants.NORTH)); list.add(new CellResizeHandle2(geditPart, PositionConstants.EAST)); list.add(new CellResizeHandle2(geditPart, PositionConstants.WEST)); MoveHandle hand = new CellMoveHandle(geditPart, true, false, -3); list.add(hand); return list; }
@SuppressWarnings({ "rawtypes", "unchecked" }) @Override protected List createSelectionHandles() { List handles = super.createSelectionHandles(); List<IFigure> children = (List<IFigure>) getHostFigure().getChildren(); for (IFigure figure : children) { if (figure instanceof Label) handles.add(new MoveHandle((GraphicalEditPart) getHost(), new MoveHandleLocator(figure))); } return handles; }
/** * @generated */ @SuppressWarnings("rawtypes") protected List createSelectionHandles() { MoveHandle h = new MoveHandle((GraphicalEditPart) getHost()); h.setBorder(null); return Collections.singletonList(h); }
/** * @generated */ @SuppressWarnings("rawtypes") protected List createSelectionHandles() { MoveHandle mh = new MoveHandle((GraphicalEditPart) getHost()); mh.setBorder(null); return Collections.singletonList(mh); }