Results 1 to 4 of 4
Thread: My Preference Dialog
- 08-09-2007, 09:19 AM #1
Member
- Join Date
- Aug 2007
- Posts
- 4
- Rep Power
- 0
My Preference Dialog
Hello,
in my eclipse RCp I have a peference dialog, which contains actually two pages. normally I opens the dialog, with a item in the menubar. But now I have a button. And I click on this button, should also opens the preference dialog, but in this case the page two should have the focus.
How can I realize this?
- 08-09-2007, 07:22 PM #2
Senior Member
- Join Date
- Mar 2007
- Posts
- 134
- Rep Power
- 0
Let us analyse what you need
You have two pages, inside a dialog When it is viewed from menu page1 should have the focus when viewed from button page2 should have the focus,
So I think You need to have two constructer for the dialog one with focus of page1 and other with focus on page2, Call them correspondingly
- 08-09-2007, 09:42 PM #3
Member
- Join Date
- Aug 2007
- Posts
- 4
- Rep Power
- 0
yes but the class PreferenceDialog from the package JFace has not setFocus method. Can you give me some code. How i can realize this. I have try it with Methode showPage() but this was not the solve for the problem. Have you an other idea. Or how can I set which page has the Focus in the constructor
Last edited by schuetzejanett; 08-09-2007 at 09:59 PM.
- 08-10-2007, 10:48 AM #4
Member
- Join Date
- Aug 2007
- Posts
- 4
- Rep Power
- 0
here is my actually code but I don't know how I can change the page, which has the focus
Can anybody helps me?Java Code:public class MyPreferenceDialog extends PreferenceDialog { public MyPreferenceDialog(int flag) { super(null, getManager()); } private static PreferenceManager getManager() { PreferenceManager mgr = new PreferenceManager(); // Create the nodes PreferenceNode one = new PreferenceNode("Druckmanager", new PreferencePageData()); PreferenceNode two = new PreferenceNode("Postage", new PreferencePagePostage()); // Add the nodes mgr.addToRoot(one); mgr.addToRoot(two); return mgr; } }
Similar Threads
-
Run As dialog and Plugin Help
By menelaosbgr in forum EclipseReplies: 0Last Post: 03-25-2008, 03:21 AM -
Example - File Dialog
By Java Tip in forum Java TipReplies: 0Last Post: 03-01-2008, 10:11 PM -
Example of SWT Dialog
By Java Tip in forum Java TipReplies: 0Last Post: 01-09-2008, 12:01 PM -
Dialog Box
By uncopywritable in forum New To JavaReplies: 2Last Post: 07-30-2007, 12:42 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks