|
|
|
Re: Palette Background Color [message #228413 is a reply to message #227210] |
Wed, 20 December 2006 17:41 |
Eclipse User |
|
|
|
Originally posted by: peter.schoell.hwb-ag.com
Hi,
thats easy....
In DiagramEditPart:
protected IFigure createFigure() {
ConnectionLayer connLayer = (ConnectionLayer) getLayer(LayerConstants.CONNECTION_LAYER);
connLayer.setConnectionRouter(new ManhattanConnectionRouter());
return new DiagramFigure();
}
// use your own Figure for the Diagram
public class DiagramFigure extends FreeformLayer {
public DiagramFigure() {
setBorder(new MarginBorder(3));
setLayoutManager(new FreeformLayout());
setBackgroundColor(ColorConstants.lightGray);
// Create the static router for the connection layer
}
/** Paint this figure. */
public void paintFigure(Graphics graphics) {
graphics.setAntialias(SWT.ON);
graphics.setForegroundColor(ColorConstants.lightGray);
graphics.setBackgroundColor(ColorConstants.white);
graphics.fillGradient(getBounds(), true);
}
}
Hope this helps,
peter
|
|
|
|
Powered by
FUDForum. Page generated in 0.03409 seconds