|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.aspects.gui.swing.SwingDisplay
Constructor Summary | |
SwingDisplay(ViewFactory factory)
|
Method Summary | |
void |
addTimedoutDialog(DialogView dialog)
Add a dialog to the list of timedout dialogs |
boolean |
addViewFor(Object substance)
|
boolean |
addViewFor(Object substance,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
Adds a view for a given Jac object. |
void |
applicationStarted()
Notifies the display that a new application has just started. |
void |
close()
Closes this display. |
void |
closeWindow(View window)
Close a window. |
void |
fullRefresh()
Rebuilds all customized GUI windows. |
CustomizedView |
getCustomizedView(String customizedID)
Returns a CustomizedView identified by its id |
Collection |
getCustomizedViews()
Returns a collection of all CustomizedViews contained in the display. |
String |
getDisplayID()
Gets the ID (a unique string identifier) of the current display. |
ViewFactory |
getFactory()
Returns the ViewFactory of the display. |
void |
newObject(Object newObject)
Notifies the display that a new object has been created. |
void |
openView(Object object)
Shows the given object on the display by opening a new core view. |
void |
refresh()
Refresh the display. |
void |
saveStreamToFile(Reader reader)
show a save dialog and save the stream into the selected file |
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 |
showCustomized(String id,
Object object)
Show a customized Gui. |
void |
showCustomized(String id,
Object object,
Map panels)
Show a customized Gui. |
void |
showError(String message,
String title)
Show an error message to the user. |
boolean |
showInput(Object substance,
AbstractMethodItem method,
Object[] parameters)
Asks the user to fill the parameters to prepare the invocation of the given method. |
void |
showMessage(String message,
String title)
Show a message to the user. |
boolean |
showMessage(String message,
String title,
boolean okButton,
boolean cancelButton,
boolean closeButton)
Displays a message to the user. |
boolean |
showModal(Object object,
String viewType,
String[] viewParams,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
|
boolean |
showModal(Object object,
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SwingDisplay(ViewFactory factory)
Method Detail |
public void addTimedoutDialog(DialogView dialog)
CustomizedDisplay
addTimedoutDialog
in interface CustomizedDisplay
dialog
- the timedout dialogpublic void closeWindow(View window)
CustomizedDisplay
closeWindow
in interface CustomizedDisplay
window
- view window to closepublic void fullRefresh()
Display
fullRefresh
in interface Display
public void showCustomized(String id, Object object, Map panels)
Display
showCustomized
in interface Display
id
- the id of the customized GUI to showobject
- the CustomizedGUI to showpanels
- contents of panels ( panelID -> object)CustomizedGUI
public void showCustomized(String id, Object object)
Display
showCustomized
in interface Display
id
- the id of the customized GUI to showobject
- the CustomizedGUI to showCustomizedGUI
public CustomizedView getCustomizedView(String customizedID)
CustomizedDisplay
getCustomizedView
in interface CustomizedDisplay
customizedID
- the id of the CustomizedView
public Collection getCustomizedViews()
CustomizedDisplay
getCustomizedViews
in interface CustomizedDisplay
public ViewFactory getFactory()
CustomizedDisplay
A view factory implements the creation methods for different visualisation supports (e.g. SWING, WEB, ...).
getFactory
in interface CustomizedDisplay
public void show(Object object)
Display
The showed object is considered as a result.
On contrary to showModal
, this method does not
stop the client thread execution.
show
in interface Display
object
- the object to showpublic boolean showModal(Object object, String viewType, String[] viewParams, String title, String header, Object parent, boolean okButton, boolean cancelButton, boolean closeButton)
showModal
in interface Display
public boolean showModal(Object object, String title, String header, Object parent, boolean okButton, boolean cancelButton, boolean closeButton)
Display
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).
showModal
in interface Display
object
- the object to showtitle
- 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
public void openView(Object object)
Display
On contrary to showModal
, this method does not
stop the client thread execution.
openView
in interface Display
object
- the object to showpublic boolean showInput(Object substance, AbstractMethodItem method, Object[] parameters)
Display
This operation stops the client thread.
showInput
in interface Display
substance
- the object that contains the method (null if a
constructor)parameters
- 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 String getDisplayID()
Display
getDisplayID
in interface Display
public void setDisplayID(String displayID)
Display
setDisplayID
in interface Display
displayID
- a string (should be unique)public boolean showMessage(String message, String title, boolean okButton, boolean cancelButton, boolean closeButton)
Display
showMessage
in interface Display
title
- the window title if a window is openedokButton
- if true, a validation button is addedcancelButton
- if true, a cancellation button is addedcloseButton
- if true, a closing button is added
public void showMessage(String message, String title)
Display
showMessage
in interface Display
Display.showError(String,String)
public void showError(String message, String title)
Display
showError
in interface Display
Display.showMessage(String,String)
public void refresh()
Display
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).
refresh
in interface Display
WebDisplay
public void newObject(Object newObject)
Display
Depending on the display's nature and functionality, this notification can simply be ignored.
newObject
in interface Display
newObject
- the newly created objectpublic void applicationStarted()
Display
At this step, all the root objects of the application have been created and it is time to open the main view if any.
applicationStarted
in interface Display
public void close()
Display
close
in interface Display
public void saveStreamToFile(Reader reader)
reader
- the stream to savepublic boolean addViewFor(Object substance)
public boolean addViewFor(Object substance, String title, String header, Object parent, boolean okButton, boolean cancelButton, boolean closeButton)
substance
- the object to add a view for
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |