|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is an abstract description of how a display is defined in org.objectweb.jac.
In JAC, a GUI that needs to allow aspects to interfere with
itself (with output and input data) must implement this
interface. When the GUI invokes a non-gui object, it must then
define the "Gui.display" attribute to be itself so that internal
component know what display to use. If this display attribute is
not defined by the GUI, then the objects that need display
operations can use the default textual display (that uses
System.out
and System.in
for output and
input).
Collaboration.get()
,
Collaboration
Method Summary | |
void |
applicationStarted()
Notifies the display that a new application has just started. |
void |
close()
Closes this display. |
boolean |
fillParameters(AbstractMethodItem method,
Object[] parameters)
Called before interactively calling a method with parameters, so that the display can set some of them. |
void |
fullRefresh()
Rebuilds all customized GUI windows. |
String |
getDisplayID()
Gets the ID (a unique string identifier) of the current display. |
void |
onInvocationReturn(Object substance,
AbstractMethodItem method)
Called after interactively calling a method with parameters. |
void |
openView(Object object)
Shows the given object on the display by opening a new core view. |
void |
refresh()
Refresh the display. |
void |
setDisplayID(String displayID)
Sets the ID (a unique string identifier) of the current display. |
void |
show(Object object)
Shows the given object on the display. |
void |
show(Object object,
String viewType,
Object[] viewParams)
Shows a view of an object. |
void |
showCustomized(String id,
Object customized)
Show a customized Gui. |
void |
showCustomized(String id,
Object customized,
Map panels)
Show a customized Gui. |
void |
showError(String title,
String message)
Show an error message to the user. |
boolean |
showInput(Object object,
AbstractMethodItem method,
Object[] parameters)
Asks the user to fill the parameters to prepare the invocation of the given method. |
void |
showMessage(String title,
String message)
Shows a message to the user. |
boolean |
showMessage(String message,
String title,
boolean canValidate,
boolean canCancel,
boolean canClose)
Displays a message to the user. |
boolean |
showModal(Object object,
String viewType,
Object[] viewParams,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
Shows the given object on the display and waits for a user input. |
boolean |
showModal(Object object,
String title,
String header,
Object parent,
boolean canValidate,
boolean canCancel,
boolean canClose)
Shows the given object on the display and waits for a user input. |
Object |
showRefreshMessage(String title,
String message)
Shows a message to the user. |
Method Detail |
public String getDisplayID()
public void setDisplayID(String displayID)
displayID
- a string (should be unique)public void show(Object object)
The showed object is considered as a result.
On contrary to showModal
, this method does not
stop the client thread execution.
object
- the object to showpublic void show(Object object, String viewType, Object[] viewParams)
The showed object is considered as a result.
On contrary to showModal
, this method does not
stop the client thread execution.
object
- the object to showviewType
- the type of the view to displayviewParams
- parameters to give the view constructorpublic void openView(Object object)
On contrary to showModal
, this method does not
stop the client thread execution.
object
- the object to showpublic boolean showModal(Object object, String title, String header, Object parent, boolean canValidate, boolean canCancel, boolean canClose)
On contrary to show
, this method stops the
client thread execution and waits for a user input to continue
(as an OK button click or a key pressing).
object
- the object to showtitle
- the window title if a window is openedheader
- a header messageparent
- the parent windowcanValidate
- if true, a validation button is addedcanCancel
- if true, a cancellation button is addedcanClose
- if true, a closing button is added
showModal(Object,String,Object[],String,String,Object,boolean,boolean,boolean)
public boolean showModal(Object object, String viewType, Object[] viewParams, String title, String header, Object parent, boolean okButton, boolean cancelButton, boolean closeButton)
object
- the object to showviewType
- the type of view to build or the objectviewParams
- parameters to give the view constructortitle
- the window title if a window is openedheader
- a header messageparent
- the parent windowokButton
- if true, a validation button is addedcancelButton
- if true, a cancellation button is addedcloseButton
- if true, a closing button is added
showModal(Object,String,String,Object,boolean,boolean,boolean)
public void showCustomized(String id, Object customized)
id
- the id of the customized GUI to showcustomized
- the CustomizedGUI to showCustomizedGUI
public void showCustomized(String id, Object customized, Map panels)
id
- the id of the customized GUI to showcustomized
- the CustomizedGUI to showpanels
- contents of panels ( panelID -> object)CustomizedGUI
public void fullRefresh()
public boolean showInput(Object object, AbstractMethodItem method, Object[] parameters)
This operation stops the client thread.
object
- the object that contains the method (null if a
constructor)method
- the method to fill the parameters oparameters
- the parameters values; as an input, they can
be set by the client to fill default values for these
parameters; as an output, they must be used by the client as the
actual parameter values to call the given method
public void refresh()
This method is useful for some kind of displays when the refresh operation cannot be done automatically when the displayed objects states change (e.g. a web display).
WebDisplay
public boolean showMessage(String message, String title, boolean canValidate, boolean canCancel, boolean canClose)
title
- the window title if a window is openedmessage
- a header messagecanValidate
- if true, a validation button is addedcanCancel
- if true, a cancellation button is addedcanClose
- if true, a closing button is added
public void showMessage(String title, String message)
title
- the title of the windowmessage
- the messageshowError(String,String)
public Object showRefreshMessage(String title, String message)
title
- the title of the windowmessage
- the message
showError(String,String)
public void showError(String title, String message)
title
- the title of the windowmessage
- the error messageshowMessage(String,String)
public void applicationStarted()
At this step, all the root objects of the application have been created and it is time to open the main view if any.
public void close()
public boolean fillParameters(AbstractMethodItem method, Object[] parameters)
public void onInvocationReturn(Object substance, AbstractMethodItem method)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |