|
|||||||||||
| 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 viewType,
Object[] viewParams)
|
boolean |
addViewFor(Object substance,
String viewType,
Object[] viewParams,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
Adds a view for a given Jac object. |
boolean |
addViewFor(Object substance,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
|
void |
applicationStarted()
Notifies the display that a new application has just started. |
static Font |
boldifyFont(Font font)
|
static void |
boldifyFont(String resourceName)
|
void |
close()
Closes this display. |
void |
closeWindow(View window,
boolean validate)
Close a window. |
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. |
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. |
protected void |
initFonts()
|
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 |
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 |
show(Object object,
String viewType,
Object[] viewParams)
Shows a view of an object. |
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)
Shows 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,
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 okButton,
boolean cancelButton,
boolean closeButton)
Shows the given object on the display and waits for a user input. |
Object |
showRefreshMessage(String message,
String title)
Shows a message to the user. |
| 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 |
protected void initFonts()
public static void boldifyFont(String resourceName)
public static Font boldifyFont(Font font)
public void addTimedoutDialog(DialogView dialog)
CustomizedDisplay
addTimedoutDialog in interface CustomizedDisplaydialog - the timedout dialog
public void closeWindow(View window,
boolean validate)
CustomizedDisplay
closeWindow in interface CustomizedDisplaywindow - view window to closevalidate - wether to validate values in editorspublic void fullRefresh()
Display
fullRefresh in interface Display
public void showCustomized(String id,
Object object,
Map panels)
Display
showCustomized in interface Displayid - 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 Displayid - the id of the customized GUI to showobject - the CustomizedGUI to showCustomizedGUIpublic CustomizedView getCustomizedView(String customizedID)
CustomizedDisplay
getCustomizedView in interface CustomizedDisplaycustomizedID - the id of the CustomizedView
public Collection getCustomizedViews()
CustomizedDisplay
getCustomizedViews in interface CustomizedDisplaypublic ViewFactory getFactory()
CustomizedDisplayA view factory implements the creation methods for different visualisation supports (e.g. SWING, WEB, ...).
getFactory in interface CustomizedDisplaypublic void show(Object object)
DisplayThe showed object is considered as a result.
On contrary to showModal, this method does not
stop the client thread execution.
show in interface Displayobject - the object to show
public void show(Object object,
String viewType,
Object[] viewParams)
DisplayThe showed object is considered as a result.
On contrary to showModal, this method does not
stop the client thread execution.
show in interface Displayobject - the object to showviewType - the type of the view to displayviewParams - parameters to give the view constructor
public boolean showModal(Object object,
String viewType,
Object[] viewParams,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
Display
showModal in interface Displayobject - 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
Display.showModal(Object,String,String,Object,boolean,boolean,boolean)
public boolean showModal(Object object,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
DisplayOn 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 Displayobject - 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
Display.showModal(Object,String,Object[],String,String,Object,boolean,boolean,boolean)public void openView(Object object)
DisplayOn contrary to showModal, this method does not
stop the client thread execution.
openView in interface Displayobject - the object to show
public boolean showInput(Object substance,
AbstractMethodItem method,
Object[] parameters)
DisplayThis operation stops the client thread.
showInput in interface Displaysubstance - 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 String getDisplayID()
Display
getDisplayID in interface Displaypublic void setDisplayID(String displayID)
Display
setDisplayID in interface DisplaydisplayID - a string (should be unique)
public boolean showMessage(String message,
String title,
boolean okButton,
boolean cancelButton,
boolean closeButton)
Display
showMessage in interface Displaytitle - the window title if a window is openedmessage - a header messageokButton - 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 Displaymessage - the title of the windowtitle - the messageDisplay.showError(String,String)
public Object showRefreshMessage(String message,
String title)
Display
showRefreshMessage in interface Displaymessage - the title of the windowtitle - the message
Display.showError(String,String)
public void showError(String message,
String title)
Display
showError in interface Displaymessage - the title of the windowtitle - the error messageDisplay.showMessage(String,String)public void refresh()
DisplayThis 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 DisplayWebDisplaypublic void applicationStarted()
DisplayAt 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 Displaypublic void close()
Display
close in interface Displaypublic void saveStreamToFile(Reader reader)
reader - the stream to savepublic boolean addViewFor(Object substance)
public boolean addViewFor(Object substance,
String viewType,
Object[] viewParams)
public boolean addViewFor(Object substance,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
public boolean addViewFor(Object substance,
String viewType,
Object[] viewParams,
String title,
String header,
Object parent,
boolean okButton,
boolean cancelButton,
boolean closeButton)
substance - the object to add a view for
public boolean fillParameters(AbstractMethodItem method,
Object[] parameters)
Display
fillParameters in interface Display
public void onInvocationReturn(Object substance,
AbstractMethodItem method)
Display
onInvocationReturn in interface Display
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||