|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Interface to be implemented by a class of interface objects whose view state may be appropriate for input of various classes of model objects.
Most classes that implement this interface should also implement
the interface, but this is not
a requirement.Fragile
It is expected that a GeneralView will extend
JComponent so that it may installed in a GUI and
so that it may fire property change events. This requirement
is stronger than that for Displayable.
A GeneralView is a powerful and general input
component that must be capable of instantiating any
Stringable class of objects.
A class of input component that can only instantiate a single
class of Stringable objects should implement the
base TypedView interface.
Fragile| Field Summary |
| Fields inherited from interface edu.neu.ccs.gui.TypedView |
DATA_TYPE |
| Fields inherited from interface edu.neu.ccs.gui.Displayable |
DEFAULT_VIEW_STATE, VIEW_STATE |
| Method Summary | |
void |
addActionListener(ActionListener listener)
Adds an ActionListener. |
Stringable |
demandObject(Class dataType,
StringableFilter filter)
Returns a Stringable object based on the view state
of the view, the temporary data type and filter, and the mandatory
model. |
Stringable |
demandObject(StringableFilter filter)
Returns a Stringable object based on the view state
of the view, the temporary filter, and the mandatory model. |
StringableFilter |
getFilter()
Returns the current filter used by this view. |
GeneralView |
makeCopy()
Returns a copy of this GeneralView. |
void |
removeActionListener(ActionListener listener)
Removes an ActionListener. |
Stringable |
requestObject(Class dataType,
StringableFilter filter)
Returns a Stringable object based on the view state
of the view, the temporary data type and filter, and the optional
model. |
Stringable |
requestObject(StringableFilter filter)
Returns a Stringable object based on the view state
of the view, the temporary filter, and the optional model. |
void |
setDataType(Class dataType)
Sets the current class of objects returned when a model object is demanded or requested. |
void |
setErrorPromptTitleSuggestion(String errorPrompt,
String dialogTitle,
String suggestion)
Sets the three input property Strings for an error
dialog in a single method. |
void |
setFilter(StringableFilter filter)
Sets the current filter used by the view to the given StringableFilter. |
| Methods inherited from interface edu.neu.ccs.gui.TypedView |
demandObject, getDataType, getInputProperties, requestObject, setInputProperties |
| Methods inherited from interface edu.neu.ccs.gui.Displayable |
getDefaultViewState, getViewState, reset, setDefaultViewState, setEnabled, setViewState |
| Method Detail |
public void setDataType(Class dataType)
dataType - the new class of objects for model objects
Error - if the given data type is not assignable from
the Stringable reference typepublic GeneralView makeCopy()
Returns a copy of this GeneralView.
The purpose of this method is to provide a copy of the view
that may be used in error handling dialogs. The copy should,
as far as possible, have the same screen size and internal
settings. Each GeneralView should describe what
its makeCopy method actually does.
The copy should NOT share its internal document model with the original view. This will allow the copy to operate in an independent fashion from the original.
public void setFilter(StringableFilter filter)
filter - the filter to be usedpublic StringableFilter getFilter()
public Stringable demandObject(StringableFilter filter)
Stringable object based on the view state
of the view, the temporary filter, and the mandatory model.
filter - the temporary filter to use
Stringable model objectTypedView.demandObject(),
requestObject(Class, StringableFilter)
public Stringable requestObject(StringableFilter filter)
throws CancelledException
Stringable object based on the view state
of the view, the temporary filter, and the optional model.
filter - the temporary filter to use
Stringable model object
CancelledException - if the user cancelled
after an error was detected
CancelledExceptionTypedView.requestObject(),
demandObject(Class, StringableFilter)
public Stringable demandObject(Class dataType,
StringableFilter filter)
Stringable object based on the view state
of the view, the temporary data type and filter, and the mandatory
model.
Stringable model objectTypedView.demandObject(),
requestObject(Class, StringableFilter)
public Stringable requestObject(Class dataType,
StringableFilter filter)
throws CancelledException
Stringable object based on the view state
of the view, the temporary data type and filter, and the optional
model.
Stringable model object
CancelledException - if the user cancelled
after an error was detected
CancelledExceptionTypedView.requestObject(),
demandObject(Class, StringableFilter)
public void setErrorPromptTitleSuggestion(String errorPrompt,
String dialogTitle,
String suggestion)
Strings for an error
dialog in a single method.
errorPrompt - the error prompt of an error dialogdialogTitle - the dialog title of an error dialogsuggestion - the suggestion for an error dialogpublic void addActionListener(ActionListener listener)
ActionListener.
listener - the ActionListener that is to be notifiedremoveActionListener(ActionListener)public void removeActionListener(ActionListener listener)
ActionListener.
listener - the ActionListener to removeaddActionListener(ActionListener)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||