org.eclipse.draw2d.StackLayout Java Examples
The following examples show how to use
org.eclipse.draw2d.StackLayout.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StackContainerController.java From neoscada with Eclipse Public License 1.0 | 6 votes |
public StackContainerController ( final SymbolController controller, final StackContainer element, final BasicViewElementFactory factory ) throws Exception { this.figure = new Layer (); this.figure.setOpaque ( false ); this.figure.setLayoutManager ( this.layout = new StackLayout () ); this.layout.setObserveVisibility ( true ); for ( final Primitive child : element.getChildren () ) { final Controller elementController = factory.create ( controller, child ); final IFigure childFigure = elementController.getFigure (); controller.addRawElement ( child.getName (), elementController ); this.figure.add ( childFigure ); } controller.addElement ( element, this ); }
Example #2
Source File: ChoiceEditPart.java From statecharts with Eclipse Public License 1.0 | 6 votes |
@Override protected NodeFigure createNodeFigure() { final NodeFigure figure = new NodeFigure() { @Override public PointList getPolygonPoints() { PointList points = new PointList(5); Rectangle handleBounds = getHandleBounds(); points.addPoint(handleBounds.x + (handleBounds.width / 2), handleBounds.y - 1); points.addPoint(handleBounds.x + handleBounds.width - 1, handleBounds.y + (handleBounds.height / 2)); points.addPoint(handleBounds.x + (handleBounds.width / 2), handleBounds.y + handleBounds.height); points.addPoint(handleBounds.x, handleBounds.y + handleBounds.height / 2); return points; } @Override public final Dimension getPreferredSize(int w, int h) { return getMinimumSize(); } }; figure.setLayoutManager(new StackLayout()); figure.add(createPrimaryShape()); figure.setBackgroundColor(org.eclipse.draw2d.ColorConstants.white); figure.setForegroundColor(org.eclipse.draw2d.ColorConstants.black); figure.setMinimumSize(getDefaultSize()); return figure; }
Example #3
Source File: IntermediateCatchTimerEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #4
Source File: BoundaryMessageEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #5
Source File: XORGateway2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #6
Source File: EndMessageEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #7
Source File: IntermediateCatchSignalEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #8
Source File: EndMessageEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #9
Source File: SendTask2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createNodeFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #10
Source File: NonInterruptingBoundaryTimerEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #11
Source File: BoundarySignalEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #12
Source File: ANDGatewayEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #13
Source File: EndTerminatedEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #14
Source File: ReceiveTask2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #15
Source File: LaneEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createNodeFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #16
Source File: SendTaskEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createNodeFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #17
Source File: IntermediateErrorCatchEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #18
Source File: IntermediateCatchMessageEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #19
Source File: StartErrorEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #20
Source File: IntermediateThrowSignalEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #21
Source File: BoundarySignalEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #22
Source File: IntermediateThrowSignalEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #23
Source File: IntermediateErrorCatchEvent6EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #24
Source File: EndEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #25
Source File: TextAnnotation2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createNodeFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #26
Source File: SubprocessCollapseHandle.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates a new Compartment Collapse Handle * * @param owner */ public SubprocessCollapseHandle(IGraphicalEditPart owner) { setOwner(owner); zoomManager = ((DiagramRootEditPart) owner.getRoot()).getZoomManager(); setLocator(new CollapseHandleLocator()); setCursor(Cursors.HAND); plus = FiguresHelper.getDecoratorFigure(FiguresHelper.SUBPROCESS_DECORATOR_EXPAND) ; minus = FiguresHelper.getDecoratorFigure(FiguresHelper.SUBPROCESS_DECORATOR_COLLAPSE) ; setLayoutManager(new StackLayout()); zoomManager.addZoomListener(this) ; setSize(plus.getSize().scale(zoomManager.getZoom())); View view = owner.getNotationView(); if (view != null) { DrawerStyle style = (DrawerStyle) view.getStyle(NotationPackage.eINSTANCE.getDrawerStyle()); if (style != null) { if(style.isCollapsed()){ add(plus) ; }else{ add(minus) ; } for(Object child : getChildren()){ if(child instanceof DecoratorSVGFigure){ final IGraphicalEditPart parentEditpart = (IGraphicalEditPart)getOwner().getParent(); ((DecoratorSVGFigure) child).setColor(ColorRegistry.getInstance().getColor((Integer) parentEditpart.getStructuralFeatureValue(NotationPackage.eINSTANCE.getLineStyle_LineColor())) ,ColorRegistry.getInstance().getColor((Integer) parentEditpart.getStructuralFeatureValue(NotationPackage.eINSTANCE.getFillStyle_FillColor()))); } } return; } } }
Example #27
Source File: CustomMainPaletteViewer.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
protected void createDefaultRoot() { setRootEditPart(new SimpleRootEditPart(){ @Override protected IFigure createFigure() { Figure figure = new Figure(); figure.setLayoutManager(new StackLayout()); return figure; } }); }
Example #28
Source File: CellFigure.java From ice with Eclipse Public License 1.0 | 5 votes |
/** * The default constructor for a CellFigure. */ public CellFigure() { // Set the default layout to a StackLayout. this.setLayoutManager(new StackLayout()); return; }
Example #29
Source File: EndSignalEventEditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }
Example #30
Source File: StartMessageEvent2EditPart.java From bonita-studio with GNU General Public License v2.0 | 5 votes |
/** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected NodeFigure createMainFigure() { NodeFigure figure = createNodePlate(); figure.setLayoutManager(new StackLayout()); IFigure shape = createNodeShape(); figure.add(shape); contentPane = setupContentPane(shape); return figure; }