protected IFigure createFigure() { Figure figure = new Figure(); ToolbarLayout layout = new ToolbarLayout(isHorizontal); if (minorAlignment != -1) { layout.setMinorAlignment(minorAlignment); } layout.setStretchMinorAxis(false); layout.setSpacing(spacing); figure.setLayoutManager(layout); return figure; }
protected Dimension calculatePreferredSize(IFigure parent, int width, int height) { Dimension d = super.calculatePreferredSize(parent, width, height); d.union(new Dimension(250, theMinHeight)); return d; } };
protected IFigure createFigure() { panel = new Panel(); ToolbarLayout layout = new ToolbarLayout(true); layout.setStretchMinorAxis(false); layout.setSpacing(100); panel.setLayoutManager(layout); return panel; }
public ElementMenuBar(ElementEditPart hostPart) { hostPart.getViewer().addSelectionChangedListener(this); _hostPart = hostPart; ToolbarLayout layout = new ToolbarLayout(false); layout.setSpacing(4); setLayoutManager(layout); }
outerPane.setBorder(new RoundedLineBorder(1, 6)); ToolbarLayout layout = new ToolbarLayout(false); layout.setVertical(true); layout.setStretchMinorAxis(true); FillLayout fillLayout = new FillLayout(3); fillLayout.setHorizontal(false); ToolbarLayout lineLayout = new ToolbarLayout(false); lineLayout.setVertical(true); lineLayout.setStretchMinorAxis(true); line.setLayoutManager(lineLayout); outerPane.add(line); ToolbarLayout toolbarLayout = new ToolbarLayout(false); toolbarLayout.setSpacing(3);
public ICompartmentFigure createCompartmentFigure(Object model) { CompartmentFigure figure = new CompartmentFigure(); figure.setBorder(new MarginBorder(1)); ToolbarLayout toolbarLayout = new ToolbarLayout(false); toolbarLayout.setStretchMinorAxis(true); figure.setLayoutManager(toolbarLayout); return figure; }
protected IFigure createFigure() { outer = new Figure(); outer.setBorder(new LineBorder(1)); FillLayout fillLayout = new FillLayout(4); outer.setLayoutManager(fillLayout); headingFigure = new HeadingFigure(); outer.add(headingFigure); RectangleFigure line = new RectangleFigure() { public Dimension getPreferredSize(int wHint, int hHint) { Dimension d = super.getPreferredSize(wHint, hHint); d.height = 1; return d; } }; ToolbarLayout lineLayout = new ToolbarLayout(false); lineLayout.setVertical(true); lineLayout.setStretchMinorAxis(true); line.setLayoutManager(lineLayout); outer.add(line); contentFigure = new Figure(); contentFigure.setBorder(new MarginBorder(4)); fillLayout = new FillLayout(4); contentFigure.setLayoutManager(fillLayout); outer.add(contentFigure); return outer; }
protected IFigure createFigure() { Figure fig = new Figure(); fig.setLayoutManager(new ToolbarLayout()); return fig; }
public HeadingFigure() { label = new Label(); label.setBorder(new MarginBorder(2)); ToolbarLayout toolbarLayout = new ToolbarLayout(false); toolbarLayout.setMinorAlignment(ToolbarLayout.ALIGN_CENTER); setLayoutManager(toolbarLayout); add(label); }
public void setSpacing(int spacing) { this.spacing = spacing; if (figure != null) { ((ToolbarLayout)figure.getLayoutManager()).setSpacing(spacing); } }
protected IFigure createFigure() { Figure figure = new Figure(); ToolbarLayout tb = new ToolbarLayout(true); tb.setStretchMinorAxis(false); tb.setSpacing(3); figure.setLayoutManager(tb); backToSchema = new ADTToolbarButton(XSDEditorPlugin.getPlugin().getIcon("elcl16/schemaview_co.gif")); backToSchema.setToolTipText(Messages._UI_HOVER_BACK_TO_SCHEMA); backToSchema.setBackgroundColor(ColorConstants.white); // backToSchema.setBounds(new Rectangle(0, 0, 24, 24)); figure.add(backToSchema); figure.setBounds(new Rectangle(0,0,24,24)); addToToolbar(figure); return figure; }
protected IFigure createFigure() { figure = new StructureFigure(); figure.setBorder(new RoundedLineBorder(1, 10)); ToolbarLayout toolbarLayout = new ToolbarLayout(); toolbarLayout.setStretchMinorAxis(true); figure.setLayoutManager(toolbarLayout); return figure; }
contentPaneWrap.setBorder(new ContentBorder()); Figure contentPane = new Figure(); ToolbarLayout contentLayout = new ToolbarLayout(false); contentLayout.setSpacing(5); contentPane.setLayoutManager(contentLayout); contentPane.setBorder(new MarginBorder(2, 5, 2, 2));
ToolbarLayout outerLayout = new ToolbarLayout(false) outerLayout.setStretchMinorAxis(true); outerPane.setLayoutManager(outerLayout); ToolbarLayout lineLayout = new ToolbarLayout(false); lineLayout.setVertical(true); lineLayout.setStretchMinorAxis(true); line.setLayoutManager(lineLayout); outerPane.add(line);
protected IFigure createFigure() { Figure fig = new Figure(); fig.setLayoutManager(new ToolbarLayout()); return fig; }
protected IFigure createFigure() { Panel panel = new Panel(); panel.setBorder(new MarginBorder(60)); ToolbarLayout panelLayout = new ToolbarLayout(false); panelLayout.setStretchMinorAxis(true); panel.setLayoutManager(panelLayout); contentPane = new Figure(); panel.add(contentPane); ToolbarLayout tb = new ToolbarLayout(false); tb.setMinorAlignment(ToolbarLayout.ALIGN_CENTER); tb.setStretchMinorAxis(true); tb.setSpacing(40); contentPane.setLayoutManager(tb); return panel; }
public IStructureFigure createStructureFigure(Object model) { StructureFigure figure = new StructureFigure(); figure.setBorder(new LineBorder(1)); ToolbarLayout toolbarLayout = new ToolbarLayout(); toolbarLayout.setStretchMinorAxis(true); figure.setLayoutManager(toolbarLayout); if (model instanceof ITreeElement) { figure.getNameLabel().setIcon(((ITreeElement)model).getImage()); } //figure.getHeadingFigure().setIsReadOnly(getComplexType().isReadOnly()); // we should organize ITreeElement and integrate it with the facade return figure; }
contentPane.setLayoutManager(new ToolbarLayout()); add(contentPane); headingFigure.setForegroundColor(ColorConstants.black);
protected IFigure createFigure() { BoxFigure figure = new BoxFigure(); LineBorder boxLineBorder = new LineBorder(1); figure.setBorder(boxLineBorder); ToolbarLayout toolbarLayout = new ToolbarLayout(); toolbarLayout.setStretchMinorAxis(true); figure.setLayoutManager(toolbarLayout); // we should organize ITreeElement and integrate it with the facade if (getModel() instanceof ITreeElement) { figure.getNameLabel().setIcon(((ITreeElement)getModel()).getImage()); } return figure; }
protected IFigure createFigure() { Figure typeGroup = new Figure(); typeGroup.setLayoutManager(new ToolbarLayout()); labelHolder = new Figure(); FillLayout fillLayout = new FillLayout(); labelHolder.setLayoutManager(fillLayout); typeGroup.add(labelHolder); label = new HyperLinkLabel(); label.setOpaque(true); label.setBorder(new MarginBorder(0, 2, 2, 1)); label.setForegroundColor(ColorConstants.black); labelHolder.add(label); return typeGroup; }