|
|||||||||||
| 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
| Field Summary | |
protected int |
column
|
protected DisplayContext |
context
|
protected String |
description
|
protected int |
height
|
protected boolean |
isCellViewer
row number, for TableCellViewer |
protected String |
label
|
protected View |
parentView
|
protected int |
row
|
protected View |
table
|
protected int |
width
|
| Constructor Summary | |
AbstractView()
|
|
AbstractView(ViewFactory factory,
DisplayContext context)
|
|
| Method Summary | |
void |
close(boolean validate)
Close this view. |
protected void |
closeForm(PrintWriter out)
|
boolean |
equalsView(String type,
Object[] parameters)
|
boolean |
equalsView(ViewIdentity view)
Tells if a view is the same as another one, ie it has the same type and parameters. |
protected String |
eventURL(String event)
Build the base URL for an event |
protected Composite |
eventURL(String text,
String event,
String params)
Build an HTML element for an event. |
protected void |
genBody(PrintWriter out)
Override this method to generate the body of an HTML page. |
protected void |
genEventAndActionButton(PrintWriter out,
String event)
|
protected void |
genPage(PrintWriter out)
Generate an HTML page, with full headers |
protected void |
genStyleSheets(PrintWriter out,
CustomizedView customized)
|
protected String |
getBaseURL()
|
String |
getCloseBorder()
|
DisplayContext |
getContext()
|
String |
getDescription()
Get the value of description. |
ViewFactory |
getFactory()
Gets the factory. |
protected String |
getId()
|
protected String |
getId(View view)
|
String |
getLabel()
Gets the view's label (identifier). |
MethodItem |
getMessage()
Get the value of message. |
String |
getOpenBorder()
|
Object[] |
getParameters()
The parameters that were used to compile the view. |
View |
getParentView()
Get the value of parent. |
View |
getRootView()
Gets the ancestor view whose parent is null |
String |
getStyle()
Gets the user-defined style for this view. |
String |
getType()
Gets the view type. |
Border |
getViewBorder()
Get the value of viewBorder. |
protected Element |
iconElement(String icon,
String alt)
Builds an |
protected Element |
iconElement(String icon,
String alt,
boolean showAlt)
Builds an |
boolean |
isClosed()
Tells if this view has been closed by the GUI or the user. |
boolean |
isDescendantOf(View ancestor)
Tells wether this view has a given view in its ancestors |
protected boolean |
isInForm()
Are we in a |
protected void |
openForm(PrintWriter out)
|
protected void |
printAttributes(PrintWriter out)
|
void |
setAttribute(String name,
String value)
|
void |
setColumn(int column)
|
void |
setContext(DisplayContext context)
Sets the display context for this view. |
void |
setDescription(String v)
Set the value of description. |
void |
setFactory(ViewFactory factory)
Sets the factory for this view (WEB, SWING or other supported factory). |
void |
setFocus(FieldItem field,
Object option)
Focus a field of an object's view. |
void |
setHeight(int height)
Sets the prefered height for this view. |
void |
setLabel(String label)
Sets the label (the identifier) of the view. |
void |
setMessage(MethodItem v)
Set the value of message. |
void |
setParameters(Object[] parameters)
Sets the parameters that were used to construct the view. |
void |
setParentView(View v)
Set the value of parent. |
void |
setRow(int row)
|
void |
setStyle(String style)
Sets the view style. |
void |
setStyleSheet(String styleSheet)
|
void |
setTable(View table)
|
void |
setType(String type)
Set the view type. |
void |
setViewBorder(Border v)
Set the value of viewBorder. |
void |
setWidth(int width)
Sets the prefered width for this view. |
protected void |
showButton(PrintWriter out,
String icon,
String label,
String event)
Write HTML code for a button |
protected void |
showFormButtons(PrintWriter out)
|
protected void |
showFormButtons(PrintWriter out,
boolean dialog)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected String label
protected DisplayContext context
protected int width
protected int height
protected boolean isCellViewer
protected int row
protected int column
protected View table
protected String description
protected View parentView
| Constructor Detail |
public AbstractView()
public AbstractView(ViewFactory factory,
DisplayContext context)
| Method Detail |
public Border getViewBorder()
getViewBorder in interface Viewpublic void setViewBorder(Border v)
setViewBorder in interface Viewv - Value to assign to viewBorder.public MethodItem getMessage()
getMessage in interface Viewpublic void setMessage(MethodItem v)
setMessage in interface Viewv - Value to assign to message.View.setDescription(String)public String getDescription()
getDescription in interface Viewpublic void setDescription(String v)
setDescription in interface Viewv - Value to assign to description.View.setMessage(MethodItem)public View getParentView()
getParentView in interface ViewCompositeViewpublic void setParentView(View v)
setParentView in interface Viewv - Value to assign to parent.CompositeViewpublic View getRootView()
View
getRootView in interface Viewpublic boolean isDescendantOf(View ancestor)
View
isDescendantOf in interface Viewancestor - the ancestorpublic void setContext(DisplayContext context)
ViewThe display context contains the factory that is used for this view.
setContext in interface Viewpublic DisplayContext getContext()
getContext in interface Viewpublic void setFactory(ViewFactory factory)
View
setFactory in interface Viewpublic ViewFactory getFactory()
View
getFactory in interface Viewpublic void setLabel(String label)
View
setLabel in interface Viewlabel - a string that identifies the viewpublic String getLabel()
View
getLabel in interface Viewpublic void setWidth(int width)
View
setWidth in interface Viewpublic void setHeight(int height)
View
setHeight in interface Viewpublic void setType(String type)
ViewIdentity
setType in interface ViewIdentitypublic String getType()
ViewIdentity
getType in interface ViewIdentitypublic void setStyle(String style)
View
setStyle in interface Viewpublic String getStyle()
View
getStyle in interface Viewpublic void setParameters(Object[] parameters)
ViewIdentity
setParameters in interface ViewIdentitypublic Object[] getParameters()
ViewIdentity
getParameters in interface ViewIdentity
public void setFocus(FieldItem field,
Object option)
View
setFocus in interface Viewfield - the field to focusoption - an extra optionpublic void close(boolean validate)
View
close in interface Viewpublic boolean isClosed()
View
isClosed in interface Viewpublic boolean equalsView(ViewIdentity view)
ViewIdentity
equalsView in interface ViewIdentity
public boolean equalsView(String type,
Object[] parameters)
equalsView in interface ViewIdentityprotected boolean isInForm()
protected Composite eventURL(String text,
String event,
String params)
text - text to display for the linkevent - the name of the eventparams - additional parameters for the link URL
protected void showButton(PrintWriter out,
String icon,
String label,
String event)
out - where to write the HTMLicon - resource name of an iconlabel - text of the buttonevent - the event linked to the buttonpublic String getOpenBorder()
public String getCloseBorder()
protected String getBaseURL()
protected String eventURL(String event)
event - the name of the event
protected Element iconElement(String icon,
String alt)
icon - resource path of iconalt - alt string for
protected Element iconElement(String icon,
String alt,
boolean showAlt)
icon - resource path of iconalt - alt string for showAlt - if true, return alt if icon is nullprotected String getId()
protected String getId(View view)
public void setStyleSheet(String styleSheet)
protected void genPage(PrintWriter out)
throws IOException
IOExceptiongenBody(PrintWriter)
protected void genStyleSheets(PrintWriter out,
CustomizedView customized)
protected void genBody(PrintWriter out)
throws IOException
IOExceptiongenPage(PrintWriter)public void setTable(View table)
public void setRow(int row)
public void setColumn(int column)
public void setAttribute(String name,
String value)
protected void printAttributes(PrintWriter out)
protected void openForm(PrintWriter out)
protected void closeForm(PrintWriter out)
protected void showFormButtons(PrintWriter out,
boolean dialog)
protected void showFormButtons(PrintWriter out)
protected void genEventAndActionButton(PrintWriter out,
String event)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||