Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » How to remove focus decoration
How to remove focus decoration [message #143097] Sun, 18 July 2004 15:42 Go to next message
Eclipse UserFriend
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 #143118 is a reply to message #143097] Sun, 18 July 2004 17:12 Go to previous messageGo to next message
steven melzer is currently offline steven melzerFriend
Messages: 17
Registered: July 2009
Junior Member
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.
Re: How to remove focus decoration [message #143149 is a reply to message #143118] Mon, 19 July 2004 02:50 Go to previous message
Eclipse UserFriend
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.
Previous Topic:FlowLayout shrink on remove
Next Topic:Dragging and moving
Goto Forum:
  


Current Time: Sat Apr 27 02:07:56 GMT 2024

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

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

Back to the top