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

java.lang.Object
  extended byorg.objectweb.jac.aspects.gui.web.AbstractView
      extended byorg.objectweb.jac.aspects.gui.web.AbstractCompositeView
          extended byorg.objectweb.jac.aspects.gui.web.Customized
All Implemented Interfaces:
CompositeView, CustomizedView, HTMLViewer, View, ViewIdentity, WindowListener

public class Customized
extends AbstractCompositeView
implements CustomizedView, HTMLViewer, WindowListener


Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Constructor Summary
Customized(ViewFactory factory, DisplayContext context, CustomizedGUI customized, Map panels)
          Builds a customized view.
 
Method Summary
 void addView(View view)
          Adds a component view in the composite.
 void addView(View view, Object extraInfos)
          Adds a component view in the composite.
 void close(boolean validate)
          Close this view.
protected  void genBody(PrintWriter out)
          Override this method to generate the body of an HTML page.
 void genHTML(PrintWriter out)
          Generate the HTML code for the editor.
 MenuView getBottomMenuBar()
           
 CustomizedGUI getCustomizedGUI()
          Returns the customized GUI, i.e. the object that contains all the parametrization of this view as built by the GUI aspect.
 MenuView getLeftMenuBar()
           
 PanelView getPanelView()
          Returns the content pane of the customized, i.e. a panel containing some sub-panels.
 MenuView getRightMenuBar()
           
 MenuView getTopMenuBar()
           
 View getView(Object id)
          Gets a component view from an id object.
 Collection getViews()
          Gets all the component views in this composite.
 void onCancel()
          Called when the Cancel button was pressed by the user.
 void onOK(JacRequest request)
          Called when the OK button was pressed by the user.
 void onRefresh(JacRequest request)
          Called when the Refresh button was pressed by the user.
 void onValidate(JacRequest request)
          Validates inputs, but creates no HTML.
 void removeAllViews(boolean validate)
          Removes all the views in this composite.
 void requestFocus()
           
 void setContext(DisplayContext context)
          Sets the display context for this view.
 void setMenuBar(MenuView menuBar, String position)
          Set a menu bar to the customized.
 void setStatusBar(StatusView statusBar, String position)
          Set a status bar to the customized.
 void setToolBar(MenuView toolBar)
          Set a tool bar to the customized.
 void showStatus(String message)
          Show a message on the customized's status bar.
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractCompositeView
add, addHorizontalStrut, addVerticalStrut, closeAllViews, containsView, genDescription, genMessage, removeView
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
closeForm, equalsView, equalsView, eventURL, eventURL, 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, 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.CompositeView
addHorizontalStrut, addVerticalStrut, containsView, removeView
 
Methods inherited from interface org.objectweb.jac.aspects.gui.View
getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, 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
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Constructor Detail

Customized

public Customized(ViewFactory factory,
                  DisplayContext context,
                  CustomizedGUI customized,
                  Map panels)
Builds a customized view.

Parameters:
factory - the view factory
context - the display context
customized - the customized GUI to build a view of
panels - if not null, overrides the content of the view (panelID -> PanelContent)
Method Detail

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 AbstractCompositeView

setContext

public void setContext(DisplayContext context)
Description copied from interface: View
Sets the display context for this view.

The display context contains the factory that is used for this view.

Specified by:
setContext in interface View
Overrides:
setContext in class AbstractCompositeView

addView

public void addView(View view,
                    Object extraInfos)
Description copied from interface: CompositeView
Adds a component view in the composite.

Specified by:
addView in interface CompositeView
Overrides:
addView in class AbstractCompositeView

addView

public void addView(View view)
Description copied from interface: CompositeView
Adds a component view in the composite.

Specified by:
addView in interface CompositeView
Overrides:
addView in class AbstractCompositeView

getViews

public Collection getViews()
Description copied from interface: CompositeView
Gets all the component views in this composite.

Specified by:
getViews in interface CompositeView
Overrides:
getViews in class AbstractCompositeView

getView

public View getView(Object id)
Description copied from interface: CompositeView
Gets a component view from an id object.

Specified by:
getView in interface CompositeView
Overrides:
getView in class AbstractCompositeView

removeAllViews

public void removeAllViews(boolean validate)
Description copied from interface: CompositeView
Removes all the views in this composite.

Specified by:
removeAllViews in interface CompositeView
Overrides:
removeAllViews in class AbstractCompositeView

getCustomizedGUI

public CustomizedGUI getCustomizedGUI()
Description copied from interface: CustomizedView
Returns the customized GUI, i.e. the object that contains all the parametrization of this view as built by the GUI aspect.

Specified by:
getCustomizedGUI in interface CustomizedView
Returns:
an implementation-independant object

setMenuBar

public void setMenuBar(MenuView menuBar,
                       String position)
Description copied from interface: CustomizedView
Set a menu bar to the customized.

Specified by:
setMenuBar in interface CustomizedView
Parameters:
menuBar - the abstract menu bar
position - (TOP||BOTTOM)

getTopMenuBar

public MenuView getTopMenuBar()

getBottomMenuBar

public MenuView getBottomMenuBar()

getLeftMenuBar

public MenuView getLeftMenuBar()

getRightMenuBar

public MenuView getRightMenuBar()

setToolBar

public void setToolBar(MenuView toolBar)
Description copied from interface: CustomizedView
Set a tool bar to the customized.

Specified by:
setToolBar in interface CustomizedView
Parameters:
toolBar - the abstract tool bar

setStatusBar

public void setStatusBar(StatusView statusBar,
                         String position)
Description copied from interface: CustomizedView
Set a status bar to the customized.

Specified by:
setStatusBar in interface CustomizedView
Parameters:
statusBar - the abstract status bar
position - (TOP||BOTTOM)

showStatus

public void showStatus(String message)
Description copied from interface: CustomizedView
Show a message on the customized's status bar.

Specified by:
showStatus in interface CustomizedView
Parameters:
message - the message to show

getPanelView

public PanelView getPanelView()
Description copied from interface: CustomizedView
Returns the content pane of the customized, i.e. a panel containing some sub-panels.

Specified by:
getPanelView in interface CustomizedView
Returns:
the view of subpanes

requestFocus

public void requestFocus()
Specified by:
requestFocus in interface CustomizedView

genHTML

public void genHTML(PrintWriter out)
             throws IOException
Description copied from interface: HTMLViewer
Generate the HTML code for the editor.

Specified by:
genHTML in interface HTMLViewer
Overrides:
genHTML in class AbstractCompositeView
Throws:
IOException

genBody

protected void genBody(PrintWriter out)
                throws IOException
Description copied from class: AbstractView
Override this method to generate the body of an HTML page.

Overrides:
genBody in class AbstractView
Throws:
IOException
See Also:
AbstractView.genPage(PrintWriter)

onOK

public void onOK(JacRequest request)
Description copied from interface: WindowListener
Called when the OK button was pressed by the user. Validates editors and closes the window.

Specified by:
onOK in interface WindowListener
Parameters:
request - the servlet request

onRefresh

public void onRefresh(JacRequest request)
Description copied from interface: WindowListener
Called when the Refresh button was pressed by the user. Validates editors and but does not close the window.

Specified by:
onRefresh in interface WindowListener
Parameters:
request - the servlet request

onCancel

public void onCancel()
Description copied from interface: WindowListener
Called when the Cancel button was pressed by the user. Closes the dialog without validating editors.

Specified by:
onCancel in interface WindowListener

onValidate

public void onValidate(JacRequest request)
Description copied from interface: WindowListener
Validates inputs, but creates no HTML.

Specified by:
onValidate in interface WindowListener