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

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.SingleElementChooserEditor

public class SingleElementChooserEditor
extends ExtendedEditor
implements CellEditorListener

Allows to select in the element chooser dialog only one element. Value of this editor is a String with the full name of the selected element.

Author:
TogetherSoft

Field Summary
 final static UnaryConditionFALSE_CONDITION
           Represents false UnaryCondition.

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

Constructor Summary
SingleElementChooserEditor(RwiElement rwiElement, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryOperation title)
           Constructs this editor which will be represented on UI as the SingleElementChooser.
SingleElementChooserEditor(RwiElement rwiElement, int selectorType)
           Constructs this editor which will be represented on UI as the SingleElementChooser.

Method Summary
 voiddoAction()
           Opens ElementsSelectorDialog in order to user could select neccessary the only RWI element.
 voideditingCanceled(ChangeEvent e)
           Called when user cancelled editing.
 voideditingStopped(ChangeEvent e)
           Called when user stopped editing.
 protected ObjectextractValueFromRwiElement(RwiElement rwiElement)
           

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

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

FALSE_CONDITION

public final static UnaryCondition FALSE_CONDITION
Represents false UnaryCondition.
See Also:
UnaryCondition
Constructor Detail

SingleElementChooserEditor

public SingleElementChooserEditor(RwiElement rwiElement, UnaryCondition displayFilter, UnaryCondition classFilter, boolean includeCurrentDiagram, UnaryOperation title)
Constructs this editor which will be represented on UI as the SingleElementChooser.
Parameters:
rwiElement - RWI element which has RwiPropertyMap
displayFilter - filters contents of the trees
classFilter - filters elements which can be choosen
includeCurrentDiagram - if true then the first tree will be started from the current diagram
title - calculates the dialog box title
See Also:
IdeSelectorDialogType

SingleElementChooserEditor

public SingleElementChooserEditor(RwiElement rwiElement, int selectorType)
Constructs this editor which will be represented on UI as the SingleElementChooser.
Parameters:
rwiElement - RWI element which has RwiPropertyMap
selectorType - predefined configuration of filters
See Also:
IdeSelectorDialogType
Method Detail

doAction

public void doAction()
Opens ElementsSelectorDialog in order to user could select neccessary the only RWI element. If used did not select any RwiElement then cancells editing.

editingCanceled

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

editingStopped

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

extractValueFromRwiElement

protected Object extractValueFromRwiElement(RwiElement rwiElement)

Association Links

to Class com.togethersoft.openapi.util.function.UnaryCondition

Represents false UnaryCondition.

see com.togethersoft.openapi.util.function.UnaryCondition

to Class com.togethersoft.openapi.rwi.RwiElement

to Class com.togethersoft.openapi.util.function.UnaryCondition

to Class com.togethersoft.openapi.util.function.UnaryCondition

to Class com.togethersoft.openapi.util.function.UnaryOperation