|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | 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 | +--jas.util.JASDialog
JASDialog extends the built in java dialog to provide a number of extra features
getContentPane()
, Serialized FormInner classes inherited from class javax.swing.JDialog |
javax.swing.JDialog.AccessibleJDialog |
Inner classes inherited from class java.awt.Dialog |
java.awt.Dialog.AccessibleAWTDialog |
Inner classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static int |
APPLY_BUTTON
Include this in your flags to include an Apply button. |
static int |
CANCEL_BUTTON
Include this in your flags to include a Cancel button. |
static int |
HELP_BUTTON
Include this in your flags to include a Help button. |
static int |
OK_BUTTON
Include this in your flags to include an OK button. |
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, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JASDialog(java.awt.Frame frame,
java.lang.String title)
Creates a modal dialog with OK and Cancel buttons. |
|
JASDialog(java.awt.Frame frame,
java.lang.String title,
boolean modal)
Creates a dialog with OK and Cancel buttons. |
|
JASDialog(java.awt.Frame f,
java.lang.String t,
boolean modal,
int flags)
Creates a dialog box with any combination of buttons. |
Method Summary | |
protected void |
callEnable()
Forces the dialog to re-evaluate button enabling. |
void |
changedUpdate(javax.swing.event.DocumentEvent e)
Calls callEnable() by default. |
void |
defaultPack()
Causes default pack; does not move dialog. |
boolean |
doModal()
Forces a modal display of the dialog box |
protected void |
enableApply(JASState state)
Override to customize when Apply is enabled. |
protected void |
enableHelp(JASState state)
Override to customize when Help is enabled. |
protected void |
enableOK(JASState state)
Override to customize when OK is enabled. |
java.awt.Container |
getContentPane()
Returns the content pane for the JASDialog, which is the panel (not including the buttons) where components can be added. |
void |
insertUpdate(javax.swing.event.DocumentEvent e)
Calls callEnable() by default. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Does nothing by default. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Does nothing by default. |
void |
mouseExited(java.awt.event.MouseEvent e)
Does nothing by default. |
void |
mousePressed(java.awt.event.MouseEvent e)
Does nothing by default. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Does nothing by default. |
protected void |
onApply()
Called when the Apply button is pushed. |
protected void |
onCancel()
Called when the Cancel button is pushed. |
protected void |
onOK()
Called when the OK button is pushed. |
void |
pack()
Causes a default pack(), but also places the dialog in the center of the parent frame. |
void |
processEvent(java.awt.AWTEvent e)
This method is public as an implementation side effect; do not call or override. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
Calls callEnable() by default. |
void |
setApplyLabel(java.lang.String label)
Set the label on the Apply button. |
void |
setApplyMnemonic(char mnemonic)
Sets the mnnemonic (or keyboard shortcut) for the Apply button. |
void |
setCancelLabel(java.lang.String label)
Set the label on the Cancel button. |
void |
setCancelMnemonic(char mnemonic)
Sets the mnnemonic (or keyboard shortcut) for the Cancel button. |
void |
setContentPane(java.awt.Container c)
Sets the content pane. |
void |
setHelpTopic(java.lang.String topic)
Sets the name for the help topic that the Help button opens. |
void |
setOKLabel(java.lang.String label)
Set the label on the OK button. |
void |
setOKMnemonic(char mnemonic)
Sets the mnnemonic (or keyboard shortcut) for the OK button. |
void |
show()
|
Methods inherited from class javax.swing.JDialog |
addImpl, createRootPane, dialogInit, getAccessibleContext, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isRootPaneCheckingEnabled, paramString, processKeyEvent, processWindowEvent, remove, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Dialog |
addNotify, dispose, getTitle, hide, isModal, isResizable, setModal, setResizable, setTitle |
Methods inherited from class java.awt.Window |
addWindowListener, applyResourceBundle, applyResourceBundle, finalize, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, postEvent, removeWindowListener, setCursor, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFont, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int OK_BUTTON
public static final int APPLY_BUTTON
public static final int CANCEL_BUTTON
public static final int HELP_BUTTON
Constructor Detail |
public JASDialog(java.awt.Frame frame, java.lang.String title)
frame
- the parent frametitle
- the title for the dialog boxpublic JASDialog(java.awt.Frame frame, java.lang.String title, boolean modal)
frame
- the parent frametitle
- the title for the dialog boxmodal
- whether the dialog box is modalpublic JASDialog(java.awt.Frame f, java.lang.String t, boolean modal, int flags)
flags
parameter. For example,JASDialog.OK_BUTTON | JASDialog.CANCEL_BUTTON | JASDialog.HELP_BUTTON
flags
parameter will create a button
that has an OK button, a Cancel button, and a Help button.frame
- the parent frametitle
- the title for the dialog boxmodal
- whether the dialog box is modalflags
- option flagsMethod Detail |
public void pack()
pack
in class java.awt.Window
Window.pack()
public void defaultPack()
public void processEvent(java.awt.AWTEvent e)
processEvent
in class java.awt.Window
public boolean doModal()
public void show()
show
in class java.awt.Dialog
public void setOKLabel(java.lang.String label)
public void setOKMnemonic(char mnemonic)
setOKLabel(String)
the default
mnemonic ('O') may not be appropriate, so use
this method to set a better one.mnemonic
- the new key shortcut to usesetOKLabel(String)
public void setCancelLabel(java.lang.String label)
public void setCancelMnemonic(char mnemonic)
setCancelLabel(String)
the default
mnemonic ('C') may not be appropriate, so use
this method to set a better one.mnemonic
- the new key shortcut to usesetCancelLabel(String)
public void setApplyLabel(java.lang.String label)
public void setApplyMnemonic(char mnemonic)
setApplyLabel(String)
the default
mnemonic ('A') may not be appropriate, so use
this method to set a better one.mnemonic
- the new key shortcut to usesetApplyLabel(String)
protected void onOK()
protected void onCancel()
protected void onApply()
protected void callEnable()
protected void enableOK(JASState state)
protected void enableHelp(JASState state)
setHelpTopic(String)
protected void enableApply(JASState state)
public java.awt.Container getContentPane()
getContentPane
in class javax.swing.JDialog
public void setContentPane(java.awt.Container c)
setContentPane
in class javax.swing.JDialog
public final void setHelpTopic(java.lang.String topic)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void insertUpdate(javax.swing.event.DocumentEvent e)
callEnable()
by default. To use this class
as a DocumentListener, override only the method(s) you need.insertUpdate
in interface javax.swing.event.DocumentListener
callEnable()
public void removeUpdate(javax.swing.event.DocumentEvent e)
callEnable()
by default. To use this class
as a DocumentListener, override only the method(s) you need.removeUpdate
in interface javax.swing.event.DocumentListener
callEnable()
public void changedUpdate(javax.swing.event.DocumentEvent e)
callEnable()
by default. To use this class
as a DocumentListener, override only the method(s) you need.changedUpdate
in interface javax.swing.event.DocumentListener
callEnable()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |