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, getSubstance, isEnabled, onSetFocus, readValue, setAutoUpdate, setEditedType, setEmbedded, setEnabled, setField, setSubstance, sizeSpec |
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView |
closeForm, equalsView, equalsView, eventURL, eventURL, genBody, genEventAndActionButton, genPage, genStyleSheets, getBaseURL, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, iconElement, iconElement, isClosed, isDescendantOf, isInForm, openForm, printAttributes, setAttribute, setColumn, setContext, setDescription, setFactory, setFocus, setLabel, setMessage, setParameters, setParentView, setRow, setSize, setStyle, setStyleSheet, setTable, setType, setViewBorder, showButton, showFormButtons, showFormButtons |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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, setLabel, setMessage, setParentView, setSize, setStyle, setViewBorder |
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
getModel
public ComboBoxModel getModel()
- Gets the model containing the list of items the user can choose
from.
- Specified by:
getModel
in interface ReferenceEditor
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
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
close
public void close(boolean validate)
- 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()
- Description copied from interface:
ReferenceEditor
- Tells wether the user is allowed to enter a value which is not
in the list
- Specified by:
isEditable
in interface ReferenceEditor
- See Also:
ReferenceEditor.setEditable(boolean)
setEditable
public void setEditable(boolean editable)
- Specified by:
setEditable
in interface ReferenceEditor
- See Also:
ReferenceEditor.isEditable()
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