Java Code Examples for org.eclipse.draw2d.ToolbarLayout#setSpacing()

The following examples show how to use org.eclipse.draw2d.ToolbarLayout#setSpacing() . 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: ClassFigure.java    From JDeodorant with MIT License 6 votes vote down vote up
public ClassFigure(String name, Color color) {
	ToolbarLayout layout = new ToolbarLayout();
	layout.setSpacing(5);
	setLayoutManager(layout);	
	setBorder(new CompoundBorder( new LineBorder(1), new MarginBorder(0, 0, 0, 0)));
	setBackgroundColor(color);
	setOpaque(true);

	Label className = new Label(name, DecorationConstants.CLASS);
	className.setToolTip(new Label(name));
	className.setFont(DecorationConstants.classFont);

	add(className);

	new ClassFigureMover(this);

}
 
Example 2
Source File: TrackFigure.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
public TrackFigure(String title, ITimelineStyleProvider styleProvider) {

		fTitle = title;
		final ToolbarLayout layout = new ToolbarLayout(false);
		layout.setStretchMinorAxis(true);
		layout.setSpacing(5);
		setLayoutManager(layout);

		updateStyle(styleProvider);
	}
 
Example 3
Source File: AbstractStyleSupport.java    From ermasterr with Apache License 2.0 5 votes vote down vote up
protected void initColumnArea(final IFigure columns) {
    final ToolbarLayout layout = new ToolbarLayout();
    layout.setMinorAlignment(OrderedLayout.ALIGN_TOPLEFT);
    layout.setStretchMinorAxis(true);
    layout.setSpacing(0);

    columns.setBorder(new MarginBorder(0, 2, 2, 2));
    columns.setLayoutManager(layout);

    columns.setBackgroundColor(null);
    columns.setOpaque(false);
}
 
Example 4
Source File: AbstractStyleSupport.java    From erflute with Apache License 2.0 5 votes vote down vote up
protected void initColumnArea(IFigure columns) {
    final ToolbarLayout layout = new ToolbarLayout();
    layout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
    layout.setStretchMinorAxis(true);
    layout.setSpacing(0);

    columns.setBorder(new MarginBorder(0, 2, 2, 2));
    columns.setLayoutManager(layout);

    columns.setBackgroundColor(null);
    columns.setOpaque(false);
}
 
Example 5
Source File: MethodClassSection.java    From JDeodorant with MIT License 5 votes vote down vote up
public MethodClassSection(){
	//setFont( Display.getCurrent().getSystemFont() ); 
	ToolbarLayout layout = new ToolbarLayout();
	layout.setSpacing(5);
	layout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
	layout.setStretchMinorAxis(true);
	setLayoutManager(layout);

}
 
Example 6
Source File: TableNodeFigure.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public TableNodeFigure( String name )
{
	ToolbarLayout mainLayout = new ToolbarLayout( );
	mainLayout.setStretchMinorAxis( true );
	mainLayout.setVertical( true );
	mainLayout.setSpacing( 1 );
	this.setLayoutManager( mainLayout );
	this.setOpaque( true );

}
 
Example 7
Source File: AbstractStyleSupport.java    From ermaster-b with Apache License 2.0 5 votes vote down vote up
protected void initColumnArea(IFigure columns) {
	ToolbarLayout layout = new ToolbarLayout();
	layout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
	layout.setStretchMinorAxis(true);
	layout.setSpacing(0);

	columns.setBorder(new MarginBorder(0, 2, 2, 2));
	columns.setLayoutManager(layout);

	columns.setBackgroundColor(null);
	columns.setOpaque(false);
}
 
Example 8
Source File: RailroadDiagram.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected LayoutManager createLayoutManager() {
	ToolbarLayout layout = new ToolbarLayout();
	layout.setSpacing(ILayoutConstants.VSPACE_BETWEEN_TRACKS);
	return layout;
}