|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ch.aplu.util.MessagePane
public class MessagePane
Modeless dialog containing one line of text.
When the close button of the MessagePane window title bar is hit, System.exit(0)
is executed that terminates the JVM, but you can modifiy this behavior by
registering your own implementation of the ExitListener interface or
by using the key MessagePaneClosingMode in aplu_util.properties.
For more details consult aplu_util.properties file found in the distribution.
All Swing methods are invoked in the EDT.
Constructor Summary | |
---|---|
MessagePane(int nbChars)
Show a MessagePane at center of screen with given maximal number of characters to display. |
|
MessagePane(int ulx,
int uly,
int nbChars)
Show a MessagePane at given position (upper left corner) with maximal number of characters to display. |
|
MessagePane(int ulx,
int uly,
java.lang.String text)
Show a MessagePane at given position (upper left corner) containing given text. |
|
MessagePane(int ulx,
int uly,
java.lang.String text,
int millis)
Construct a MessagePane at given position (upper left corner) containing given text and return after given amount of time (in milliseconds). |
|
MessagePane(java.lang.String text)
Show a MessagePane at center of screen containing the given text. |
|
MessagePane(java.lang.String text,
int millis)
Construct a MessagePane at center of screen containing given text and return after given amount of time (in milliseconds). |
Method Summary | |
---|---|
void |
addCleanable(Cleanable cl)
Register a class that implements Cleanable.clean() that will be called when the title bar's close button is hit. |
void |
addExitListener(ExitListener listener)
Register a class that implements ExitListener.notifyExit() that will be called when the title bar's close button is hit. |
javax.swing.JDialog |
getDialog()
Return the dialog. |
boolean |
isDisposed()
If in aplu_util.properties the MessagePaneClosingMode key is set to DisposeOnClose, the dialog is disposed when the close title button is clicked and this method returns true |
void |
setText(java.lang.String text)
Display the given text. |
void |
setText(java.lang.String text,
int millis)
Display the given text and return after the given amount of time (in milliseconds). |
void |
setVisible(boolean visible)
Show/hide the dialog. |
void |
title(java.lang.String text)
Display the given title. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessagePane(int ulx, int uly, int nbChars)
public MessagePane(int nbChars)
public MessagePane(int ulx, int uly, java.lang.String text)
public MessagePane(java.lang.String text)
public MessagePane(int ulx, int uly, java.lang.String text, int millis)
public MessagePane(java.lang.String text, int millis)
Method Detail |
---|
public void addCleanable(Cleanable cl)
public void addExitListener(ExitListener listener)
public void setText(java.lang.String text)
public void title(java.lang.String text)
public void setText(java.lang.String text, int millis)
public javax.swing.JDialog getDialog()
public void setVisible(boolean visible)
visible
- if true, the dialog is shown, otherwise hidden.public boolean isDisposed()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |