org.objectweb.jac.aspects.gui.web
Class AbstractFieldView

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.web.AbstractView
        |
        +--org.objectweb.jac.aspects.gui.web.AbstractFieldView
All Implemented Interfaces:
FieldUpdate, FieldView, View, ViewIdentity
Direct Known Subclasses:
AttachmentViewer, EnumViewer, FormatViewer, ImageURLViewer, MatrixView, PrimitiveField, ReferenceView, TextViewer

public abstract class AbstractFieldView
extends AbstractView
implements FieldUpdate, FieldView

Base class for field views


Field Summary
protected  boolean autoUpdate
           
protected  FieldItem field
           
protected  Object substance
           
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Constructor Summary
AbstractFieldView()
           
AbstractFieldView(Object substance, FieldItem field)
           
 
Method Summary
 void close(boolean validate)
          Close this view.
 void fieldUpdated(Object substance, FieldItem field, Object value, Object param)
          Upcalled when a field was modified.
 FieldItem getField()
           
 Object getSubstance()
          Gets the substance object holding the field
 void setAutoUpdate(boolean autoUpdate)
          Sets the auto-update property of the view.
 void setField(FieldItem field)
          Sets the field being displayed
 void setSubstance(Object substance)
          Sets the substance object holding the field
abstract  void setValue(Object value)
          Sets the value to display
 
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
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
equalsView, equalsView, getParameters, getType, setParameters, setType
 

Field Detail

substance

protected Object substance

field

protected FieldItem field

autoUpdate

protected boolean autoUpdate
Constructor Detail

AbstractFieldView

public AbstractFieldView(Object substance,
                         FieldItem field)

AbstractFieldView

public AbstractFieldView()
Method Detail

setValue

public abstract void setValue(Object value)
Description copied from interface: FieldView
Sets the value to display

Specified by:
setValue in interface FieldView
Parameters:
value - the value

setSubstance

public void setSubstance(Object substance)
Description copied from interface: FieldView
Sets the substance object holding the field

Specified by:
setSubstance in interface FieldView
Parameters:
substance - the substance
See Also:
FieldView.getSubstance()

getSubstance

public Object getSubstance()
Description copied from interface: FieldView
Gets the substance object holding the field

Specified by:
getSubstance in interface FieldView
See Also:
FieldView.setSubstance(Object)

setField

public void setField(FieldItem field)
Description copied from interface: FieldView
Sets the field being displayed

Specified by:
setField in interface FieldView
Parameters:
field - the field

getField

public FieldItem getField()
Specified by:
getField in interface FieldView
Returns:
the field item

setAutoUpdate

public void setAutoUpdate(boolean autoUpdate)
Description copied from interface: FieldView
Sets the auto-update property of the view. If auto-update is true (which is the default), the view registers for changes on field it displays.

Specified by:
setAutoUpdate in interface FieldView

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 AbstractView
Parameters:
validate - wether to validate any value contained in editors.

fieldUpdated

public void fieldUpdated(Object substance,
                         FieldItem field,
                         Object value,
                         Object param)
Description copied from interface: FieldUpdate
Upcalled when a field was modified.

Specified by:
fieldUpdated in interface FieldUpdate
Parameters:
substance - the object of which a field was updated
field - the updated field
value - new value of the vield
param - extra infos (unused)
See Also:
ViewControlWrapper.registerField(Wrappee,FieldItem,FieldUpdate,Object)