Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to remove corners of the EditPartFigure (which appears when selected)
How to remove corners of the EditPartFigure (which appears when selected) [message #1077158] Thu, 01 August 2013 10:08 Go to next message
Susinda Perera is currently offline Susinda PereraFriend
Messages: 8
Registered: July 2013
Junior Member
I want to remove all square shaped corners in the edit part figure?

Is there anyway to achive this via some kind of edit policy , selection plocy or changing the figure(internaly it is a RectangleFigure) properties.

installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new NonResizableEditPolicyEx()); removes the resize handlers but how to remove the square shaped corners (hotspots) in the four corners of the rectangle.
Re: How to remove corners of the EditPartFigure (which appears when selected) [message #1723144 is a reply to message #1077158] Fri, 12 February 2016 06:47 Go to previous message
Susinda Perera is currently offline Susinda PereraFriend
Messages: 8
Registered: July 2013
Junior Member
installEditPolicy(EditPolicy.PRIMARY_DRAG_ROLE, new CustomNonResizableEditPolicyEx()); Would do the trick, Override the createSelectionHandles method to return empty List. See the code below

public class CustomNonResizableEditPolicyEx extends NonResizableEditPolicyEx {

@Override
protected List createSelectionHandles() {
return new ArrayList();
}
}

[Updated on: Fri, 12 February 2016 06:51]

Report message to a moderator

Previous Topic:Extending an editor
Next Topic:GMF Runtime Tutorial
Goto Forum:
  


Current Time: Thu Aug 25 01:22:40 GMT 2016

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

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