edu.neu.ccs.gui
Interface Displayable

All Known Subinterfaces:
GeneralView, TypedView
All Known Implementing Classes:
ArrayPanel, BooleanView, ColorView, DisplayPanel, Dropdown, DropdownView, FileView, InputDialog.CompoundView, OptionsView, RadioPanel, ScrollableDisplay, SliderView, StringViewer, TextAreaView, TextFieldView, XObjectView

public interface Displayable

Interface to be implemented by a Component whose input widget values (view state) can be translated to and from a String represenatation.

This interface is the equivalent for view objects to what the Stringable interface represents for model objects.

The functionality of the entire GUI package of the JPT assumes that each classes implementing this interface is a derived class of Component, although this requirement cannot be policed by a compiler.

Since:
1.0
Version:
2.3
See Also:
Stringable

Field Summary
static String DEFAULT_VIEW_STATE
          Bound property name for the default view state of a Displayable object.
static String VIEW_STATE
          Bound property name for the view state of a Displayable object.
 
Method Summary
 String getDefaultViewState()
          Returns a String representation of the default view state for this object.
 String getViewState()
          Returns a String representation of the view state for this object.
 void reset()
          Resets the view state of this object to the default view state for this object.
 void setDefaultViewState(String data)
          Sets the default view state for this object to the data state represented by the given String data.
 void setEnabled(boolean isEnabled)
          Sets whether or not this object is enabled.
 void setViewState(String data)
          Sets the view state for this object to the data state represented by the given String data.
 

Field Detail

VIEW_STATE

public static final String VIEW_STATE
Bound property name for the view state of a Displayable object.

See Also:
Constant Field Values

DEFAULT_VIEW_STATE

public static final String DEFAULT_VIEW_STATE
Bound property name for the default view state of a Displayable object.

See Also:
Constant Field Values
Method Detail

setViewState

public void setViewState(String data)
Sets the view state for this object to the data state represented by the given String data.

Parameters:
data - the new view state for this object
See Also:
getViewState()

getViewState

public String getViewState()
Returns a String representation of the view state for this object.

Returns:
the view state as a String
See Also:
setViewState(String)

setDefaultViewState

public void setDefaultViewState(String data)
Sets the default view state for this object to the data state represented by the given String data.

Parameters:
data - the new default data state for this object
See Also:
getDefaultViewState(), reset()

getDefaultViewState

public String getDefaultViewState()
Returns a String representation of the default view state for this object.

Returns:
the default view state as a String
See Also:
setDefaultViewState(String), reset()

reset

public void reset()

Resets the view state of this object to the default view state for this object.

Equivalent to: setViewState(getDefaultViewState()).

See Also:
setViewState(String), getDefaultViewState()

setEnabled

public void setEnabled(boolean isEnabled)
Sets whether or not this object is enabled.

Parameters:
isEnabled - whether or not this object is enabled