Skip to main content



      Home
Home » Eclipse Projects » GEF » Non-resizable movable nodes
Non-resizable movable nodes [message #158543] Thu, 18 November 2004 15:35 Go to next message
Eclipse UserFriend
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 #158557 is a reply to message #158543] Thu, 18 November 2004 15:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

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 #158572 is a reply to message #158543] Thu, 18 November 2004 15:43 Go to previous messageGo to next message
Eclipse UserFriend
I think you would override createChildEditPolicy(EditPart child) in your
XYLayoutEditPolicy, and return a new NonResizableEditPolicy().

- Sean

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
>
>
Re: Non-resizable movable nodes [message #158588 is a reply to message #158557] Thu, 18 November 2004 15:47 Go to previous messageGo to next message
Eclipse UserFriend
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 15:50 Go to previous message
Eclipse UserFriend
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
Previous Topic:GEF examples.text selection
Next Topic:getLocation() of ConnectionAnchor is not called
Goto Forum:
  


Current Time: Sun May 11 22:27:37 EDT 2025

Powered by FUDForum. Page generated in 0.02682 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top