[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.gef] Re: Non-resizable movable nodes

Peter Smith wrote:
Hi,

Anyone know the easiest way to make a node movable but not resizable? Do I have to implement my own DragTracker to accomplish this?
Thanks,
Peter




What I do is alter the editPolicy of the container that will hold it. Since in the examples, the container is the one responsible for resizing and moving.


So my container class has an editPolicy ContainerLayoutEditPolicy, and in the method called createChildEditPolicy, i set the childs edit policy based on its class type

NonResizableEditPolicy
LineSizeableEditPolicy - I think I created this for feedback purposes or something.


for those that dont require special handling i call
super.createChildEditPolicy()



--
Respectfully,


CL Gilbert

"Verily, verily, I say unto you, He that entereth not by the door() into the sheepfold{}, but climbeth up some other *way, the same is a thief and a robber."

GnuPG Key Fingerprint:
82A6 8893 C2A1 F64E A9AD  19AE 55B2 4CD7 80D2 0A2D

For a free Java interface to Freechess.org see http://www.rigidsoftware.com/Chess/chess.html