org.objectweb.jac.aspects.gui.web
Class ObjectChooser
java.lang.Object
|
+--org.objectweb.jac.aspects.gui.web.AbstractView
|
+--org.objectweb.jac.aspects.gui.web.AbstractFieldEditor
|
+--org.objectweb.jac.aspects.gui.web.ObjectChooser
- All Implemented Interfaces:
- ChoiceListener, FieldEditor, FieldUpdate, FieldView, HTMLEditor, HTMLViewer, ReferenceEditor, View, ViewIdentity
- public class ObjectChooser
- extends AbstractFieldEditor
- implements HTMLEditor, ChoiceListener, ReferenceEditor
This is a special value editor that allows the user to choose a
value within a set of object of a given type.
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractFieldEditor |
commit, fieldUpdated, getField, isEnabled, onSetFocus, readValue, setAutoUpdate, setEmbedded, setEnabled, setField, setSubstance |
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView |
equals, eventURL, eventURL, genBody, genPage, genStyleSheets, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, hashCode, iconElement, iconElement, isClosed, isDescendantOf, isInForm, printAttributes, setAttribute, setColumn, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParameters, setParentView, setRow, setStyle, setStyleSheet, setTable, setType, setViewBorder, setWidth, validate |
Methods inherited from interface org.objectweb.jac.aspects.gui.View |
getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParentView, setStyle, setViewBorder, setWidth, validate |
ObjectChooser
public ObjectChooser(Object substance,
FieldItem reference,
ComboBoxModel model,
boolean isEditable)
- Constructs a new object chooser.
- Parameters:
substance
- reference
- the subtance reference that is affected by this
chooser (can be null)isEditable
- should the user be allowed to enter a new value
setValue
public void setValue(Object value)
- Description copied from interface:
FieldView
- Sets the value to display
- Specified by:
setValue
in interface FieldView
- Overrides:
setValue
in class AbstractFieldEditor
- Parameters:
value
- the value
getValue
public Object getValue()
- Description copied from interface:
FieldEditor
- Gets the value of the edited object.
- Specified by:
getValue
in interface FieldEditor
- Overrides:
getValue
in class AbstractFieldEditor
- Returns:
- an object of the edited type
close
public void close()
- Description copied from interface:
View
- Close this view. This should be upcalled when the view is closed
in order to free resources or close other dependant views.
- Specified by:
close
in interface View
- Overrides:
close
in class AbstractFieldEditor
isEditable
public boolean isEditable()
- Specified by:
isEditable
in interface ReferenceEditor
setEditable
public void setEditable(boolean editable)
- Specified by:
setEditable
in interface ReferenceEditor
genHTML
public void genHTML(PrintWriter out)
- Description copied from interface:
HTMLViewer
- Generate the HTML code for the editor.
- Specified by:
genHTML
in interface HTMLViewer
- Parameters:
out
- the writer where to write the HTML code.
doReadValue
protected boolean doReadValue(Object parameter)
- Specified by:
doReadValue
in class AbstractFieldEditor
onCreateObject
public void onCreateObject()
- Specified by:
onCreateObject
in interface ChoiceListener