|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.aspects.gui.web.AbstractView | +--org.objectweb.jac.aspects.gui.web.AbstractCollection
Field Summary | |
protected boolean |
autoUpdate
|
protected CollectionItem |
collection
|
protected boolean |
isEditor
|
protected CollectionItemView |
itemView
|
protected CollectionModel |
model
|
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 | |
AbstractCollection()
|
|
AbstractCollection(ViewFactory factory,
DisplayContext context,
CollectionItem collection,
Object substance,
CollectionModel model,
CollectionItemView itemView)
|
Method Summary | |
protected void |
genAdderAndRemover(PrintWriter out)
Generate HTML for adder, remover, and prev/next buttons |
CollectionModel |
getCollectionModel()
Gets the associated collection model. |
FieldItem |
getField()
|
boolean |
isEditor()
Tells wether the view allows to edit the collection (i.e it has add/remove buttons) |
boolean |
isEnabled()
|
void |
onAddExistingToCollection()
Called when the user wants to add an object to the collection, without creating a new one even if the collection is "autocreate". |
void |
onAddToCollection()
Called when the user wants to add an object to the collection. |
void |
onFirst()
Display to the first page of items |
void |
onLast()
Display to the last page of items |
void |
onNext()
Display the next page of items |
void |
onPrevious()
Display the previous page of items |
void |
onRemove(int index)
Called when the user selects an item to remove it. |
void |
onRemoveFromCollection()
Called when the user wants to remove an object to the collection. |
void |
onTableInvoke(int index,
String methodName)
Called when a method is called on an object belonging to the collection. |
void |
onView(int index)
Called when the user selects an item to view it. |
void |
onView(Object object)
|
void |
onViewObject(String name)
Called when the user selects an item to view it. |
protected String |
removeLink(int position)
Returns an HTML link to remove the element at a given position. |
void |
setAutoUpdate(boolean autoUpdate)
Sets the auto-update property of the view. |
void |
setEditor(boolean isEditor)
Set the "editability" of the view. |
void |
setEnabled(boolean enabled)
|
void |
setField(FieldItem field)
Sets the field being displayed |
void |
setSelected(int index)
Sets the selected index of the collection view. |
void |
setSubstance(Object substance)
Sets the substance object holding the field |
void |
setValue(Object value)
Sets the value to display |
abstract void |
sort()
Sorts the collection with the column index stored in the context if any. |
protected String |
sortLink(int column,
String text)
Build an HTML link with an image showing if a column is used to sort the collection |
void |
updateModel(Object substance)
Updates the collection model |
protected String |
viewLink(int position)
|
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView |
close, 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.View |
close, 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 |
Field Detail |
protected CollectionItem collection
protected Object substance
protected CollectionModel model
protected boolean autoUpdate
protected boolean isEditor
protected CollectionItemView itemView
Constructor Detail |
public AbstractCollection(ViewFactory factory, DisplayContext context, CollectionItem collection, Object substance, CollectionModel model, CollectionItemView itemView)
public AbstractCollection()
Method Detail |
public void setSubstance(Object substance)
FieldView
setSubstance
in interface FieldView
substance
- the substancepublic CollectionModel getCollectionModel()
CollectionView
getCollectionModel
in interface CollectionView
public boolean isEditor()
CollectionView
isEditor
in interface CollectionView
CollectionView.setEditor(boolean)
public void setEditor(boolean isEditor)
CollectionView
setEditor
in interface CollectionView
CollectionView.isEditor()
public void setAutoUpdate(boolean autoUpdate)
FieldView
setAutoUpdate
in interface FieldView
public abstract void sort()
public void onView(Object object)
protected void genAdderAndRemover(PrintWriter out)
out
- print HTML code to this writerpublic void setSelected(int index)
CollectionView
setSelected
in interface CollectionView
index
- the new selected indexpublic void setField(FieldItem field)
FieldView
setField
in interface FieldView
field
- the fieldpublic FieldItem getField()
getField
in interface FieldView
public void setValue(Object value)
FieldView
setValue
in interface FieldView
value
- the valuepublic void updateModel(Object substance)
CollectionView
updateModel
in interface CollectionView
public void onView(int index)
CollectionListener
onView
in interface CollectionListener
index
- the index of the element to viewpublic void onViewObject(String name)
CollectionListener
onViewObject
in interface CollectionListener
name
- the name of the object to viewCollectionListener.onView(int)
public void onRemove(int index)
CollectionListener
onRemove
in interface CollectionListener
index
- the index of the element to removepublic void onTableInvoke(int index, String methodName)
CollectionListener
onTableInvoke
in interface CollectionListener
index
- the index of the element to viewmethodName
- the name of the method to invokepublic void onAddToCollection()
CollectionListener
onAddToCollection
in interface CollectionListener
CollectionListener.onAddExistingToCollection()
public void onAddExistingToCollection()
CollectionListener
onAddExistingToCollection
in interface CollectionListener
CollectionListener.onAddToCollection()
public void onRemoveFromCollection()
CollectionListener
onRemoveFromCollection
in interface CollectionListener
public void onNext()
CollectionListener
onNext
in interface CollectionListener
public void onLast()
CollectionListener
onLast
in interface CollectionListener
public void onPrevious()
CollectionListener
onPrevious
in interface CollectionListener
public void onFirst()
CollectionListener
onFirst
in interface CollectionListener
protected String removeLink(int position)
protected String viewLink(int position)
protected String sortLink(int column, String text)
column
- the index of the columntext
- additional text to put in the link
public boolean isEnabled()
public void setEnabled(boolean enabled)
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |