org.eclipse.draw2d.CompoundBorder Java Examples

The following examples show how to use org.eclipse.draw2d.CompoundBorder. 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: PackageFigure.java    From JDeodorant with MIT License 5 votes vote down vote up
public PackageFigure(String name, double scale){
	this.name= name;

	setLayoutManager(new ProportionalFlowLayout(scale,5, 10));
	setToolTip(new Label(name));
	LineBorder border = new LineBorder();
	border.setColor(ColorConstants.white);
	
	setBorder(new CompoundBorder(border, new MarginBorder(10, 5, 10, 5)));

}
 
Example #3
Source File: TableBorderFigure.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public TableBorderFigure( )
{
	outer = new SchemeBorder( raisedBorderScheme );
	titleBar = new TitleBarBorder( );
	inner = new CompoundBorder( titleBar, new SimpleLoweredBorder( 5 ) );
	titleBar.setTextColor( Display.getCurrent( )
			.getSystemColor( SWT.COLOR_TITLE_FOREGROUND ) );
	titleBar.setTextAlignment( 1 );
	titleBar.setPadding( 3 );
}
 
Example #4
Source File: RectangleNode.java    From xtext-eclipse with Eclipse Public License 2.0 4 votes vote down vote up
@Override
protected Border createBorder() {
	MarginBorder marginBorder = new MarginBorder(PADDING - 1);
	LineBorder lineBorder = new LineBorder(1);
	return new CompoundBorder(lineBorder, marginBorder);
}
 
Example #5
Source File: XtextDirectEditManager.java    From statecharts with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * Overridden to enlarge the cell editor frame for a control decorator
 */
protected IFigure getCellEditorFrame() {
	IFigure cellEditorFrame = super.getCellEditorFrame();
	cellEditorFrame.setBorder(new CompoundBorder(new MarginBorder(new Insets(0, 10, 0, 0)), BORDER_FRAME));
	return cellEditorFrame;
}
 
Example #6
Source File: MethodClassSection.java    From JDeodorant with MIT License 4 votes vote down vote up
public void addFigure(Figure figure){
	this.add(figure);
	figure.setBackgroundColor(DecorationConstants.entityColor);
	figure.setBorder(new CompoundBorder( new LineBorder(1), new MarginBorder(3,3,3,3)));
	numOfMethods++;
}