com.im.commons 5.9

com.im.commons.util
Interface DFCustomizer

All Superinterfaces:
Customizer

public interface DFCustomizer
extends Customizer

Special extension of standard Java Beans customizer


Field Summary
static String PROP_DATA_VALID
           
static String PROP_ERROR_MESSAGE
           
static String PROP_FORCE_READ_ONLY
          This property is recognized as clientProperty (JComponent.putClientProperty(java.lang.Object, java.lang.Object)) and instructs the Customizer to render all fields disabled or make sure by other means, that the underlying bean is not modified when the user changes the UI.
static String PROP_MODIFIED
           
static String PROP_UI_PROPERTIES
          Additional UI properties to be set on the customizer - if it is not the same object as the DFCustomizer impl class.
 
Method Summary
 void applyChanges()
          Apply the changes and set all properties to edited object.
 void applyChanges(DFEnvironmentRW env)
          Apply the changes and set all properties to edited object.
 void cancelChanges()
          Cancel the changes and refresh all input fields from the edited object.
 String getErrorMessage()
          Return the error message when customizer is not valid
 DFLockable getLockable()
          Get lockable for customized item
 boolean isDataValid()
          Is the currently filled values valid?
 boolean isModified()
          Are input fields currently modified and not stored to edited object?
 
Methods inherited from interface java.beans.Customizer
addPropertyChangeListener, removePropertyChangeListener, setObject
 

Field Detail

PROP_FORCE_READ_ONLY

static final String PROP_FORCE_READ_ONLY
This property is recognized as clientProperty (JComponent.putClientProperty(java.lang.Object, java.lang.Object)) and instructs the Customizer to render all fields disabled or make sure by other means, that the underlying bean is not modified when the user changes the UI. The customizer in this mode can be used to present bean's properties

See Also:
Constant Field Values

PROP_DATA_VALID

static final String PROP_DATA_VALID
See Also:
Constant Field Values

PROP_MODIFIED

static final String PROP_MODIFIED
See Also:
Constant Field Values

PROP_ERROR_MESSAGE

static final String PROP_ERROR_MESSAGE
See Also:
Constant Field Values

PROP_UI_PROPERTIES

static final String PROP_UI_PROPERTIES
Additional UI properties to be set on the customizer - if it is not the same object as the DFCustomizer impl class. Properties can be relayed to e.g. tab Components in a complex DFCustomizer, too

See Also:
Constant Field Values
Method Detail

isDataValid

boolean isDataValid()
Is the currently filled values valid?


isModified

boolean isModified()
Are input fields currently modified and not stored to edited object?


getErrorMessage

String getErrorMessage()
Return the error message when customizer is not valid


applyChanges

void applyChanges()
Apply the changes and set all properties to edited object.

Throws:
IllegalStateException - when isDataValid is false

applyChanges

void applyChanges(DFEnvironmentRW env)
Apply the changes and set all properties to edited object.

Parameters:
env -
Throws:
IllegalStateException - when isDataValid is false

getLockable

DFLockable getLockable()
Get lockable for customized item

Returns:
The lockable for customized item

cancelChanges

void cancelChanges()
Cancel the changes and refresh all input fields from the edited object.


com.im.commons 5.9