Home » Eclipse Projects » GEF » Generate a tree node with icon and multiline text using GEF(Generate a tree node with icon and multiline text using GEF)
|
Re: Generate a tree node with icon and multiline text using GEF [message #1814197 is a reply to message #1814195] |
Thu, 05 September 2019 14:09   |
|
Hi,
you do not need GeometryNode for this kind of visualisation. GeometryNode is only useful for displaying GEF geometries. It comes with some gimmicks, e.g. resizing and (invisible) clickable-area around the rendered geometry.
I would suggest that you have a look at the following JavaFX nodes: VBox, HBox, ImageView, Text, Separator.
It should be easy to compose something similar.
The node hierarchy could potentially look something like this:
VBox
- HBox (css-class: "title")
-- ImageView
-- Text
-- Text (aligned right)
- Separator
- VBox (css-class: "details")
-- Text
-- Text
The individual colors, stroke widths, icons, etc. could be specified via CSS.
Best regards,
Matthias
|
|
|
Re: Generate a tree node with icon and multiline text using GEF [message #1814200 is a reply to message #1814197] |
Thu, 05 September 2019 14:31   |
girijanandan nucha Messages: 25 Registered: January 2019 Location: Bangalore, India |
Junior Member |
|
|
Hi Matthias,
Thanks for quick reply.
I will surely tryout JavaFX nodes.
I have few follow up questions
1) Is there a provision to add mouse double click action as well on these nodes ?
2) I am planning to use SpaceTreeLayoutAlgorithm for displaying my tree. How to ensure that my tree always fits in ViewPort ?
3) How do i convert from javafx.scene.Node to org.eclipse.gef.graph.Node (Necessary for creating Graph) ?
Thanks and Regards,
Giri
[Updated on: Thu, 05 September 2019 14:39] Report message to a moderator
|
|
| |
Re: Generate a tree node with icon and multiline text using GEF [message #1814222 is a reply to message #1814203] |
Fri, 06 September 2019 05:26   |
girijanandan nucha Messages: 25 Registered: January 2019 Location: Bangalore, India |
Junior Member |
|
|
Hi,
Thanks for answers 1) and 2)
Let me rephrase question 3.
3) I meant to ask, how do i create a model of graph with node that will be rendered as similar to attached image in 1st question ?
I am assuming following things,
1) If i want to use SpaceTreeLayoutAlgorithm, I need my model to be of type o.e.gef.graph.Graph.
2) Nodes in o.e.gef.graph.Graph. are of type o.e.gef.graph.Node.
I am still new to GEF, please do not mind if i am asking a very basic question.
Thanks,
Giri
[Updated on: Fri, 06 September 2019 05:29] Report message to a moderator
|
|
|
Re: Generate a tree node with icon and multiline text using GEF [message #1814452 is a reply to message #1814222] |
Wed, 11 September 2019 15:18   |
|
Hi,
the graph model is usually derived from your content model. The visualisation is then controlled by the content parts. You could, for instance, extend Zest NodePart and adjust it to your needs, or implement your own.
1) SpaceTreeLayoutAlgorithm uses o.e.gef.Graph as input and output. However, you could use any content model and just transform it to compute a layout.
2) Exactly.
Feel free to ask any questions. I will tell you when an answer exceeds the scope of the forum / requires extensive elaboration. However, I already advised you to do the mind map tutorial, because I am certain it would resolve some confusion.
Edit: I just realised that I advised you to do "a tutorial" without providing a link to the mind map tutorial, so, here you are: https://www.itemis.com/en/gef/tutorials/part-1-the-foundations/
Best regards,
Matthias
[Updated on: Wed, 11 September 2019 15:29] Report message to a moderator
|
|
| |
Re: Generate a tree node with icon and multiline text using GEF [message #1814816 is a reply to message #1814813] |
Thu, 19 September 2019 07:04   |
|
It seems to me like JavaFX is either missing or not correctly loaded in an OSGi context. You can take a look at how GEF is using e(fx)clipse to load JavaFX.
Depending on Java version (e.g. 7, 8, 9, 11, 12, 13) and vendor (Oracle JDK vs. OpenJDK) this can be a cumbersome problem to solve (a colleague of mine is setting up environments for Java 8 and Java 11 with OpenJDK and it is a PITA).
I would like to have the time to investigate this myself, but that is unfortunately not possible ATM. That's why I am awaiting the results of my colleague, and might be able to give a more helpful answer in the future.
Best regards,
Matthias
|
|
| | | |
Goto Forum:
Current Time: Thu Nov 30 14:42:21 GMT 2023
Powered by FUDForum. Page generated in 0.03114 seconds
|