Non-resizable movable nodes [message #158543] |
Thu, 18 November 2004 20:35 |
Eclipse User |
|
|
|
Originally posted by: none.nowhere.com
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
|
|
|
|
|
Re: Non-resizable movable nodes [message #158588 is a reply to message #158557] |
Thu, 18 November 2004 20:47 |
Eclipse User |
|
|
|
Originally posted by: none.nowhere.com
I presume you mean installing an edit policy in the editpart for the node.
Which role do I install it under?
Randy Hudson wrote:
> Use the NonResizableEditPolicy
> "Peter Smith" <none@nowhere.com> wrote in message
> news:cnj11p$3tp$1@www.eclipse.org...
>> 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
>>
>>
|
|
|
Re: Non-resizable movable nodes [message #158603 is a reply to message #158543] |
Thu, 18 November 2004 20:50 |
Eclipse User |
|
|
|
Originally posted by: Lamont_Gilbert.rigidsoftware.com
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
|
|
|
Powered by
FUDForum. Page generated in 0.03639 seconds