Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Set Text to the right position
Set Text to the right position [message #893507] Wed, 04 July 2012 11:40 Go to next message
Patrick Rütz is currently offline Patrick RützFriend
Messages: 11
Registered: June 2012
Junior Member
Hi I have a little problem. I have made a customfeature. I have a Pictogrammelement which i made smaller bei setting the height and widthvalue, but if i do this, the text isn´t shown anymore. So I want to set the text new. But i don´t know how i can do this, especially how I can get the text element.

Thanks a lot
Re: Set Text to the right position [message #893707 is a reply to message #893507] Thu, 05 July 2012 10:23 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
To help more concretely, I would need some more information...

I would assume that the PictogramElement is a parent of your text. By making
it smaller, either the text is no longer within the parent or the size of
the parent is too small to show the text at all.

You need to take care that when making a PictogramElement smaller all its
children are placed at a location that is really inside the parent, because
the parent will clip at its borders.

Michael
Re: Set Text to the right position [message #893856 is a reply to message #893707] Thu, 05 July 2012 17:21 Go to previous messageGo to next message
Patrick Rütz is currently offline Patrick RützFriend
Messages: 11
Registered: June 2012
Junior Member
Hi Michael,

thanks for that answer. The innerpictogrammelements should be at there origin postion, because the feature scould be a collapse feature. The Problem is, that the text is at its origin postion too. Now I want to know how could i change that postion the the visible area?

Thanks


Michael Wenz wrote on Thu, 05 July 2012 06:23
To help more concretely, I would need some more information...

I would assume that the PictogramElement is a parent of your text. By making
it smaller, either the text is no longer within the parent or the size of
the parent is too small to show the text at all.

You need to take care that when making a PictogramElement smaller all its
children are placed at a location that is really inside the parent, because
the parent will clip at its borders.

Michael

Re: Set Text to the right position [message #893943 is a reply to message #893856] Fri, 06 July 2012 07:04 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
I think I didn't understand that...

The visible area is always at 0,0 (starting in the left upper corner) of the
parent shape's Graphic Algorithm. Its size is as large as the GA is defined.

Michael
Re: Set Text to the right position [message #894000 is a reply to message #893943] Fri, 06 July 2012 11:27 Go to previous messageGo to next message
Patrick Rütz is currently offline Patrick RützFriend
Messages: 11
Registered: June 2012
Junior Member
Ok I have a pictogramelement with other pictogrammelements inside. So i made the "overpictogrammelement" smaller, to hiding the the other elements. What would happen if I made the shape smaller to? Would this change the Position of the innerpictogramelements too?

Thanks
Re: Set Text to the right position [message #894406 is a reply to message #894000] Mon, 09 July 2012 06:47 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hm, Graphiti uses two concepts for the graphical representations: The
pictogram elements (PE) define the hierarchie of the shapes in the diagram,
they consists of nested ContainerShapes and Shapes; there is no size or
location information on these elements.
Then there are Graphics Alhorithms (GA) (like Rectangle, Text,...); they are
attached to a shape or container shape (in fact each of the pictogram
elements must have one Graphics Algorithm) and define the look (color etc)
and the size and location.
So by nesting PEs there associated GAs define what is visible from the
children. Each PE spans its own coordinate system, so GAs use a location
realative to the parent PEs GA. Also the parent PEs GA defines the size,
everything from the children that reaches beyond this size is clipped.

Michael
Previous Topic:Changing Palette
Next Topic:First Editor
Goto Forum:
  


Current Time: Wed Apr 24 20:09:03 GMT 2024

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

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

Back to the top