|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.option.AbstractItemEditor
public abstract class AbstractItemEditor
A base class from which other ItemEditor
classes can be
derived.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface y.option.Editor |
---|
Editor.Event, Editor.Listener |
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_AUTO_ADOPT
Name of property autoAdopt . |
static java.lang.String |
PROPERTY_AUTO_COMMIT
Name of property autoCommit . |
static java.lang.String |
PROPERTY_ENABLED
Name of property enabled . |
static java.lang.String |
PROPERTY_VALUE
Name of property value . |
static java.lang.String |
PROPERTY_VALUE_UNDEFINED
Name of property valueUndefined . |
Fields inherited from interface y.option.ItemEditor |
---|
ATTRIBUTE_AUTO_ADOPT, ATTRIBUTE_AUTO_COMMIT, ATTRIBUTE_FONT_NAME, ATTRIBUTE_SELECT_TEXT_ON_FOCUS |
Constructor Summary | |
---|---|
protected |
AbstractItemEditor(OptionItem item)
Constructs a new AbstractItemEditor for the specified option item. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener to the listener list. |
void |
addPropertyChangeListener(java.lang.String propertyname,
java.beans.PropertyChangeListener pcl)
Adds a PropertyChangeListener to the listener list for a specific property. |
void |
addVetoableChangeListener(java.lang.String propertyname,
java.beans.VetoableChangeListener vcl)
Adds a VetoableChangeListener to the listener list for a specific property. |
void |
addVetoableChangeListener(java.beans.VetoableChangeListener vcl)
Adds a VetoableChangeListener to the listener list. |
void |
adoptItemValue()
Adopts the value and state of the underlying option item into the editor. |
void |
commitValue()
Commits the editor value to the underlying option item. |
protected void |
firePropertyChange(java.beans.PropertyChangeEvent pce)
Fires a PropertyChangeEvent in response to a change in a bound property. |
protected void |
firePropertyChange(java.lang.String pn,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a PropertyChangeEvent in response to a change in a bound property. |
protected void |
fireVetoableChange(java.beans.PropertyChangeEvent pce)
Fires a PropertyChangeEvent in response to a change in a vetoable property. |
protected void |
fireVetoableChange(java.lang.String pn,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a PropertyChangeEvent in response to a change in a vetoable property. |
OptionItem |
getItem()
Returns the option item whose value can be edited with this editor. |
boolean |
isAutoAdopt()
Returns whether this editor is in autoAdopt state,
i.e. if changes in the properties value ,
valueUndefined , and enabled of the
underlying option item be automatically adopted by the editor. |
boolean |
isAutoCommit()
Returns whether this editor is in autoCommit state,
i.e. if editor changes will be automatically propagated to the underlying
option item. |
protected void |
publishEnabledChange(boolean oldValue,
boolean newValue)
Fires the appropriate PropertyChangeEvent . |
protected void |
publishValueChange(java.lang.Object oldValue,
java.lang.Object newValue)
Fires the appropriate PropertyChangeEvent . |
protected void |
publishValueUndefinedChange(boolean oldValue,
boolean newValue)
Fires the appropriate PropertyChangeEvent . |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener from the listener list. |
void |
removePropertyChangeListener(java.lang.String propertyname,
java.beans.PropertyChangeListener pcl)
Removes a PropertyChangeListener from the listener list for a specific property. |
void |
removeVetoableChangeListener(java.lang.String propertyname,
java.beans.VetoableChangeListener vcl)
Removes a VetoableChangeListener from the listener list for a specific property. |
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener vcl)
Removes a VetoableChangeListener from the listener list. |
void |
resetValue()
Resets the editor value to the backup value of the underlying option item. |
void |
setAutoAdopt(boolean autoAdopt)
Specifies the autoAdopt state of this editor. |
void |
setAutoCommit(boolean autoCommit)
Specifies the autoCommit state of this editor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface y.option.ItemEditor |
---|
getValue, isEnabled, isValueUndefined, setEnabled, setValue, setValueUndefined |
Methods inherited from interface y.option.Editor |
---|
getComponent |
Field Detail |
---|
public static final java.lang.String PROPERTY_ENABLED
enabled
.
public static final java.lang.String PROPERTY_VALUE
value
.
public static final java.lang.String PROPERTY_VALUE_UNDEFINED
valueUndefined
.
public static final java.lang.String PROPERTY_AUTO_COMMIT
autoCommit
.
public static final java.lang.String PROPERTY_AUTO_ADOPT
autoAdopt
.
Constructor Detail |
---|
protected AbstractItemEditor(OptionItem item)
item
- the option item whose value can be edited with this editorMethod Detail |
---|
public OptionItem getItem()
getItem
in interface ItemEditor
public boolean isAutoCommit()
autoCommit
state,
i.e. if editor changes will be automatically propagated to the underlying
option item.
isAutoCommit
in interface ItemEditor
autoCommit
statepublic void setAutoCommit(boolean autoCommit)
autoCommit
state of this editor.
setAutoCommit
in interface ItemEditor
autoCommit
- if true
changes in this editor will
be automatically propagated to the underlying option
itempublic boolean isAutoAdopt()
autoAdopt
state,
i.e. if changes in the properties value
,
valueUndefined
, and enabled
of the
underlying option item be automatically adopted by the editor.
isAutoAdopt
in interface ItemEditor
autoAdopt
stateOptionItem.publishValue(Object)
,
OptionItem.publishValueUndefined(boolean)
,
OptionItem.publishEnabled(boolean)
public void setAutoAdopt(boolean autoAdopt)
autoAdopt
state of this editor.
setAutoAdopt
in interface ItemEditor
autoAdopt
- if true
changes in the properties
value
, valueUndefined
, and
enabled
of the underlying option
item will be automatically adopted by the editorpublic void commitValue()
commitValue
in interface Editor
public void adoptItemValue()
adoptItemValue
in interface Editor
public void resetValue()
resetValue
in interface Editor
java.lang.UnsupportedOperationException
- if the underlying option item
does not implement
BackupValueOwner
protected void publishValueChange(java.lang.Object oldValue, java.lang.Object newValue)
PropertyChangeEvent
.
If the editor is in autoCommit
state, the value of
the underlying option item is updated.
oldValue
- the previous valuenewValue
- the new valueprotected void publishEnabledChange(boolean oldValue, boolean newValue)
PropertyChangeEvent
.
If the editor is in autoCommit
state, the
enabled
property of the underlying option item
is updated.
oldValue
- the previous valuenewValue
- the new valueprotected void publishValueUndefinedChange(boolean oldValue, boolean newValue)
PropertyChangeEvent
.
If the editor is in autoCommit
state, the
valueUndefined
property of the underlying option
item is updated.
oldValue
- the previous valuenewValue
- the new valuepublic void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
addPropertyChangeListener
in interface PropertyChangeReporter
pcl
- the PropertyChangeListener to be addedremovePropertyChangeListener(java.beans.PropertyChangeListener)
,
addPropertyChangeListener(String,java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
removePropertyChangeListener
in interface PropertyChangeReporter
pcl
- the PropertyChangeListener to be removedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
removePropertyChangeListener(String,java.beans.PropertyChangeListener)
public void addPropertyChangeListener(java.lang.String propertyname, java.beans.PropertyChangeListener pcl)
addPropertyChangeListener
in interface PropertyChangeReporter
propertyname
- one of the property names listed abovepcl
- the PropertyChangeListener to be addedaddPropertyChangeListener(java.beans.PropertyChangeListener)
,
removePropertyChangeListener(String,java.beans.PropertyChangeListener)
public void removePropertyChangeListener(java.lang.String propertyname, java.beans.PropertyChangeListener pcl)
removePropertyChangeListener
in interface PropertyChangeReporter
propertyname
- a valid property namepcl
- the PropertyChangeListener to be removedaddPropertyChangeListener(String,java.beans.PropertyChangeListener)
,
removePropertyChangeListener(java.beans.PropertyChangeListener)
protected void firePropertyChange(java.lang.String pn, java.lang.Object oldValue, java.lang.Object newValue)
pn
- the name of the property that has changedoldValue
- the property's previous valuenewValue
- the property's new valueprotected void firePropertyChange(java.beans.PropertyChangeEvent pce)
pce
- the PropertyChangeEvent to be firedpublic void addVetoableChangeListener(java.beans.VetoableChangeListener vcl)
addVetoableChangeListener
in interface VetoableChangeReporter
vcl
- the VetoableChangeListener to be addedremoveVetoableChangeListener(java.beans.VetoableChangeListener)
,
addVetoableChangeListener(String,java.beans.VetoableChangeListener)
public void removeVetoableChangeListener(java.beans.VetoableChangeListener vcl)
removeVetoableChangeListener
in interface VetoableChangeReporter
vcl
- the VetoableChangeListener to be removedaddVetoableChangeListener(java.beans.VetoableChangeListener)
,
removeVetoableChangeListener(String,java.beans.VetoableChangeListener)
public void addVetoableChangeListener(java.lang.String propertyname, java.beans.VetoableChangeListener vcl)
addVetoableChangeListener
in interface VetoableChangeReporter
propertyname
- one of the property names listed abovevcl
- the VetoableChangeListener to be addedaddVetoableChangeListener(java.beans.VetoableChangeListener)
,
removeVetoableChangeListener(java.beans.VetoableChangeListener)
public void removeVetoableChangeListener(java.lang.String propertyname, java.beans.VetoableChangeListener vcl)
removeVetoableChangeListener
in interface VetoableChangeReporter
propertyname
- a valid property namevcl
- the VetoableChangeListener to be removedaddVetoableChangeListener(java.beans.VetoableChangeListener)
,
removeVetoableChangeListener(java.beans.VetoableChangeListener)
protected void fireVetoableChange(java.lang.String pn, java.lang.Object oldValue, java.lang.Object newValue) throws java.beans.PropertyVetoException
pn
- the name of the property that has changedoldValue
- the property's previous valuenewValue
- the property's new value
java.beans.PropertyVetoException
- if a
VetoableChangeListener
threw
PropertyVetoException
protected void fireVetoableChange(java.beans.PropertyChangeEvent pce) throws java.beans.PropertyVetoException
pce
- the PropertyChangeEvent to be fired
java.beans.PropertyVetoException
- if a
VetoableChangeListener
threw
PropertyVetoException
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |