org.eclipse.draw2d.Ellipse Java Examples
The following examples show how to use
org.eclipse.draw2d.Ellipse.
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: FinalStateFigure.java From statecharts with Eclipse Public License 1.0 | 6 votes |
protected void createContents() { int size = mapMode.DPtoLP(2); this.setBorder(new MarginBorder(size, size, size, size)); Ellipse whiteCircle = new Ellipse(); whiteCircle.setOutline(false); whiteCircle.setLineWidth(1); whiteCircle.setBackgroundColor(ColorConstants.white); size = mapMode.DPtoLP(3); whiteCircle.setBorder(new MarginBorder(size, size, size, size)); BorderLayout layout = new BorderLayout(); whiteCircle.setLayoutManager(layout); Object data = BorderLayout.CENTER; this.add(whiteCircle, data); Ellipse blackCircle = new Ellipse(); blackCircle.setOutline(false); blackCircle.setLineWidth(mapMode.DPtoLP(1)); blackCircle.setBackgroundColor(ColorConstants.black); data = BorderLayout.CENTER; whiteCircle.add(blackCircle, data); }
Example #2
Source File: EllipseController.java From neoscada with Eclipse Public License 1.0 | 5 votes |
public EllipseController ( final SymbolController controller, final org.eclipse.scada.vi.model.Ellipse element, final ResourceManager manager ) { super ( controller, manager ); final PrecisionRectangle rect = new PrecisionRectangle (); if ( element.getSize () != null ) { rect.setPreciseSize ( element.getSize ().getWidth (), element.getSize ().getHeight () ); } this.figure = new Ellipse () { @Override public void addNotify () { super.addNotify (); start (); } @Override public void removeNotify () { stop (); super.removeNotify (); } }; this.figure.setBounds ( rect ); controller.addElement ( element, this ); applyCommon ( element ); }
Example #3
Source File: EntryEditPart.java From statecharts with Eclipse Public License 1.0 | 5 votes |
protected Ellipse createPrimaryShape() { switch (resolveSemanticElement().getKind()) { case DEEP_HISTORY: return new DeepHistoryFigure(); case SHALLOW_HISTORY: return new ShallowHistoryFigure(); case INITIAL: return new InitialStateFigure(); } throw new IllegalStateException(); }
Example #4
Source File: FinalStateEditPart.java From statecharts with Eclipse Public License 1.0 | 4 votes |
@Override public Ellipse createPrimaryShape() { return new FinalStateFigure(getMapMode()); }