JAC project
AOPSYS
CEDRIC & LIP6 labs

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

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.web.AbstractView
        |
        +--org.objectweb.jac.aspects.gui.web.AbstractFieldView
              |
              +--org.objectweb.jac.aspects.gui.web.ReferenceView
All Implemented Interfaces:
FieldUpdate, FieldView, HTMLViewer, ObjectUpdate, SelectionListener, View, ViewIdentity

public class ReferenceView
extends AbstractFieldView
implements FieldView, FieldUpdate, ObjectUpdate, HTMLViewer, SelectionListener

This class defines a Swing component view for references in objects.

By default this view constructs an embedded JLabel containing the string representation of the referenced object. However, the field can be attributed to be displayed with a customized rendering by the GUI aspect component.

See Also:
GuiAC, FieldView

Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractFieldView
autoUpdate
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Constructor Summary
ReferenceView()
           
ReferenceView(Object value, Object substance, FieldItem reference)
          Constructs a new reference view.
 
Method Summary
 void close()
          Close this view.
 void fieldUpdated(Object substance, FieldItem field, Object value, Object param)
          Upcalled when a field was modified.
 void genHTML(PrintWriter out)
          Generate the HTML code for the editor.
 void objectUpdated(Object object, Object param)
          The callback method.
 void onSelection()
          Called when an object is selected.
 void refreshView()
           
 void setEventURL(String eventURL)
          Set the URL to link to.
 void setValue(Object value)
          Sets the value to display
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractFieldView
getField, setAutoUpdate, 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jac.aspects.gui.FieldView
getField, setAutoUpdate, setField, setSubstance
 
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
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
getParameters, getType, setParameters, setType
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Constructor Detail

ReferenceView

public ReferenceView(Object value,
                     Object substance,
                     FieldItem reference)
Constructs a new reference view.

Parameters:
substance - the object the viewed field belongs to

ReferenceView

public ReferenceView()
Method Detail

refreshView

public void refreshView()

setEventURL

public void setEventURL(String eventURL)
Set the URL to link to.


setValue

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

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

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 AbstractFieldView

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
Overrides:
fieldUpdated in class AbstractFieldView
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)

objectUpdated

public void objectUpdated(Object object,
                          Object param)
Description copied from interface: ObjectUpdate
The callback method.

Specified by:
objectUpdated in interface ObjectUpdate
Parameters:
object - the updated object
param - extra data
See Also:
ViewControlWrapper.registerObject(Wrappee,ObjectUpdate,Object)

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.

onSelection

public void onSelection()
Description copied from interface: SelectionListener
Called when an object is selected.

Specified by:
onSelection in interface SelectionListener

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli