com.vividsolutions.jump.workbench.plugin
Class MultiEnableCheck

java.lang.Object
  extended by com.vividsolutions.jump.workbench.plugin.MultiEnableCheck
All Implemented Interfaces:
EnableCheck

public class MultiEnableCheck
extends java.lang.Object
implements EnableCheck

A sequence of EnableChecks treated as one.


Constructor Summary
MultiEnableCheck()
           
 
Method Summary
 MultiEnableCheck add(EnableCheck enableCheck)
           
 java.lang.String check(javax.swing.JComponent component)
          Returns a non-null value if the check failed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiEnableCheck

public MultiEnableCheck()
Parameters:
tooltip - help for the menu item
Method Detail

check

public java.lang.String check(javax.swing.JComponent component)
Description copied from interface: EnableCheck
Returns a non-null value if the check failed. Sometimes the return value is used (for example, it is displayed as a tooltip for menu-items); sometimes it is not (for example, toolbar buttons don't do anything with the return value). An advanced use of an EnableCheck is simply to change some property of a menu item (such as the text), as it is called when menu items are displayed.

Specified by:
check in interface EnableCheck
Returns:
an error message if the check failed, or null if the check passed

add

public MultiEnableCheck add(EnableCheck enableCheck)
Returns:
this, to allow "method chaining"