Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [gef-dev] How to remove the border in NetworkEditor example?

Hi Michael,

If you expand the folder named "Network Editor" in your workspace, you will
see a folder called "src" with a package "com.ibm.itso.sal330r.network".
Expand the package and you will see several packages, one of which is
"edit". If you expand the "edit" package, you will see a file called
"NetworkEditPart.java". Within this java file, you will see this method:

protected IFigure createFigure()
{
	FreeformLayer layer = new FreeformLayer();
	layer.setLayoutManager(new FreeformLayout());
	layer.setBorder(new LineBorder(1)); // CHANGE THIS.
	return layer;
}

As commented above, you can modify the integer (1 in this case) to change ur
border. If you read the GEF tutorial on the Eclipse website, you would see
that the NetworkEditPart corresponds to the "Contents" EditPart which falls
under the "RootEditPart". Here's the link to the tutorial: 
http://www-106.ibm.com/developerworks/opensource/library/os-gef/

Hope this helps.

Bharath.
 

-----Original Message-----
From: gef-dev-admin@xxxxxxxxxxx [mailto:gef-dev-admin@xxxxxxxxxxx] On Behalf
Of michaelsun@xxxxxxxxxx
Sent: Tuesday, February 10, 2004 3:23 PM
To: gef-dev@xxxxxxxxxxx
Subject: [gef-dev] How to remove the border in NetworkEditor example?

In the Network example of 
ftp://www.redbooks.ibm.com/redbooks/SG246302,

when open the NetworkEditor, there is a border around
the GraphicalViewer. How to remove it? In
NetworkPage.java, I can get the FigureCanvas from the
viewer.getControl(), but still can't get rid of it? 

Thanks,

Michael  
_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/gef-dev




Back to the top