Problem with Bordered Nodes [message #1403407] |
Wed, 23 July 2014 13:26 |
L P Messages: 1 Registered: July 2014 |
Junior Member |
|
|
Hi all!
I need to create an editor for logical operators (AND, OR, XOR, etc...) and I can't manage to specify the location of the bordered nodes that I use.
Here is the content of my default layer: I have a main container which has multiple bordered nodes.
In fact, I need two kinds of nodes:
- The first category will represent the inputs of my logical operator. Therefore, I need them on the left side of my main container.
- The second category will represent the outputs of my logical operator. Consequently, they need to be on the right side of my main container.
So far, all I can do is arranging randomly the bordered nodes, it puts the inputs on the top of the container and the outputs on the left side. But again, this is not the expected shape of my logical operator.
Best Regards.
|
|
|
|
|
|
Re: Problem with Bordered Nodes [message #1404364 is a reply to message #1404362] |
Thu, 31 July 2014 14:35 |
|
Hi Thomas
Le 31/07/2014 16:22, Thomas Muller a écrit :
> Hi,
> I'm currently addressing the same goal.
> I've created a style configuration provider for my logic components
> which have border nodes where I implement getBorderItemLocatorProvider().
>
> This locator provider then creates instances of DBorderItemLocator(final
> IFigure parentFigure, final int preferredSide) where I specify the side
> of the figure at which I want my border node to appear :
> PositionConstants.EAST or PositionConstants.WEST.
Could you try with a
org.eclipse.gmf.runtime.diagram.ui.figures.BorderItemLocator ?
DBorderItemLocator is not currently capable to keep your preferred side,
but it tries to avoid positions conflicts, overlaps, .. and to locate
bordered items all over the parent.
>
> However, the getPreferredLocation(final IFigure borderItem) method
> always returns a position which is relative to the top left corner...
> which I think is a bug (which I think lays in
> this.getAbsoluteToBorder(constraintLocation);.
> Thus I've ended overriding this methods to calculate my own preferred
> location.
>
> Could someone have a look at it?
>
> Best regards.
>
Regards,
Maxime
Maxime Porhel - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
|
|
|
Powered by
FUDForum. Page generated in 0.03395 seconds