Java Code Examples for org.eclipse.draw2d.Figure#setSize()
The following examples show how to use
org.eclipse.draw2d.Figure#setSize() .
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: SimpleStyleSupport.java From ermasterr with Apache License 2.0 | 6 votes |
/** * {@inheritDoc} */ @Override public void initTitleBar(final Figure top) { final ToolbarLayout topLayout = new ToolbarLayout(); topLayout.setMinorAlignment(OrderedLayout.ALIGN_TOPLEFT); topLayout.setStretchMinorAxis(true); top.setLayoutManager(topLayout); nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20))); top.add(nameLabel); final Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(getTextColor()); separater.setOpaque(true); top.add(separater); }
Example 2
Source File: SimpleStyleSupport.java From erflute with Apache License 2.0 | 6 votes |
@Override public void initTitleBar(Figure top) { final ToolbarLayout topLayout = new ToolbarLayout(); topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT); topLayout.setStretchMinorAxis(true); top.setLayoutManager(topLayout); this.nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20))); top.add(nameLabel); final Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(getTextColor()); separater.setOpaque(true); top.add(separater); }
Example 3
Source File: SimpleStyleSupport.java From ermaster-b with Apache License 2.0 | 6 votes |
/** * {@inheritDoc} */ @Override public void initTitleBar(Figure top) { ToolbarLayout topLayout = new ToolbarLayout(); topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT); topLayout.setStretchMinorAxis(true); top.setLayoutManager(topLayout); this.nameLabel = new Label(); this.nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20))); top.add(nameLabel); Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(this.getTextColor()); separater.setOpaque(true); top.add(separater); }
Example 4
Source File: FunnyStyleSupport.java From ermasterr with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public void initTitleBar(final Figure top) { top.setLayoutManager(new BorderLayout()); final Figure title = new Figure(); top.add(title, BorderLayout.TOP); final FlowLayout titleLayout = new FlowLayout(); titleLayout.setMinorAlignment(OrderedLayout.ALIGN_CENTER); title.setLayoutManager(titleLayout); final ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2))); image.setImage(ERDiagramActivator.getImage(getTableFigure().getImageKey())); title.add(image); nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20))); title.add(nameLabel); final Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(ColorConstants.black); separater.setOpaque(true); top.add(separater, BorderLayout.BOTTOM); }
Example 5
Source File: FunnyStyleSupport.java From erflute with Apache License 2.0 | 5 votes |
@Override public void initTitleBar(Figure top) { top.setLayoutManager(new BorderLayout()); final FlowLayout layout = new FlowLayout(); layout.setStretchMinorAxis(true); final Figure title = new Figure(); top.add(title, BorderLayout.TOP); title.setLayoutManager(layout); title.setBorder(new MarginBorder(new Insets(2, 2, 2, 2))); final ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(0, 0, 0, 0))); image.setImage(Activator.getImage(getTableFigure().getImageKey())); title.add(image); this.nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(new Insets(0, 0, 0, 20))); title.add(nameLabel); final Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(ColorConstants.black); separater.setOpaque(true); top.add(separater, BorderLayout.BOTTOM); }
Example 6
Source File: DummyEditpart.java From birt with Eclipse Public License 1.0 | 5 votes |
protected IFigure createFigure( ) { Figure figure = new Figure( ); figure.setMaximumSize( new Dimension( 0, 0 ) ); figure.setSize( 0, 0 ); return figure; }
Example 7
Source File: FunnyStyleSupport.java From ermaster-b with Apache License 2.0 | 5 votes |
/** * {@inheritDoc} */ @Override public void initTitleBar(Figure top) { top.setLayoutManager(new BorderLayout()); FlowLayout layout = new FlowLayout(); layout.setStretchMinorAxis(true); Figure title = new Figure(); top.add(title, BorderLayout.TOP); title.setLayoutManager(layout); if (new BigDecimal("1.5").equals(getSettings().getTitleFontEm())) { title.setBorder(new MarginBorder(new Insets(2, 2, 2, 2))); } else { title.setBorder(new MarginBorder(new Insets(4, 4, 4, 4))); } ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(0, 0, 0, 0))); image.setImage(Activator.getImage(this.getTableFigure().getImageKey())); title.add(image); this.nameLabel = new Label(); this.nameLabel.setBorder(new MarginBorder(new Insets(0, 0, 0, 20))); title.add(this.nameLabel); Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(ColorConstants.black); separater.setOpaque(true); top.add(separater, BorderLayout.BOTTOM); }