|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectComponent
Container
Window
Dialog
JDialog
AbstractSimpleDialog
public abstract class AbstractSimpleDialog
An abstract base class for simple dialogs with a single control panel (supplied by the sub-class) together with OK and Cancel buttons. The sub-class must implement the createControlPanel() and onOK() methods.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class JDialog |
---|
JDialog.AccessibleJDialog |
Nested classes/interfaces inherited from class Dialog |
---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
Nested classes/interfaces inherited from class Window |
---|
Window.AccessibleAWTWindow |
Nested classes/interfaces inherited from class Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class Component |
---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class JDialog |
---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
Fields inherited from class Dialog |
---|
DEFAULT_MODALITY_TYPE |
Fields inherited from class Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
AbstractSimpleDialog(JDialog parent,
String title)
Creates a new modal, non-resizable dialog. |
|
AbstractSimpleDialog(JDialog parent,
String title,
boolean modal,
boolean resizable)
Creates a new modal, non-resizable dialog. |
|
AbstractSimpleDialog(JFrame parent,
String title)
Creates a new modal, non-resizable dialog. |
|
AbstractSimpleDialog(JFrame parent,
String title,
boolean modal,
boolean resizable)
Creates a new modal, non-resizable dialog. |
|
AbstractSimpleDialog(String title)
Creates a new modal, non-resizable dialog with a null parent. |
Method Summary | |
---|---|
void |
closeDialog()
Close the dialog using a call to Window.dispose(). |
protected JPanel |
createButtonPanel()
Creates the OK and Cancel buttons on a panel. |
abstract JPanel |
createControlPanel()
Implemented by the sub-class to provide a panel with controls. |
protected void |
initComponents()
Creates the main control panel and components. |
void |
onCancel()
Called when the cancel button is pressed. |
abstract void |
onOK()
Implemented by the sub-class to respond to the OK button. |
void |
setVisible(boolean b)
|
Methods inherited from class Dialog |
---|
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractSimpleDialog(String title)
null
parent.
title
- dialog titlepublic AbstractSimpleDialog(JFrame parent, String title)
parent
- parent frametitle
- dialog titlepublic AbstractSimpleDialog(JDialog parent, String title)
parent
- parent dialogtitle
- dialog titlepublic AbstractSimpleDialog(JFrame parent, String title, boolean modal, boolean resizable)
parent
- parent frametitle
- dialog titlemodal
- whether to make the dialog application modalresizable
- whether to make the dialog resizablepublic AbstractSimpleDialog(JDialog parent, String title, boolean modal, boolean resizable)
parent
- parent dialogtitle
- dialog titlemodal
- whether to make the dialog application modalresizable
- whether to make the dialog resizableMethod Detail |
---|
public void setVisible(boolean b)
setVisible
in class Dialog
protected void initComponents()
public abstract JPanel createControlPanel()
public abstract void onOK()
public void onCancel()
public void closeDialog()
protected JPanel createButtonPanel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |