org.jdesktop.binding.swingx
Interface Binding

All Known Implementing Classes:
AbstractBinding, BooleanBinding, ComboBoxBinding, DatePickerBinding, DirectListBinding, DirectTableBinding, FormBinding, HyperlinkBinding, ImagePanelBinding, LabelBinding, LabelMetaBinding, ListBinding, RadioBinding, SpinnerBinding, TableBinding, TextBinding

public interface Binding

Class which binds a user-interface component to a specific element in a data model. A Binding instance implements the following tasks:

Version:
1.0
Author:
Amy Fowler

Field Summary
static int AUTO_VALIDATE
           
static int AUTO_VALIDATE_NONE
           
static int AUTO_VALIDATE_STRICT
           
static int INVALID
           
static int UNVALIDATED
           
static int VALID
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 javax.swing.JComponent getComponent()
           
 DataModel getDataModel()
           
 java.lang.String getFieldName()
           
 java.beans.PropertyChangeListener[] getPropertyChangeListeners()
           
 java.lang.String[] getValidationErrors()
          Returns validation error messages generated from the most recent element-level validation pass.
 int getValidState()
           
 boolean isModified()
           
 boolean isValid()
           
 boolean pull()
          Pulls the value of this binding's data model element into its UI component.
 boolean push()
          Pushes the current value contained in this binding's UI component to this binding's data model element.
 void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
           
 

Field Detail

AUTO_VALIDATE

static final int AUTO_VALIDATE
See Also:
Constant Field Values

AUTO_VALIDATE_STRICT

static final int AUTO_VALIDATE_STRICT
See Also:
Constant Field Values

AUTO_VALIDATE_NONE

static final int AUTO_VALIDATE_NONE
See Also:
Constant Field Values

UNVALIDATED

static final int UNVALIDATED
See Also:
Constant Field Values

VALID

static final int VALID
See Also:
Constant Field Values

INVALID

static final int INVALID
See Also:
Constant Field Values
Method Detail

getComponent

javax.swing.JComponent getComponent()

getDataModel

DataModel getDataModel()

getFieldName

java.lang.String getFieldName()

pull

boolean pull()
Pulls the value of this binding's data model element into its UI component.

Returns:
boolean indicating whether or not the value was pulled from the data model

isModified

boolean isModified()
Returns:
boolean indicating whether or not the value contained in this binding's UI component has been modified since the value was last pushed or pulled

isValid

boolean isValid()
Returns:
boolean indicating whether or not the value contained in this binding's UI component is valid

getValidState

int getValidState()

getValidationErrors

java.lang.String[] getValidationErrors()
Returns validation error messages generated from the most recent element-level validation pass.

Returns:
array containing any error messages which occurred during element-level validation

push

boolean push()
Pushes the current value contained in this binding's UI component to this binding's data model element. Only valid values should be pushed to the model.

Returns:
boolean indicating whether or not the value was pushed to the data model

addPropertyChangeListener

void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)

removePropertyChangeListener

void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)

getPropertyChangeListeners

java.beans.PropertyChangeListener[] getPropertyChangeListeners()


Copyright © 2005 Sun Microsystems All Rights Reserved.