How to remove focus decoration [message #143097] |
Sun, 18 July 2004 15:42 |
Eclipse User |
|
|
|
Originally posted by: hello.yahoo.com
Hi
Now I want to remove some focus decorations in my figure when it is
selected.For example:
In GEF when I selected an figure to resize or to move the figure will be
added some decorations which has eight squares. and when use move the
mouse on the figure the cursor will change to resize cursor or move
cursor.What I want is to remove all squares and only when I move mouse on
the right bound or left bounds the cursor will change to the resize cursor
and so does the move cursor.
Should I add some selectinEditPolicy extends from Resizable or
NonResizable EditPolicy?
Can you help me?
Daniel
thanks in advance.
|
|
|
|
Re: How to remove focus decoration [message #143149 is a reply to message #143118] |
Mon, 19 July 2004 02:50 |
Eclipse User |
|
|
|
Originally posted by: hello.yahoo.com
thanks it works
steven melzer wrote:
> i don't know the best answer, but what you suggested is exactly what i do
> to modify the selection decoration.
> i created a editpolicy with a new implementation of
> createSelectionHandles() then use it by setting it up in my Diagrams main
> edit policy as such:
> public class DiagramComponentRoleEditPolicy extends XYLayoutEditPolicy {
> protected EditPolicy createChildEditPolicy(EditPart child) {
> return new MyNewEditPolicyToControlHandles();
> }
> you'd probably still want to create "handles" from the existing MoveHandle
> and ResizeHandle, but give them no graphically representation, i.e. empty
> paintFigure() implemntation. then you can get all the existing code
> behind the handles for managing the resizing, positioning, cursors, etc.
> steve
> daniel wrote:
> > Hi
> > Now I want to remove some focus decorations in my figure when it is
> > selected.For example:
> > In GEF when I selected an figure to resize or to move the figure will be
> > added some decorations which has eight squares. and when use move the
> > mouse on the figure the cursor will change to resize cursor or move
> > cursor.What I want is to remove all squares and only when I move mouse on
> > the right bound or left bounds the cursor will change to the resize cursor
> > and so does the move cursor.
> > Should I add some selectinEditPolicy extends from Resizable or
> > NonResizable EditPolicy?
> > Can you help me?
> > Daniel
> > thanks in advance.
|
|
|
Powered by
FUDForum. Page generated in 0.03595 seconds