JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.gui
Class Actions

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.Actions

public class Actions
extends Object

This class is a container of commonly used GUI actions static methods.

Usually, a GUI action takes in parameter the display context. Using the context, is can then know the customized window to use to interact with the users. When an action does not take any display context, it means that it does not need any interaction with the GUI or that the display context is retrieved throught the collaboration.


Constructor Summary
Actions()
           
 
Method Summary
static void exit(DisplayContext context)
          Quit the application by shutting down the server.
static void genReport(String reportDef, File pdfFile)
          Generate a PDF report
static void invoke(Object object, String methodName)
          Invokes a method on an object.
static void logout(DisplayContext context)
          Logout from an application by clearing the current user.
static void reloadAspect(String aspect)
          Reloads an aspect for the current application
static void setTrace(String category, int level)
          Changes a trace for the current application
static void showStatus(String message)
          Shows a message on the status bar of the current customized.
static void showWindow(DisplayContext context, String id)
          Show a customized window that has been declared and configured within the GUI aspect.
static void viewObject(DisplayContext context, String objectName, String panelID)
          Display an object in a panel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Actions

public Actions()
Method Detail

exit

public static void exit(DisplayContext context)
Quit the application by shutting down the server.

Parameters:
context - the display context for this action

logout

public static void logout(DisplayContext context)
Logout from an application by clearing the current user. If an authentication aspect is woven, the user is asked again.

Parameters:
context - the display context for this action

showStatus

public static void showStatus(String message)
Shows a message on the status bar of the current customized. If no display context available, then println is used.

Parameters:
message - the message to show

showWindow

public static void showWindow(DisplayContext context,
                              String id)
Show a customized window that has been declared and configured within the GUI aspect.

Parameters:
context - the display context for this action
id - the customized ID

invoke

public static void invoke(Object object,
                          String methodName)
Invokes a method on an object.


viewObject

public static void viewObject(DisplayContext context,
                              String objectName,
                              String panelID)
Display an object in a panel.

Parameters:
context - the DisplayContext of the custmoized view
objectName - the name of the object to display
panelID - the panel ID where to display the object

genReport

public static void genReport(String reportDef,
                             File pdfFile)
                      throws dori.jasper.engine.JRException
Generate a PDF report

Parameters:
reportDef - resource name of the XML report definition file
pdfFile - file where to store the resulting PDF document
dori.jasper.engine.JRException

setTrace

public static void setTrace(String category,
                            int level)
Changes a trace for the current application

Parameters:
category - category of the trace
level - level of the trace (0=quiet,1=verbose,2=more verbose...)

reloadAspect

public static void reloadAspect(String aspect)
                         throws Exception
Reloads an aspect for the current application

Exception

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli