public interface ItsNatButton extends ItsNatElementComponent
A button component manages a javax.swing.ButtonModel
,
user actions updates this model accordingly. Default button model
depends on the concrete button type (normal, toggle etc). Button model listeners
may be used to keep track of the button state changes.
In spite of ItsNat specifies interfaces bound to the typical form based buttons, any (X)HTML element can be an ItsNat button (free buttons), however ItsNat does not define a default decoration, button model listeners may be used to decorate any button state.
Modifier and Type | Method and Description |
---|---|
javax.swing.ButtonModel |
createDefaultButtonModel()
Creates a data model instance appropriated to this component.
|
javax.swing.ButtonModel |
getButtonModel()
Returns the current data model of this component.
|
ItsNatButtonUI |
getItsNatButtonUI()
Returns the user interface manager of this component.
|
boolean |
isEnabled()
Informs whether this button receives UI events.
|
void |
setButtonModel(javax.swing.ButtonModel dataModel)
Changes the data model of this component.
|
void |
setEnabled(boolean b)
Sets whether this button can receive UI events.
|
getElement, getItsNatElementComponentUI
addEventListener, addEventListener, addEventListener, addEventListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, disableEventListener, disableEventListener, dispose, enableEventListener, enableEventListener, getArtifact, getArtifact, getItsNatComponentManager, getItsNatComponentUI, getItsNatDocument, getNode, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, isDisposed, registerArtifact, removeArtifact, removeEventListener, removeEventListener, removeEventListener, removeEventListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, setEventListenerParams, setEventListenerParams, setNode
containsUserValueName, getUserValue, getUserValueNames, removeUserValue, setUserValue
javax.swing.ButtonModel getButtonModel()
setButtonModel(javax.swing.ButtonModel)
void setButtonModel(javax.swing.ButtonModel dataModel)
Current data model is disconnected from this component, and the new data model is bound to this component, every change is tracked and updates the user interfaces accordingly.
If the specified data model is the same instance as the current data model, then is reset, component listener is removed and added again. Use this technique if you want to add a data model listener to be executed before the default component listener.
dataModel
- the new data model.getButtonModel()
javax.swing.ButtonModel createDefaultButtonModel()
ItsNatButtonUI getItsNatButtonUI()
boolean isEnabled()
Current implementation calls ButtonModel.isEnabled()
.
isEnabled
in interface ItsNatComponent
ItsNatComponent.isEnabled()
void setEnabled(boolean b)
Current implementation calls ButtonModel.setEnabled(boolean)
setEnabled
in interface ItsNatComponent
b
- true to enable the UI.ItsNatComponent.setEnabled(boolean)
Copyright © 2007 Innowhere Software Services S.L. All Rights Reserved.