| View previous topic :: View next topic |
| Author |
Message |
Alexius General User

Joined: 30 Apr 2009 Posts: 13 Location: France
|
Posted: Mon Jun 22, 2009 6:09 am Post subject: [Solved] Tree view in a Java dialog box |
|
|
Hi everybody !
I want to show a custom tree view in a dialog box and I don't know how I can do it ?...
Do you have some ideas, samples with details in order to build treeview, populate nodes, catch mouse events and more ?
For instance when you select a leaf, treeview give you the path of the selected leaf from a node like a folder path. (String path = "/node1/node2/leaf 1")
Thanks in advance.
PS : I can build custom dialog box, it's not the problem. (Is there a Java GUI builder enabled for OOo ?)
Last edited by Alexius on Mon Jun 29, 2009 2:42 am; edited 1 time in total |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Alexius General User

Joined: 30 Apr 2009 Posts: 13 Location: France
|
Posted: Tue Jun 23, 2009 7:07 am Post subject: |
|
|
Thanks you for your answer.
I developed the extension only in Java (I use NetBeans Integration). Maybe I can extrapolate basic code (for tree control, tree view, …) to Java code.
I found a solution: I built a dialog with Java UNO API, add a button which runs a class which contains a JFrame with Jpanel and JTree and catch/checks all events from this frame and I catch the path of one leaf on the dialog (I done) when I close the JFrame or pressed the “ok” button of the JPanel.
I am not sure it is the best solution, maybe I need to use Java UNO API to build an equivalent to JTree but it is here my problem... I don’t know how I can do it properly.
If my solution is good, using Swing/AWT, why not! (Because it seems to work properly, I done a lot of tests)
What do you think about my solution ? |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Alexius General User

Joined: 30 Apr 2009 Posts: 13 Location: France
|
Posted: Wed Jun 24, 2009 1:11 pm Post subject: |
|
|
| Ok thanks you ever so much, because I wasn't sure that we can use Swing and Awt instead of awt from Java UNO API ((com.sun.star.awt is more complicated to write your UI yourself than the GUI Builder from NetBeans) |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
Alexius General User

Joined: 30 Apr 2009 Posts: 13 Location: France
|
Posted: Fri Jun 26, 2009 1:13 pm Post subject: |
|
|
I read this example and download sources, but I was a bit lost the last week LoL
At this time I can easily manage Java UNO API (with com.sun.star.awt) and Swing/Awt to design OpenOffice dialogs (manually...) and complex dialogs (Swing/Awt) built with the GUI Builder from NetBeans.
Thanks !  |
|
| Back to top |
|
 |
SergeM Super User

Joined: 09 Sep 2003 Posts: 3211 Location: Troyes France
|
|
| Back to top |
|
 |
bavol Newbie

Joined: 23 Oct 2009 Posts: 1
|
Posted: Fri Oct 23, 2009 10:55 pm Post subject: |
|
|
This fairly complicated dialog has three major parts. The first part allows you to set the pixel scaling for the global and zoom views. The second part allows you to set the contrast. The third part allows you to set the color settings for the dendroview.
The pixel scaling determines how tall and wide the boxes are in both the zoom and global views. Basically, the larger the pixel scaling, the bigger the box. If the pixel scaling is less than one, the rows are averaged. This can make your data look better, since missing values disappear. The contrast is the expression value which corresponds to fully induced. testking 1z0-146 Any values greater than this will appear to be the induced color, and values between this and zero will appear to be a color between the zero and up color. The contrast is similarly used to color repressed boxes.The color part allows you to set the up, down, zero and missing colors. You can double-click the boxes to get a color selection dialog, click a preset to load a color, and load and store color sets to files. testking JN0-201 In LinkedView, a dendrogram must be active in order for this option to appear on the settings menu. Any settings made only apply to the active dendrogram. Coordinates may be parsed from the current file, if it is formatted properly, or parsed from an external file. The proper formatting is discussed in the File Formats section. The settings files provided with Java Treeview are nothing more than minimal PCL files, which contain no data but have annotation columns for chromosome, arm and position. The coordinates in an external files are matched up with the loci in the current file using either the first column, or if the first column has the header GID the second column. This gives the expected result when operating on PCL or CDT files, provided that the id column is unique. testking 000-100 Loci which do not have coordinates are not displayed. However, loci which have coordinates but not expression data associated with them do affect the extent of the chromosome displayed. |
|
| Back to top |
|
 |
|