|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor
org.openbp.jaspira.propertybrowser.editor.standard.SelectionEditor
public class SelectionEditor
A property editor for collection of strings, displayed in a combo box. The combo box by default is NOT editable, unless otherwise specified in the XML property file assigned to the specified object.
| Field Summary |
|---|
| Fields inherited from class org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor |
|---|
component, listener, object, owner, parameterParser, params, propertyBrowser, propertyName, readonly, validator, value, valueChanged, valueLoaded |
| Fields inherited from interface org.openbp.common.generic.Copyable |
|---|
COPY_DEEP, COPY_FIRST_LEVEL, COPY_SHALLOW |
| Constructor Summary | |
|---|---|
SelectionEditor()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
Action performed. |
void |
addSelectionValue(DescriptionObject selectionValue)
Adds a selection value. |
void |
addSelectionValue(java.lang.String selectionName)
Adds a selection value. |
void |
addSelectionValue(java.lang.String selectionName,
java.lang.String selectionValue)
Adds a selection value. |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
Gives notification that an attribute or set of attributes changed. |
void |
clearSelectionValues()
Clears the list of combo box values. |
void |
createComponent()
Creates the editor component of the property editor. |
java.lang.Object |
getComponentValue()
Gets the current editor component value. |
int |
getNumberOfSelectionValues()
Gets the number of selection values. |
DescriptionObject |
getSelectionValueAt(int index)
Gets a selection value by its collection index. |
java.util.List |
getSelectionValueList()
Gets the list of combo box values. |
java.util.Iterator |
getSelectionValues()
Gets the list of combo box values. |
void |
highlight(boolean on)
Highlights the content of the component. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
Gives notification that there was an insert into the document. |
boolean |
isEditable()
Gets the editable flag. |
void |
keyPressed(java.awt.event.KeyEvent e)
Invoked when a key has been pressed. |
protected void |
parseParams(EditorParameterParser parser)
Parses the editor parameters specified in the property descriptor. |
void |
popupStateChanged(PopupEvent e)
|
void |
removeUpdate(javax.swing.event.DocumentEvent e)
Gives notification that a portion of the document has been removed. |
void |
setComponentValue()
Sets the display component value. |
void |
setEditable(boolean editable)
Sets the editable flag. |
void |
setSelectionValueList(java.util.List selectionValueList)
Sets the list of combo box values. |
| Methods inherited from class org.openbp.jaspira.propertybrowser.editor.AbstractPropertyEditor |
|---|
clone, copyFrom, focusGained, focusLost, forwardKeyEvent, getComponent, getObject, getOwner, getParameterParser, getParams, getPropertyBrowser, getPropertyComponent, getPropertyName, getSafeString, getValidator, getValue, initialize, initializeComponent, isReadonly, keyReleased, keyTyped, loadProperty, propertyChanged, resetComponentDisplay, resetProperty, saveProperty, setObject, setOwner, setParams, setPropertyBrowser, setPropertyName, setReadonly, setValidator, setValue, validateProperty |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SelectionEditor()
| Method Detail |
|---|
protected void parseParams(EditorParameterParser parser)
parseParams in class AbstractPropertyEditorparser - Editor parameter parser or null if there are no parameters definedpublic void createComponent()
createComponent in class AbstractPropertyEditorpublic void setComponentValue()
setComponentValue in class AbstractPropertyEditorpublic java.lang.Object getComponentValue()
getComponentValue in class AbstractPropertyEditorpublic void highlight(boolean on)
highlight in class AbstractPropertyEditoron - true Turns the highlight on if the component has the focuspublic boolean isEditable()
public void setEditable(boolean editable)
public java.util.Iterator getSelectionValues()
DescriptionObject objectspublic int getNumberOfSelectionValues()
public DescriptionObject getSelectionValueAt(int index)
index - Collection index (must be in the range [0..getNumberOfSelectionValues()]
public void addSelectionValue(java.lang.String selectionName,
java.lang.String selectionValue)
selectionName - The name of the selectionselectionValue - The selection value to addpublic void addSelectionValue(java.lang.String selectionName)
selectionName - The name and value of the selectionpublic void addSelectionValue(DescriptionObject selectionValue)
selectionValue - The selection value to addpublic void clearSelectionValues()
public java.util.List getSelectionValueList()
DescriptionObject objects or nullpublic void setSelectionValueList(java.util.List selectionValueList)
selectionValueList - A list of DescriptionObject objects or nullpublic void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed in interface java.awt.event.ActionListenerpublic void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate in interface javax.swing.event.DocumentListenere - Document eventpublic void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate in interface javax.swing.event.DocumentListenere - Document eventpublic void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate in interface javax.swing.event.DocumentListenere - Document eventpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerkeyPressed in class AbstractPropertyEditorpublic void popupStateChanged(PopupEvent e)
popupStateChanged in interface PopupListener(PopupEvent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||