Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
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 11-05-2007, 05:40 PM
Member
 
Join Date: Oct 2007
Posts: 1
consutes is on a distinguished road
Disable BACK and CANCEL buttons in wizard
hi,

I'm using a JFace wizard.
I need to disable the BACK and CANCEL buttons after checking certain conditions, i don't know how to do that

can you help me?

Very thanks!!!
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-12-2007, 10:36 PM
Member
 
Join Date: Nov 2007
Posts: 24
SwinGirl is on a distinguished road
u can use fireChangeEvent.

like that:


Code:
public class WizWizardPanel1 implements WizardDescriptor.Panel { private WizVisualPanel1 component; private final Set<ChangeListener> listeners = new HashSet<ChangeListener>(1); public Component getComponent() { if (component == null) { component = new WizVisualPanel1(); } return component; } public boolean isValid() { if(component == null){ return false; } if ((component.getLbl1().getText().length()== 0) && (component.getLbl2().getText().length() == 0)){ return true; } return false; } public final void addChangeListener(ChangeListener l) { synchronized (listeners) { listeners.add(l); } } public final void removeChangeListener(ChangeListener l) { synchronized (listeners) { listeners.remove(l); } } //firechange event calls to isValid from stateChanged. if Valid is true, //fireChange enable next o finish button. protected final void fireChangeEvent() { Iterator<ChangeListener> it; synchronized (listeners) { it = new HashSet<ChangeListener>(listeners).iterator(); } ChangeEvent ev = new ChangeEvent(this); while (it.hasNext()) { it.next().stateChanged(ev); } } }
i let U here the Tom Wheelerīs site, where U can find a little example:
Tom Wheeler's NetBeans Site

itīs a little confusing, but not so hard (unless u play with wrappers like me, but itīs another issue. Nothing to do with this... ).
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-12-2007, 10:37 PM
Member
 
Join Date: Nov 2007
Posts: 24
SwinGirl is on a distinguished road
ou! JFace.. what a... sry.
-.-
well maybe this is useful to you, in some way...
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
Disable Radio button AJG New To Java 0 04-07-2008 09:37 PM
disable parent window ismailsaleh AWT / Swing 1 01-08-2008 12:15 AM
Netbeans Wizard? SwinGirl Java Tutorials 3 11-08-2007 05:34 PM
Webservice wizard error? marcelman NetBeans 0 08-10-2007 03:46 AM
Is it possible to disable drop in a component? Ada AWT / Swing 3 06-07-2007 06:52 PM


All times are GMT +3. The time now is 01:26 AM.


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