Class PropertyEnableCheck
java.lang.Object
org.openjump.core.ui.enablecheck.PropertyEnableCheck
- All Implemented Interfaces:
EnableCheck
-
Constructor Summary
ConstructorsConstructorDescriptionPropertyEnableCheck(Object object, String checkMethodName, Object expectedValue, boolean invert, ErrorHandler errorHandler) PropertyEnableCheck(Object object, String checkMethodName, Object expectedValue, ErrorHandler errorHandler) -
Method Summary
Modifier and TypeMethodDescriptioncheck(JComponent component) Returns a non-null value if the check failed.
-
Constructor Details
-
PropertyEnableCheck
public PropertyEnableCheck(Object object, String checkMethodName, Object expectedValue, boolean invert, ErrorHandler errorHandler) -
PropertyEnableCheck
public PropertyEnableCheck(Object object, String checkMethodName, Object expectedValue, ErrorHandler errorHandler) - Parameters:
object- The object to invoke the method on.checkMethodName- The name of the check method which returns a boolean value.expectedValue- The expected value to be returned for the check to be enabled.
-
-
Method Details
-
check
Description copied from interface:EnableCheckReturns 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:
checkin interfaceEnableCheck- Returns:
- an error message if the check failed, or null if the check passed
-