|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.jdeveloper.audit.bean.PropertyItem oracle.jdeveloper.audit.bean.PropertyField oracle.jdeveloper.audit.bean.AbstractEnumerationField
public abstract class AbstractEnumerationField
An abstract property field for types to be presented in a combo box. Note
that a default implementation is supplied for types which implement
the marker interface TypeSafeEnumeration
and follow the conventions described there. Additional
implementations can be supplied to support the display of other enumerating
types, in particular dynamic ones that cannot be fit into the
TypeSafeEnumeration
conventions.
For example, the field that allows the "Default Fix" to be selected is a
subclass of AbstractEnumerationField
which accepts a rule instance
in its constructor and overrides the stringOf(java.lang.Object)
and valueOf(java.lang.String)
to map between the rule's transforms and their names, and between
null
and "None". A BeanCustomizer
associated with the
Rule
class sets up this field.
Constructor Summary | |
---|---|
AbstractEnumerationField()
Creates an enumeration property field. |
|
AbstractEnumerationField(java.lang.String[] enumerals)
Creates an enumeration property field with an initial set of enumerals. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
|
void |
addListDataListener(javax.swing.event.ListDataListener listener)
|
void |
fireContentsChanged(int index0,
int index1)
|
void |
fireIntervalAdded(int index0,
int index1)
|
void |
fireIntervalRemoved(int index0,
int index1)
|
java.awt.Component |
getComponent()
|
java.lang.Object |
getElementAt(int index)
|
java.lang.Object |
getSelectedItem()
|
int |
getSize()
|
java.lang.Object |
getValue()
The AbstractEnumerationField implementation maps the text selected
by the user to a value by invoking valueOf(java.lang.String) . |
void |
removeListDataListener(javax.swing.event.ListDataListener listener)
|
void |
setEnumerals(java.lang.String[] newValue)
Sets the enumerals allowed for this property. |
void |
setSelectedItem(java.lang.Object item)
|
void |
setValue(java.lang.Object value)
The AbstractEnumerationField implementation maps the value to the
text presented to the user by invoking stringOf(java.lang.Object) . |
java.lang.String |
stringOf(java.lang.Object value)
Gets the presentation string for a value of the property type. |
java.lang.Object |
valueOf(java.lang.String text)
Gets the value of the property type corresponding to a presentation string. |
Methods inherited from class oracle.jdeveloper.audit.bean.PropertyField |
---|
addFieldListener, apply, equals, fireFieldChanged, fireFieldCommitted, fireFieldEntered, fireFieldExited, focusGained, focusLost, getDescriptor, getType, handleException, load, removeFieldListener, setDescriptor, setType, toString |
Methods inherited from class oracle.jdeveloper.audit.bean.PropertyItem |
---|
getLabel, getLabelText, getMnemonic, getMnemonicIndex, getName, setLabelText, setMnemonic, setMnemonicIndex, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractEnumerationField()
public AbstractEnumerationField(java.lang.String[] enumerals)
enumerals
- The text to be displayed for each enumeral allowed for
this property.Method Detail |
---|
public void setEnumerals(java.lang.String[] newValue)
newValue
- The text to be displayed for each enumeral allowed for
this property.public void setValue(java.lang.Object value)
AbstractEnumerationField
implementation maps the value to the
text presented to the user by invoking stringOf(java.lang.Object)
.
setValue
in class PropertyField
public java.lang.Object getValue()
AbstractEnumerationField
implementation maps the text selected
by the user to a value by invoking valueOf(java.lang.String)
.
getValue
in class PropertyField
public java.awt.Component getComponent()
The AbstractEnumerationField
implementation returns a combo
box created by the constructor with this field as its co
getComponent
in class PropertyItem
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public java.lang.Object valueOf(java.lang.String text)
AbstractEnumerationField
implementation simply returns the
text, and so must be overridden unless the property type is String
.
public java.lang.String stringOf(java.lang.Object value)
AbstractEnumerationField
implementation simply casts the value
to String
, and so must be overridden unless the property type is
String
.
public java.lang.Object getSelectedItem()
getSelectedItem
in interface javax.swing.ComboBoxModel
public void setSelectedItem(java.lang.Object item)
setSelectedItem
in interface javax.swing.ComboBoxModel
public java.lang.Object getElementAt(int index)
getElementAt
in interface javax.swing.ListModel
public int getSize()
getSize
in interface javax.swing.ListModel
public void addListDataListener(javax.swing.event.ListDataListener listener)
addListDataListener
in interface javax.swing.ListModel
public void removeListDataListener(javax.swing.event.ListDataListener listener)
removeListDataListener
in interface javax.swing.ListModel
public void fireIntervalAdded(int index0, int index1)
public void fireIntervalRemoved(int index0, int index1)
public void fireContentsChanged(int index0, int index1)
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.0.0) E17493-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |