com.togethersoft.openapi.ide.inspector.util.editors
Class MultiValueEditor

java.lang.Object
  |
  +--java.beans.PropertyEditorSupport
        |
        +--com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
              |
              +--com.togethersoft.openapi.ide.inspector.util.editors.ExtendedEditor
                    |
                    +--com.togethersoft.openapi.ide.inspector.util.editors.MultiValueEditor
Direct Known Subclasses:
PropertyMapMultiValueElementChooserEditor, PropertyMapMultiValueTableEditor, RwiPropertyMultiValueElementChooserEditor, RwiPropertyMultiValueTableEditor

public abstract class MultiValueEditor
extends ExtendedEditor

Represents ExtendedEditor for the multi value property.

Author:
TogetherSoft

Field Summary
 protected VectormyValuesVector
           

Fields inherited from class com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
MEDIUM_DIMENSION, panel, SMALL_DIMENSION

Constructor Summary
MultiValueEditor()
           Creates editor without a title.
MultiValueEditor(String dialogTitle)
           Creates editor with a title.

Method Summary
 protected StringconvertAtomicValueToString(Object atomicValue)
           
 protected ObjectconvertStringToAtomicValue(String stringValue)
           
 StringconvertValueToString(Object value)
           Converts value to the string representation.
 voiddoAction()
           Opens extended dialog to edit multiple values.
 voideditingCanceled(ChangeEvent e)
           Called when user cancelled editing.
 voideditingStopped(ChangeEvent e)
           Called when user cancelled editing.
 protected voidfilterValues(Vector valuesVector)
           Removes empty values from the multiple value property.
 protected abstract MultiValueUIgetUI()
           Returns UI component which represents this editor.
 ObjectgetValue()
           Fecthes edited value.
 voidsetValue(Object value)
           Sets value to the inner editor.

Methods inherited from class com.togethersoft.openapi.ide.inspector.util.editors.ExtendedEditor
getChooserType, getInnerEditor

Methods inherited from class com.togethersoft.openapi.ide.inspector.util.editors.SwingEditorSupport
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCustomEditor, init, removeCellEditorListener, setAlignment, supportsCustomEditor

Methods inherited from class java.beans.PropertyEditorSupport
isPaintable, paintValue, getJavaInitializationString, getAsText, setAsText, getTags, addPropertyChangeListener, removePropertyChangeListener, firePropertyChange

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize

Field Detail

myValuesVector

protected Vector myValuesVector
Constructor Detail

MultiValueEditor

public MultiValueEditor()
Creates editor without a title.

MultiValueEditor

public MultiValueEditor(String dialogTitle)
Creates editor with a title.
Method Detail

convertAtomicValueToString

protected String convertAtomicValueToString(Object atomicValue)

convertStringToAtomicValue

protected Object convertStringToAtomicValue(String stringValue)

convertValueToString

public String convertValueToString(Object value)
Converts value to the string representation.

doAction

public void doAction()
Opens extended dialog to edit multiple values.

editingCanceled

public void editingCanceled(ChangeEvent e)
Called when user cancelled editing.

editingStopped

public void editingStopped(ChangeEvent e)
Called when user cancelled editing.

filterValues

protected void filterValues(Vector valuesVector)
Removes empty values from the multiple value property.

getUI

protected abstract MultiValueUI getUI()
Returns UI component which represents this editor.

getValue

public Object getValue()
Fecthes edited value. If situation occured when the user was typing in the text editor and then clicked another cell then send ChangeEvent to itself by calling of EditingStopped metho.

setValue

public void setValue(Object value)
Sets value to the inner editor. Before that converts value to string representation.

Association Links

to Class java.util.Vector

to Class com.togethersoft.openapi.ide.inspector.util.editors.MultiValueUI

Label Delegates the UI handling
Supplier Role returns the Vector of atomic values MultiValueEditor uses to set as Value
Is directed

to Class java.lang.String