|
||||||||||
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 | +--jwo.utils.JWDialogue
Abstract class to use as basis for dialogue windows. Contains OK and Cancel return buttons. Uses the GridBag Layout manager for maximum portability with different window sizes.
JWMonologue
,
Serialized FormNested Class Summary |
Nested classes inherited from class java.awt.Dialog |
Dialog.AccessibleAWTDialog |
Nested classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
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,
String mainTitle)
Creates a simple modal dialogue window with titles, OK and Cancel buttons. |
|
JWDialogue(Frame parentFrame,
String winTitle,
String mainTitle,
boolean modal)
Creates a simple dialogue window with titles, OK and Cancel buttons. |
Method Summary | |
void |
actionPerformed(ActionEvent event)
Looks for delegated events associated with the dialogue box. |
Component |
add(Component c)
Adds a component to the dialogue above the return button if they are defined. |
void |
addDialogueListener(JWDialogueListener dialogueListener)
Adds a dialogue listener. |
void |
addReturnButtons()
Adds the return buttons to the dialogue box. |
abstract void |
checkActions(ActionEvent event)
Method to allow delegated actions (other than OK or Cancel button press) to be processed. |
abstract void |
checkInput()
Method to validate dialogue values. |
void |
closeDialogue()
Closes down window. |
GridBagConstraints |
getGBConstraints()
Retrieves the default GridBag layout constraints associated with this frame. |
GridBagLayout |
getGBLayout()
Retrieves current GridBagLayout (needed to add new componets to the dialogue box. |
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 |
setCancelAsDefault()
Sets the default button to Cancel. |
void |
setChanged(boolean changed)
Sets the changed state of the dialogue. |
void |
setOKAsDefault()
Sets the default button to OK. |
void |
updateListener()
Updates the DialogueListeners. |
Methods inherited from class java.awt.Dialog |
addNotify, dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, paramString, setModal, setResizable, setTitle, setUndecorated, show |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JWDialogue(Frame parentFrame)
parentFrame
- Frame with which associated modal dialogue.public JWDialogue(Frame parentFrame, String winTitle)
parentFrame
- Frame with which associated modal dialogue.winTitle
- Title placed on window bar.public JWDialogue(Frame parentFrame, String winTitle, String mainTitle)
parentFrame
- Frame with which associated modal dialogue.winTitle
- Title placed on window bar.mainTitle
- Main title displayed in dialogue window.public JWDialogue(Frame parentFrame, String winTitle, String mainTitle, boolean modal)
parentFrame
- Frame with which associated modal dialogue.winTitle
- Title placed on window bar.mainTitle
- Main title displayed in dialogue window.modal
- Determines whether dialogue is modal or not.Method Detail |
public boolean isChanged()
public Component add(Component c)
add
in class Container
public void setChanged(boolean changed)
changed
- Boolean indication of dialogue change.public GridBagConstraints getGBConstraints()
public GridBagLayout getGBLayout()
public void addReturnButtons()
public void setOKAsDefault()
public void setCancelAsDefault()
public void actionPerformed(ActionEvent event)
checkActions
to allow
other actions to be processed.
actionPerformed
in interface ActionListener
event
- Any action event associated with dialogue.checkActions(java.awt.event.ActionEvent)
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 updateListener()
public void closeDialogue()
public abstract void checkInput()
public abstract void checkActions(ActionEvent event)
JWMonologue
instead.
event
- Action event to be processed.JWMonologue
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |