[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Center a Label in a Node

Hi,
i am sorry it did not work for you, but i do not know whether you got me right. Please do not add your figure to the BorderLayout but to the main figure. There should be a Function like this on xour main figure:


void add(IFigure child, Object constraint);

and there you can add your Label with PositionConstants.CENTER as Constraint.
Hope this helps. If you are trying to do this using a generator model instead i think i can not help you, because i am not very familiar with that.



Cecilia schrieb:
Hello,
It didn't work, if I add a BorderLayout to my Node Figure, then the only option I have is to add a 'Dimension'(Dx, Dy) to the BorderLayout, I don't have the option to 'center'.
Then I tryed to enter the code directly in the Java Class edit part of my node figure, as you told me, but it doesn't work (now the node doesn't appear and I have the error in java 'index doesn't exist' (because of the second parameter in the add function).
Is there another way to do this or do you know what this errors stand for?
thank you very much
Cecilia