|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.awt.Component java.awt.Container java.awt.Window java.awt.Dialog javax.swing.JDialog jwo.utils.gui.JWDialogue
public class JWDialogue
Class for displaying for dialogue windows. Can be in two forms. Dialogues contain OK and Cancel return buttons and allow validation of input. Monologues contain a single OK return button and do not validate input.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class java.awt.Dialog |
---|
Dialog.AccessibleAWTDialog |
Nested classes/interfaces inherited from class java.awt.Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
DIALOGUE
Indicates OK and CANCEL buttons with some input. |
static int |
MONOLOGUE
Indicates a simple OK button with no input. |
Fields inherited from class javax.swing.JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
JWDialogue(Frame parentFrame)
Creates a simple modal dialogue window with, OK and Cancel buttons. |
|
JWDialogue(Frame parentFrame,
String winTitle)
Creates a simple modal dialogue window with title, OK and Cancel buttons. |
|
JWDialogue(Frame parentFrame,
String winTitle,
int type,
boolean modal)
Creates a simple monologue/dialogue window with title and return buttons. |
Method Summary | |
---|---|
void |
addDialogueListener(JWDialogueListener dialogueListener)
Adds a dialogue listener. |
boolean |
checkInput()
Method to validate input for dialogue values. |
void |
closedown()
Closes down the dialogue window. |
Container |
getContentPane()
Identifies the pane into which content can be added. |
boolean |
isChanged()
Notifies if contents of dialogue have changed |
void |
removeDialogueListener(JWDialogueListener dialogueListener)
Removes a given listener from the list of objects to be informed when a dialogue message is sent. |
void |
setFullBackground(Color colour)
Sets the background colour of the dialogue window (including buttons etc). |
Methods inherited from class java.awt.Dialog |
---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int MONOLOGUE
public static final int DIALOGUE
Constructor Detail |
---|
public JWDialogue(Frame parentFrame)
parentFrame
- Container associated with modal dialogue.public JWDialogue(Frame parentFrame, String winTitle)
parentFrame
- Container associated with modal dialogue.winTitle
- Title placed on window bar.public JWDialogue(Frame parentFrame, String winTitle, int type, boolean modal)
parentFrame
- Container associated with modal dialogue.winTitle
- Title placed on window bar.type
- Type of window - either MONOLOGUE or DIALOGUEmodal
- Determines whether dialogue is modal or not.Method Detail |
---|
public boolean isChanged()
public void addDialogueListener(JWDialogueListener dialogueListener)
dialogueListener
- The object to listen for changes.public void removeDialogueListener(JWDialogueListener dialogueListener)
dialogueListener
- Object to be removed from listeners.public void closedown()
public boolean checkInput()
public void setFullBackground(Color colour)
colour
- New colour to set.public Container getContentPane()
getContentPane
in interface RootPaneContainer
getContentPane
in class JDialog
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |