Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-09-2007, 11:19 AM
Member
 
Join Date: Aug 2007
Posts: 4
schuetzejanett is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-09-2007, 09:22 PM
Senior Member
 
Join Date: Mar 2007
Posts: 136
goldhouse is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-09-2007, 11:42 PM
Member
 
Join Date: Aug 2007
Posts: 4
schuetzejanett is on a distinguished road
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 11:59 PM.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-10-2007, 12:48 PM
Member
 
Join Date: Aug 2007
Posts: 4
schuetzejanett is on a distinguished road
here is my actually code but I don't know how I can change the page, which has the focus

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; } }
Can anybody helps me?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run As dialog and Plugin Help menelaosbgr Eclipse 0 03-25-2008 05:21 AM
Example - File Dialog Java Tip Java Tips 0 03-02-2008 12:11 AM
Example of SWT Dialog Java Tip Java Tips 0 01-09-2008 02:01 PM
SWT Dialog JavaForums Java Blogs 0 12-31-2007 06:53 PM
Dialog Box uncopywritable New To Java 2 07-30-2007 02:42 PM


All times are GMT +3. The time now is 01:47 PM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org