|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jac.aspects.gui.web.AbstractView
org.objectweb.jac.aspects.gui.web.AbstractFieldEditor
Base class for field editors
Field Summary | |
protected FieldItem |
field
|
protected boolean |
isEmbedded
|
protected MethodItem |
setter
|
protected Object |
substance
|
protected ClassItem |
type
|
protected Object |
value
|
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView |
column, context, description, height, isCellViewer, label, parentView, row, table, width |
Constructor Summary | |
AbstractFieldEditor(Object substance,
FieldItem field)
|
Method Summary | |
void |
close(boolean validate)
Close this view. |
void |
commit()
Commit editing by calling the setter method. |
protected abstract boolean |
doReadValue(Object parameter)
|
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 |
Object |
getValue()
Gets the value of the edited object. |
boolean |
isEnabled()
|
void |
onSetFocus(Object param)
Called when the focus is given to the editor |
boolean |
readValue(Object parameter)
|
void |
setAutoUpdate(boolean autoUpdate)
Sets the auto-update property of the view. |
void |
setEditedType(ClassItem type)
Sets the type of the edited value |
void |
setEmbedded(boolean isEmbedded)
Sets wether the editor is embedded in a view. |
void |
setEnabled(boolean enabled)
|
void |
setField(FieldItem field)
Sets the field being displayed |
void |
setSubstance(Object substance)
Sets the substance object holding the field |
void |
setValue(Object value)
Sets the value to display |
protected String |
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 |
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity |
equalsView, equalsView, getParameters, getType, setParameters, setType |
Field Detail |
protected Object substance
protected FieldItem field
protected ClassItem type
protected MethodItem setter
protected Object value
protected boolean isEmbedded
Constructor Detail |
public AbstractFieldEditor(Object substance, FieldItem field)
Method Detail |
public Object getValue()
FieldEditor
getValue
in interface FieldEditor
public void setValue(Object value)
FieldView
setValue
in interface FieldView
value
- the valuepublic void setSubstance(Object substance)
FieldView
setSubstance
in interface FieldView
substance
- the substanceFieldView.getSubstance()
public Object getSubstance()
FieldView
getSubstance
in interface FieldView
FieldView.setSubstance(Object)
public void setEditedType(ClassItem type)
FieldEditor
setEditedType
in interface FieldEditor
type
- the type of the edited valuepublic void setField(FieldItem field)
FieldView
setField
in interface FieldView
field
- the fieldpublic FieldItem getField()
getField
in interface FieldView
public void setAutoUpdate(boolean autoUpdate)
FieldView
setAutoUpdate
in interface FieldView
public void setEmbedded(boolean isEmbedded)
FieldEditor
setEmbedded
in interface FieldEditor
public void close(boolean validate)
View
close
in interface View
close
in class AbstractView
public void onSetFocus(Object param)
FieldEditor
onSetFocus
in interface FieldEditor
param
- an optional parameterpublic boolean readValue(Object parameter)
protected abstract boolean doReadValue(Object parameter)
public void commit()
commit
in interface FieldEditor
public void fieldUpdated(Object substance, FieldItem field, Object value, Object param)
FieldUpdate
fieldUpdated
in interface FieldUpdate
substance
- the object of which a field was updatedfield
- the updated fieldvalue
- new value of the vieldparam
- extra infos (unused)ViewControlWrapper.registerField(Wrappee,FieldItem,FieldUpdate,Object)
public boolean isEnabled()
isEnabled
in interface FieldEditor
public void setEnabled(boolean enabled)
setEnabled
in interface FieldEditor
protected String sizeSpec()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |