edu.neu.ccs.gui
Interface TypedView

All Superinterfaces:
Displayable
All Known Subinterfaces:
GeneralView
All Known Implementing Classes:
ArrayPanel, BooleanView, ColorView, DropdownView, FileView, InputDialog.CompoundView, OptionsView, SliderView, StringViewer, TextAreaView, TextFieldView

public interface TypedView
extends Displayable

Interface to be implemented by a class of interface objects whose data state is appropriate for input of a particular class of model objects. Certain classes that implement this interface should also implement the Fragile interface, but this is not a requirement.

Since:
1.0
Version:
2.3
See Also:
GeneralView

Field Summary
static String DATA_TYPE
          Bound property name for the Stringable type returned by a typed view or general view.
 
Fields inherited from interface edu.neu.ccs.gui.Displayable
DEFAULT_VIEW_STATE, VIEW_STATE
 
Method Summary
 Stringable demandObject()
          Returns a Stringable object based on the view state of the view using the mandatory model.
 Class getDataType()
          Returns the current class of objects returned when a model object is demanded or requested.
 InputProperties getInputProperties()
          Returns the input properties for this view.
 Stringable requestObject()
          Returns a Stringable object based on the view state of the view using the optional model; throws an exception if the input operation is cancelled by the user.
 void setInputProperties(InputProperties properties)
          Sets the input properties for this view to the provided input properties.
 
Methods inherited from interface edu.neu.ccs.gui.Displayable
getDefaultViewState, getViewState, reset, setDefaultViewState, setEnabled, setViewState
 

Field Detail

DATA_TYPE

public static final String DATA_TYPE
Bound property name for the Stringable type returned by a typed view or general view.

See Also:
Constant Field Values
Method Detail

getDataType

public Class getDataType()
Returns the current class of objects returned when a model object is demanded or requested.

Returns:
the current class of a model object

demandObject

public Stringable demandObject()
Returns a Stringable object based on the view state of the view using the mandatory model.

Returns:
a Stringable model object
See Also:
requestObject()

requestObject

public Stringable requestObject()
                         throws CancelledException
Returns a Stringable object based on the view state of the view using the optional model; throws an exception if the input operation is cancelled by the user.

Returns:
a Stringable model object
Throws:
CancelledException - if the user cancelled after an error was detected
CancelledException
See Also:
demandObject()

setInputProperties

public void setInputProperties(InputProperties properties)

Sets the input properties for this view to the provided input properties.

If the given input properties list is null, the property list for this view is set to the base property list containing default property values.

Parameters:
properties - the new input properties for the view
See Also:
getInputProperties()

getInputProperties

public InputProperties getInputProperties()
Returns the input properties for this view.

Returns:
the input properties
See Also:
setInputProperties(InputProperties)