@Override protected IFigure createMain () { final Figure rootFigure = new Figure (); rootFigure.setLayoutManager ( new GridLayout ( 3, true ) ); rootFigure.add ( makeHeader (), new GridData ( GridData.BEGINNING, GridData.CENTER, true, false, 3, 1 ) ); rootFigure.add ( createSourceValue (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) ); rootFigure.add ( new Figure () ); rootFigure.add ( createTargetValue (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) ); rootFigure.add ( new Figure () ); rootFigure.add ( createCommandPanel (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) ); createRoundArrow ( rootFigure ); return rootFigure; }
public GridContainerController ( final SymbolController controller, final GridContainer element, final BasicViewElementFactory factory ) throws Exception { this.figure = new Figure (); final GridLayout gridLayout = new GridLayout ( element.getColumns (), element.isEqualWidth () ); gridLayout.horizontalSpacing = element.getHorizontalSpacing (); gridLayout.verticalSpacing = element.getVerticalSpacing (); gridLayout.marginHeight = element.getMarginHeight (); gridLayout.marginWidth = element.getMarginWidth (); this.figure.setLayoutManager ( gridLayout ); for ( final GridChild child : element.getChildren () ) { final Controller elementController = factory.create ( controller, child.getElement () ); final IFigure childFigure = elementController.getFigure (); this.figure.add ( childFigure, convert ( child ) ); } controller.addElement ( element, this ); }
public ColumnFigure() { ToolbarLayout layout = new ToolbarLayout(); setLayoutManager(layout); layout.setSpacing(2); layout.setStretchMinorAxis(false); layout.setMinorAlignment(OrderedLayout.ALIGN_TOPLEFT); setOpaque(true); setBorder(new ColumnFigureBorder()); GridLayout gridLayout = new GridLayout(6, false); gridLayout.marginHeight = 3; gridLayout.marginWidth = 5; gridLayout.horizontalSpacing = 5; dataFigure.setLayoutManager(gridLayout); dataFigure.add(pkFigure); dataFigure.add(fkFigure); dataFigure.add(firstLabel); dataFigure.add(lastLabel); dataFigure.add(notNullFigure); dataFigure.add(uniqueFigure); add(dataFigure); }
public ReferenceFigure(IReferenceModel model) { super(model, false); GridLayout layout = new GridLayout(2, false); layout.marginHeight = 0; layout.marginWidth = 0; layout.horizontalSpacing = 3; layout.verticalSpacing = 0; setLayoutManager(layout); label = new Label(model.getName()); label.setForegroundColor(ColorConstants.black); FontManager.setFont(label, PandionJConstants.VAR_FONT_SIZE); String tooltip = Utils.getTooltip(model); Collection<String> tags = model.getTags(); if(!tags.isEmpty()) tooltip += "\ntags: " + String.join(", ", tags); label.setToolTip(new Label(tooltip)); add(label); refLabel = new ReferenceLabel(model); add(refLabel); layout.setConstraint(refLabel, new GridData(PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH)); }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if(isValid(umlModel)){ componentFigure = new ComponentFigure(false); } else { componentFigure = new ComponentFigure(); } componentFigure.setSize(notationNode.getWidth(), notationNode.getHeight()); componentFigure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; componentFigure.setLayoutManager(gridLayout); return componentFigure; }
/** * * 이름,스테레오타입을 위한 컴파트먼트 피겨를 생성 * * @param labelNode * @return IFigure */ private IFigure createCompartmentFigure(LabelNode labelNode) { AbstractView parent = (AbstractView) labelNode.getParent(); CompartmentLabelFigure figure = new CompartmentLabelFigure(); if (parent instanceof AbstractNode) { // 라벨 뷰모델에 저장되어 있는 위치 값은 부모 노드의 위치와의 차이값이다. 라벨 자체의 위치 값이 저장된 것이 아님. figure.setLocation(new Point(parent.getX() + labelNode.getX(), parent.getY() + labelNode.getY())); figure.setSize(DiagramUtil.getWidthSize(((NamedElement) parent.getUmlModel()).getName(), UiCorePlugin.getDefault().getFont("default")), 0); figure.setOpaque(false); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; figure.setLayoutManager(gridLayout); return figure; } else { Point centerPoint = getCenterPoint(labelNode); figure.setLocation(new Point(centerPoint.x + labelNode.getX(), centerPoint.y + labelNode.getY())); return figure; } }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if (umlModel != null && isValid(umlModel)) { classFigure = new ClassFigure(false); } else { classFigure = new ClassFigure(); } classFigure.setSize(notationNode.getWidth(), notationNode.getHeight()); classFigure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; classFigure.setLayoutManager(gridLayout); return classFigure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if(isValid(umlModel)){ interfaceFigure = new InterfaceFigure(false); } else { interfaceFigure = new InterfaceFigure(); } interfaceFigure.setSize(notationNode.getWidth(), notationNode.getHeight()); interfaceFigure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; interfaceFigure.setLayoutManager(gridLayout); return interfaceFigure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if(isValid(umlModel)){ figure = new ArtifactFigure(false); } else { figure = new ArtifactFigure(); } figure.setLocation(new Point(notationNode.getX(), notationNode.getY())); figure.setSize(notationNode.getWidth(), notationNode.getHeight()); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; figure.setLayoutManager(gridLayout); return figure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if(isValid(umlModel)){ dataTypeFigure = new DataTypeFigure(false); } else { dataTypeFigure = new DataTypeFigure(); } dataTypeFigure.setLocation(new Point(notationNode.getX(), notationNode.getY())); dataTypeFigure.setSize(notationNode.getWidth(), notationNode.getHeight()); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; dataTypeFigure.setLayoutManager(gridLayout); return dataTypeFigure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if(isValid(umlModel)){ EnumerationFigure = new EnumerationFigure(false); } else { EnumerationFigure = new EnumerationFigure(); } EnumerationFigure.setName(notationNode.getName()); EnumerationFigure.setSize(notationNode.getWidth(), notationNode.getHeight()); EnumerationFigure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; EnumerationFigure.setLayoutManager(gridLayout); return EnumerationFigure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); EObject umlModel = notationNode.getUmlModel(); if(isValid(umlModel)){ figure = new ActorFigure(false); } else { figure = new ActorFigure(); } GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; figure.setLayoutManager(gridLayout); figure.setSize(notationNode.getWidth(), notationNode.getHeight()); figure.setLocation(new Point(notationNode.getX(), notationNode.getY())); return figure; }
@Override protected IFigure createFigure() { RectangleFigure figure = new RectangleFigure(); figure.setBackgroundColor(BACKGROUND_COLOR); Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY); Border figureBorder = new LineBorder(borderCol, 2); figure.setBorder(figureBorder); figure.setOutline(false); GridLayout layoutManager = new GridLayout(); // zero margin, in order to connect the dependent axes to the shared one layoutManager.marginHeight = 0; layoutManager.marginWidth = 0; figure.setLayoutManager(layoutManager); datasetsPane = new RectangleFigure(); datasetsPane.setOutline(false); final SimpleLoweredBorder datasetBorder = new SimpleLoweredBorder(3); datasetsPane.setBorder(datasetBorder); GridLayout datasetsPaneLayout = new GridLayout(); datasetsPane.setLayoutManager(datasetsPaneLayout); figure.add(datasetsPane); arrowFigure = new ArrowFigure(false); figure.add(arrowFigure); axisNameLabel = new AxisNameFigure(this); figure.add(axisNameLabel); return figure; }
@Override protected void refreshVisuals() { final ChartEditPart.ChartPanePosition pos = (ChartPanePosition) getModel(); final IFigure figure = getFigure(); ChartSet chartSet = ((Chart)getParent().getModel()).getParent(); boolean vertical = chartSet.getOrientation() == Orientation.VERTICAL; if (pos == ChartPanePosition.MIN) { ((GraphicalEditPart) getParent()).setLayoutConstraint(this, figure, vertical ? BorderLayout.LEFT : BorderLayout.BOTTOM); } else { ((GraphicalEditPart) getParent()).setLayoutConstraint(this, figure, vertical ? BorderLayout.RIGHT : BorderLayout.TOP); } ((GridLayout) getFigure().getLayoutManager()).numColumns = vertical ? getModelChildren().size() : 1; }
@Override protected IFigure createFigure() { final RectangleFigure figure = new RectangleFigure(); figure.setOutline(false); final Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY); final Border figureBorder = new LineBorder(borderCol, 2); figure.setBorder(figureBorder); figure.setLayoutManager(new GridLayout()); nameLabel = new DirectionalLabel(Activator.FONT_8); final ChartPaneEditPart.AxisLandingPad pad = (ChartPaneEditPart.AxisLandingPad) getModel(); nameLabel.setText(pad.pos == ChartPanePosition.MIN ? "Min Axis" : "Max Axis"); figure.add(nameLabel); figure.getLayoutManager().setConstraint(nameLabel, new GridData( GridData.FILL, GridData.FILL, true, true)); return figure; }
@Override protected IFigure createFigure() { RectangleFigure rectangle = new RectangleFigure(); rectangle.setOutline(false); GridLayout gridLayout = new GridLayout(); gridLayout.marginHeight = 0; gridLayout.marginWidth = 0; rectangle.setLayoutManager(gridLayout); arrowFigure = new ArrowFigure(true); rectangle.add(arrowFigure); // and the text label axisNameLabel = new DirectionalIconLabel(StackedchartsImages.getImage( StackedchartsImages.DESC_AXIS)); axisNameLabel.getLabel().setTextAlignment(PositionConstants.TOP); rectangle.add(axisNameLabel); return rectangle; }
@Override protected void refreshVisuals() { GridData gridData = new GridData(); gridData.grabExcessHorizontalSpace = true; gridData.grabExcessVerticalSpace = true; gridData.horizontalAlignment = SWT.FILL; gridData.verticalAlignment = SWT.FILL; GraphicalEditPart parent = (GraphicalEditPart) getParent(); parent.setLayoutConstraint(this, figure, gridData); GridLayout layoutManager = (GridLayout) getFigure().getLayoutManager(); layoutManager.numColumns = ((ChartSet) parent.getModel()).getOrientation() == Orientation.HORIZONTAL ? getModelChildren().size() : 1; layoutManager.invalidate(); }
private void createHeader() { Figure top = new Figure(); GridLayout topLayout = new GridLayout(3, false); topLayout.horizontalSpacing = 0; topLayout.verticalSpacing = 0; topLayout.marginHeight = 0; topLayout.marginWidth = 0; top.setLayoutManager(topLayout); leftExpander = new ProcessExpander(node, Side.INPUT); rightExpander = new ProcessExpander(node, Side.OUTPUT); top.add(leftExpander, new GridData(SWT.LEFT, SWT.CENTER, false, false)); top.add(new Label(node.getName()), new GridData(SWT.FILL, SWT.FILL, true, false)); top.add(rightExpander, new GridData(SWT.RIGHT, SWT.CENTER, false, false)); add(top, new GridData(SWT.FILL, SWT.FILL, true, false)); GridData dummyGridData = new GridData(SWT.FILL, SWT.FILL, true, false); dummyGridData.heightHint = TEXT_HEIGHT + 3 * MARGIN_HEIGHT; add(new Figure(), dummyGridData); }
/** * @generated */ public TransformationSetExtensionFigure() { GridLayout layoutThis = new GridLayout(); layoutThis.numColumns = 1; layoutThis.makeColumnsEqualWidth = true; layoutThis.horizontalSpacing = 0; layoutThis.verticalSpacing = 0; layoutThis.marginWidth = 0; layoutThis.marginHeight = 0; this.setLayoutManager(layoutThis); this.setForegroundColor(ColorConstants.black); this.setBackgroundColor(THIS_BACK); this.setPreferredSize(new Dimension(getMapMode().DPtoLP(300), getMapMode().DPtoLP(300))); createContents(); }
/** * @generated */ public TransformationSetFigure() { GridLayout layoutThis = new GridLayout(); layoutThis.numColumns = 1; layoutThis.makeColumnsEqualWidth = true; layoutThis.horizontalSpacing = 0; layoutThis.verticalSpacing = 0; layoutThis.marginWidth = 0; layoutThis.marginHeight = 0; this.setLayoutManager(layoutThis); this.setForegroundColor(ColorConstants.black); this.setBackgroundColor(THIS_BACK); this.setPreferredSize(new Dimension(getMapMode().DPtoLP(300), getMapMode().DPtoLP(300))); createContents(); }
private IFigure createEntryGrid ( final Figure connLayer ) { final Figure figure = new Figure (); figure.setLayoutManager ( new GridLayout ( 1, false ) ); figure.add ( this.presetCeil = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ figure.add ( this.presetHH = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ figure.add ( this.presetH = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ figure.add ( this.currentLabel = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ figure.add ( this.presetL = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ figure.add ( this.presetLL = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ figure.add ( this.presetFloor = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$ createConnection ( connLayer, this.presetCeil, this.rectCeil ); createConnection ( connLayer, this.presetHH, this.triHH ); createConnection ( connLayer, this.presetH, this.triH ); createConnection ( connLayer, this.presetL, this.triL ); createConnection ( connLayer, this.presetLL, this.triLL ); createConnection ( connLayer, this.presetFloor, this.rectFloor ); this.blinkerCeil = new LevelBlinker ( this.rectCeil ); this.blinkerHH = new LevelBlinker ( this.triHH ); this.blinkerH = new LevelBlinker ( this.triH ); this.blinkerL = new LevelBlinker ( this.triL ); this.blinkerLL = new LevelBlinker ( this.triLL ); this.blinkerFloor = new LevelBlinker ( this.rectFloor ); this.stylerCeil = new StateStyler ( this.blinkerCeil ); this.stylerHH = new StateStyler ( this.blinkerHH ); this.stylerH = new StateStyler ( this.blinkerH ); this.stylerL = new StateStyler ( this.blinkerL ); this.stylerLL = new StateStyler ( this.blinkerLL ); this.stylerFloor = new StateStyler ( this.blinkerFloor ); return figure; }
private void addMethods(IObjectModel model) { methodsFig = new Figure(); methodsFig.setLayoutManager(new GridLayout(1, false)); for(IMethod m : model.getVisibleMethods()) { MethodWidget w = new MethodWidget(m); methodWidgets.add(w); methodsFig.add(w); } fig.add(methodsFig); RuntimeViewer.getInstance().updateLayout(); }
private RoundedRectangle createPositionsFig() { RoundedRectangle fig = new RoundedRectangle(); fig.setOpaque(false); fig.setCornerDimensions(PandionJConstants.OBJECT_CORNER); fig.setBackgroundColor(PandionJConstants.Colors.OBJECT); GridLayout layout = new GridLayout(horizontal ? (model.getLength() > PandionJView.getMaxArrayLength() ? N + 1 : Math.max(1, N)) : 1, false); layout.verticalSpacing = 0; layout.horizontalSpacing = PandionJConstants.ARRAY_POSITION_SPACING; layout.marginWidth = PandionJConstants.ARRAY_MARGIN; layout.marginHeight = PandionJConstants.ARRAY_MARGIN; fig.setLayoutManager(layout); fig.setToolTip(new Label("length = " + model.getLength())); if(N == 0) { Label empty = new Label(""); GridData layoutData = new GridData(POSITION_WIDTH/2, POSITION_WIDTH); layout.setConstraint(empty, layoutData); fig.add(empty); } else { Iterator<Integer> it = model.getValidModelIndexes(); while(it.hasNext()) { Integer i = it.next(); if(!it.hasNext() && model.getLength() > PandionJView.getMaxArrayLength()) { Position emptyPosition = new Position(null); fig.add(emptyPosition); } Position p = new Position(i); fig.add(p); positions.add(p); } } return fig; }
public Position(Integer index) { GridLayout layout = new GridLayout(horizontal ? 1 : 2, false); if(horizontal){ layout.verticalSpacing = 0; layout.horizontalSpacing = 0; layout.marginHeight = 0; } else{ layout.verticalSpacing = 6; layout.horizontalSpacing = 3; layout.marginHeight = 4; } layout.marginWidth = 0; setLayoutManager(layout); if(index != null){ valueLabel = createValueLabel(model.getElementModel(index)); }else{ valueLabel = new ValueLabel("...", false); } layout.setConstraint(valueLabel, createValueLabelGridData(index == null)); add(valueLabel); indexLabel = new ValueLabel(indexText(index), true); layout.setConstraint(indexLabel, createIndexLabelGridData()); add(indexLabel, horizontal ? 1 : 0); }
public Extension(IFigure innerFigure, IObservableModel<?> model) { super(model, true); this.innerFigure = innerFigure; GridLayout layout = new GridLayout(); layout.marginWidth = OBJECT_PADDING; layout.marginHeight = OBJECT_PADDING; setLayoutManager(layout); add(innerFigure); }
public ValueExtensionFigure(IValueModel model, IFigure figure) { super(model, false); layout = new GridLayout(1, false); layout.verticalSpacing = 0; layout.horizontalSpacing = 0; layout.marginHeight = 0; layout.marginWidth = 0; setLayoutManager(layout); Figure comp = new Figure(); GridLayout compLayout = new GridLayout(2,false); compLayout.marginHeight = 0; compLayout.marginWidth = 0; compLayout.horizontalSpacing = 3; compLayout.verticalSpacing = 0; comp.setLayoutManager(compLayout); String tooltip = Utils.getTooltip(model); Label nameLabel = new Label(model.getName()); nameLabel.setForegroundColor(ColorConstants.black); FontManager.setFont(nameLabel, PandionJConstants.VAR_FONT_SIZE); nameLabel.setToolTip(new Label(tooltip)); comp.add(nameLabel); comp.add(figure); add(comp); layout.setConstraint(comp, new GridData(SWT.RIGHT, SWT.DEFAULT, true, false)); }
static GridLayout getOneColGridLayout() { GridLayout layout = new GridLayout(1, false); layout.horizontalSpacing = 0; layout.verticalSpacing = 0; layout.marginHeight = 0; layout.marginWidth = 0; return layout; }
public ArrayPrimitiveFigure(IArrayModel<IValueModel> model) { super(model); this.model = model; model.registerDisplayObserver((o, indexes) -> observerAction(o, indexes)); N = Math.min(model.getLength(), Constants.ARRAY_LENGTH_LIMIT); // limit size positions = new ArrayList<>(N); setBackgroundColor(Constants.Colors.OBJECT); outerLayout = new GridLayout(3, false); setLayoutManager(outerLayout); leftBound = new PositionOutBounds(); rightBound = new PositionOutBounds(); positionsFig = createPositionsFig(); GridData boundConstraints = new GridData(SWT.CENTER, SWT.TOP, false, false); add(leftBound, boundConstraints); add(positionsFig); add(rightBound, boundConstraints); vars = new HashMap<>(); // for(IArrayIndexModel v : model.getIndexModels()) // addVariable(v); updateOutOfBoundsPositions(); setSize(getPreferredSize()); }
public Position(Integer index) { int width = POSITION_WIDTH; if(model.isDecimal()) width *= 2; GridData layoutData = new GridData(width, POSITION_WIDTH+20); arrayLayout.setConstraint(this, layoutData); GridLayout layout = Constants.getOneColGridLayout(); setLayoutManager(layout); if(index != null) { IValueModel m = model.getElementModel(index); valueLabel = new ValueLabel(m); layout.setConstraint(valueLabel, new GridData(width, POSITION_WIDTH)); add(valueLabel); }else { Label emptyLabel = new Label("..."); FontManager.setFont(this, Constants.VALUE_FONT_SIZE); IValueModel measure = model.getElementModel(model.getLength() - 1); setSize(measure.isDecimal() || measure.isBoolean() ? Constants.POSITION_WIDTH*2 : Constants.POSITION_WIDTH, Constants.POSITION_WIDTH); layout.setConstraint(emptyLabel, new GridData(width, POSITION_WIDTH)); add(emptyLabel); } indexLabel = new Label(index == null ? "..." : Integer.toString(index)); FontManager.setFont(indexLabel, INDEX_FONT_SIZE); indexLabel.setLabelAlignment(SWT.CENTER); indexLabel.setForegroundColor(ColorConstants.gray); layout.setConstraint(indexLabel, layoutCenter); add(indexLabel); }
ColorFigure() { setLayoutManager(new GridLayout(2, false)); colorFig = new Figure(); colorFig.setSize(PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH); add(colorFig); text = new Label(); text.setForegroundColor(ColorConstants.black); add(text); }
/** * LabeledRoundedRectangle */ public LabeledRoundedRectangle() { GridLayout layout = new GridLayout(1, false); setLayoutManager(layout); nameLabel = new Label(); stereoTypeLabel = new Label(); // nameLabel.setBorder(new LineBorder(ColorConstants.black)); // stereoTypeLabel.setBorder(new LineBorder(ColorConstants.black)); add(stereoTypeLabel); add(nameLabel); }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); CentralBufferFigure figure = new CentralBufferFigure(); figure.setSize(notationNode.getWidth(), notationNode.getHeight()); figure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; figure.setLayoutManager(gridLayout); return figure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); DataStoreNodeFigure figure = new DataStoreNodeFigure(); figure.setSize(notationNode.getWidth(), notationNode.getHeight()); figure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; figure.setLayoutManager(gridLayout); return figure; }
/** * @see org.eclipse.gef.editparts.AbstractGraphicalEditPart#createFigure() */ @Override protected IFigure createFigure() { NotationNode notationNode = (NotationNode) getModel(); OpaqueActionFigure figure = new OpaqueActionFigure(notationNode.getName()); figure.setSize(notationNode.getWidth(), notationNode.getHeight()); figure.setLocation(new Point(notationNode.getX(), notationNode.getY())); GridLayout gridLayout = new GridLayout(); gridLayout.verticalSpacing = 0; gridLayout.numColumns = 1; figure.setLayoutManager(gridLayout); return figure; }
@Override protected IFigure createFigure() { ResizableCompartmentFigure figure = (ResizableCompartmentFigure) super.createFigure(); GridLayout gridLayout = new GridLayout(1, true); gridLayout.marginHeight = 0; gridLayout.marginWidth = 0; figure.getContentPane().setLayoutManager(gridLayout); figure.setBorder(null); figure.setToolTip((String) null); return figure; }
public RegionFigure(IMapMode mapMode) { this.mapMode = mapMode; GridLayout layoutThis = new GridLayout(1, false); layoutThis.verticalSpacing = 2; this.setLayoutManager(layoutThis); this.setLineWidth(mapMode.DPtoLP(1)); createContents(); }
public StateFigure(IMapMode mapMode) { GridLayout layout = new GridLayout(1, false); layout.verticalSpacing = 0; layout.horizontalSpacing = 0; layout.marginHeight = 3; layout.marginWidth = 3; this.setLayoutManager(layout); this.setCornerDimensions(new Dimension(mapMode.DPtoLP(15), mapMode .DPtoLP(15))); this.setOutline(true); createContents(); }
public StatechartTextFigure(IMapMode mapMode) { GridLayout layout = new GridLayout(1, false); layout.verticalSpacing = 2; this.setLayoutManager(layout); this.setOutline(true); createContents(); }
protected void setupChartSize(JRDesignChart jdc, GridLayout lm, ChartFigure cf) { jdc.setX(0); jdc.setY(0); jdc.setWidth(300); jdc.setHeight(180); jdc.setTheme(""); setupSize(jdc, lm, cf); }
@Override protected IFigure createFigure() { RectangleFigure f = new RectangleFigure() { @Override protected void outlineShape(Graphics graphics) { } }; GridLayout lm = new GridLayout(2, true); lm.horizontalSpacing = 10; lm.verticalSpacing = 10; f.setLayoutManager(lm); f.setBounds(new Rectangle(10, 10, 600, 600)); f.setBorder(null); //Event to refresh the editor when a styles is added or removed getModel().getPropertyChangeSupport().addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { //To avoid to refresh removed elements if (getViewer() != null){ refresh(); } else { getModel().getPropertyChangeSupport().removePropertyChangeListener(this); } } }); return f; }