wt.clients.iba.widgets
Interface InlineValueEditorWidgetInterface

All Known Implementing Classes:
InlineBooleanValueEditorWidget, InlineDefaultValueEditorWidget, InlineRankingValueEditorWidget, InlineRatioValueEditorWidget, InlineReferenceValueEditorWidget, InlineUnitValueEditorWidget, InlineURLValueEditorWidget

public interface InlineValueEditorWidgetInterface

Interface for all the Inline Value Editor Widget.


Method Summary
 void addKeyListener(KeyListener listener)
          Add the key listener to the JComponent inside the widget.
 InlineValueEditorWidgetInterface createNewWidget()
          Create a new widget will the same type as itself.
 AttributeDefDefaultView getAttributeDefinition()
          Return the Attribute Definition.
 AbstractValueView[] getNewValues()
          Get the new values.
 AbstractValueView getShownValue()
          Get the currently shown value from the widget.
 String getToolTipText()
           
 boolean isDirty()
          Return whether the widget has changed or not.
 boolean isWidgetEnabled()
          Return whether the widget is enabled or not.
 void removeKeyListener(KeyListener listener)
          Remove the KeyListener from the JComponent inside the widget.
 void removeShownValue()
          Remove the shown value.
 void setAttributeDefinition(AttributeDefDefaultView definition)
          Set the Attribute Definition.
 void setDirty(boolean dirty)
           
 void setMultiLineToolTip(String tooltip)
          Set the tooltip text to the JComponent inside the widget.
 void setShownValue(AbstractValueView obj)
          Set the AbstractValueView to be displayed in the widget.
 void setWidgetEnabled(boolean enabled)
          Change the widget state from enabled to disabled.
 

Method Detail

getShownValue

public AbstractValueView getShownValue()
                                throws ActionAbortedException
Get the currently shown value from the widget. The return type will be AbstractValueView. Proper conversion will be done from String to different data types before saving into the AbstractValueView object.

Returns:
AbstractValueView
Throws:
ActionAbortedException

getNewValues

public AbstractValueView[] getNewValues()
                                 throws ActionAbortedException
Get the new values. If there is no AbstractValueView object associated with the widget, an AbstractValueView object will be created and the displaying value will be saved into this object. Because of the multiple values created in the Reference widget, it will return an array containing all the new objects.

Returns:
AbstractValueView[]
Throws:
ActionAbortedException

setShownValue

public void setShownValue(AbstractValueView obj)
                   throws ActionAbortedException
Set the AbstractValueView to be displayed in the widget.

Parameters:
obj -
Throws:
ActionAbortedException

removeShownValue

public void removeShownValue()
Remove the shown value. It will remove the cache inside the widget and also remove the textfield entries if any.


setWidgetEnabled

public void setWidgetEnabled(boolean enabled)
Change the widget state from enabled to disabled. For buttons, it will be disabled. For textfields, it will be non-editable.

Parameters:
enabled -

isWidgetEnabled

public boolean isWidgetEnabled()
Return whether the widget is enabled or not.

Returns:
boolean

createNewWidget

public InlineValueEditorWidgetInterface createNewWidget()
Create a new widget will the same type as itself. Definition will be passed to the new widget.

Returns:
InlineValueEditorWidgetInterface

setMultiLineToolTip

public void setMultiLineToolTip(String tooltip)
Set the tooltip text to the JComponent inside the widget. The tooltip can be multiple lines.

Parameters:
tooltip -

getToolTipText

public String getToolTipText()
Returns:
String

addKeyListener

public void addKeyListener(KeyListener listener)
Add the key listener to the JComponent inside the widget.

Parameters:
listener -

removeKeyListener

public void removeKeyListener(KeyListener listener)
Remove the KeyListener from the JComponent inside the widget.

Parameters:
listener -

setDirty

public void setDirty(boolean dirty)
Parameters:
dirty -

isDirty

public boolean isDirty()
Return whether the widget has changed or not.

Returns:
boolean

setAttributeDefinition

public void setAttributeDefinition(AttributeDefDefaultView definition)
Set the Attribute Definition.

Parameters:
definition -

getAttributeDefinition

public AttributeDefDefaultView getAttributeDefinition()
Return the Attribute Definition.

Returns:
AttributeDefDefaultView