Results 1 to 5 of 5
- 11-18-2009, 10:09 PM #1
Getting to the top level dialog from sub-tabs.
If I am in a sub-tab of a tab in a dialog box, is there
1) an easy way to get a refernce to the main dialog box.
2) how can I get a list/array/whatever to the top tab list.
I have tried adding a listener on the control I get back when I call the getControl() funciton I add the listener on getControl.addListener(SWT.Show,listener); to test things out I have a few dialog boxes pop to see what values exist in side the listener classes (simple JOptionPane.showMessages) the problem is, instead of coming up after the dialog box is shown, they come up BEFORE the dialog box is shown, so when I try to read things from the dialog box the elements don't really exist and I get nulls back.
So what am I missing, is there a way to get the parent dialog box from an object that is inside of the dialog box. When I get this parent object then what is the easiest way to get the list of the high level tabs (I am assuming they are the next level of objects down)Michael P. O'Connor
http://www.mikeoconnor.net
- 11-18-2009, 11:40 PM #2
tabbed JDialogue??? which container which component or is it a tabbed awt.pane
they throw headless exceptions.....try and catch your dialogues and put system.out.println(e.getsource()); ...you still have the shell? java not javaw
Java Code:JDialogue FU = new JDialogue(); try {FU.[[whatever method here]]] } catch (Exception e) { System.out.println("FU has thrown an exception"); System.out.println(e.getSource()); }Last edited by aaroncarpet; 11-18-2009 at 11:47 PM.
-
- 11-19-2009, 05:02 AM #4
I am inside a DialogPage object here (aka it inherits from DialogPage), which I believe inherits from the component object. and correct me if I am wrong, but does not the Eclipse RCP extend off of SWT, that is why I am using the SWT.Show as the event for the listener. But what confuses me is that the even fires off before the dialog box is even one the screen, I would have assumed that the show even would not fire till after the dialog is fully displayed on the screen.
Last edited by Drun; 11-19-2009 at 05:06 AM. Reason: to add just a little bit more info.
Michael P. O'Connor
http://www.mikeoconnor.net
- 11-19-2009, 06:03 AM #5
Similar Threads
-
SWT tabs with Draw2d
By garyscarter in forum SWT / JFaceReplies: 0Last Post: 07-07-2009, 03:31 PM -
[SOLVED] Class-level vs Object-level method()
By mfaizan24 in forum New To JavaReplies: 7Last Post: 06-23-2009, 09:18 AM -
Arrangement of tabs in JTabbedPane
By swapnilnawale in forum AWT / SwingReplies: 0Last Post: 03-20-2009, 07:27 PM -
Adding tabs from classes
By bubbless in forum AWT / SwingReplies: 13Last Post: 03-08-2009, 12:52 AM -
JMenu with Tabs using swing
By phil128 in forum AWT / SwingReplies: 1Last Post: 03-03-2009, 03:29 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks