public class StandardDialog extends EJDialog implements Internationalization
By default, the dialog is modal, and has a JPanel with a BorderLayout for its content pane.
JDialog.AccessibleJDialogDialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeWindow.AccessibleAWTWindow, Window.TypeContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
BUTTONS_CENTER |
static int |
BUTTONS_LEFT |
static int |
BUTTONS_RIGHT |
protected JButton |
cancelB |
static int |
COMPONENT_SPACING
The spacing between components in pixels
|
protected String |
dialogTitle |
protected boolean |
myIsDialogCancelled
Flag indicating if the "Cancel" button was pressed to close dialog
|
protected Container |
myUserContentPane
The content pane for holding user components
|
protected JButton |
okB |
protected ResourceBundle |
resourceBundle |
actions, askQuestionEverOnClose, askQuestionOnEsc, autoPackOnOpen, changeLAF, closeQuestion, defaultValueAskQuestionOnClose, defaultValueAskQuestionOnEsc, focusSet, glassPanel, keys, keyStrokes, opaque, previousGlassPane, sizePositionPreferenceaccessibleContext, rootPane, rootPaneCheckingEnabledDEFAULT_MODALITY_TYPEBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDEBUG_LANGUAGEDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
StandardDialog(Dialog parent,
String title)
This method creates a StandardDialog with the given parent dialog and
title.
|
StandardDialog(Dialog parent,
String title,
int orientation) |
StandardDialog(Dialog parent,
String title,
int orientation,
int spacing) |
StandardDialog(Frame parent,
String title)
This method creates a StandardDialog with the given parent frame and
title.
|
StandardDialog(Frame parent,
String title,
int orientation) |
StandardDialog(Frame parent,
String title,
int orientation,
int spacing) |
| Modifier and Type | Method and Description |
|---|---|
Container |
getContentPane()
This method gets the content pane for adding components.
|
Vector |
getTextsToTranslate()
Returns all the texts in the element suitable for being translated.
|
boolean |
hasUserCancelled()
This method returns
true if the User cancelled the dialog
otherwise false. |
protected void |
init(int orientation,
int spacing)
This method sets up the default attributes of the dialog and the content
pane.
|
protected boolean |
isValidData()
This method is used to validate the current dialog box.
|
void |
setComponentLocale(Locale l) |
void |
setContentPane(Container contentPane)
This method sets the content pane for adding components.
|
void |
setResourceBundle(ResourceBundle resourceBundle)
Sets the language resource bundle.
|
askCloseQuestion, dispose, getSizePositionPreference, initWindowListener, isAskOnClose, isAskOnEsc, pack, processKeyEvent, processWindowEvent, registerKeyBindings, setAction, setActionForKey, setAskOnClose, setAskOnEsc, setAutoPackOnOpen, setInitialFocus, setSizePositionPreference, setVisible, transparentaddImpl, createRootPane, dialogInit, getAccessibleContext, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, remove, repaint, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateaddNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackaddPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontadd, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int BUTTONS_CENTER
public static final int BUTTONS_LEFT
public static final int BUTTONS_RIGHT
public static final int COMPONENT_SPACING
protected boolean myIsDialogCancelled
protected Container myUserContentPane
protected ResourceBundle resourceBundle
protected JButton okB
protected JButton cancelB
protected String dialogTitle
public StandardDialog(Frame parent, String title)
parent - The parent frame for the dialog.title - The title to display in the dialog.public StandardDialog(Dialog parent, String title)
parent - The parent dialog for the dialog.title - The title to display in the dialog.protected void init(int orientation,
int spacing)
public Container getContentPane()
getContentPane in interface RootPaneContainergetContentPane in class JDialogpublic void setContentPane(Container contentPane)
setContentPane in interface RootPaneContainersetContentPane in class JDialogcontentPane - The content pane for the dialog.public boolean hasUserCancelled()
true if the User cancelled the dialog
otherwise false. The dialog is cancelled if the "Cancel"
button is pressed or the "Close" window button is pressed, or the
"Escape" key is pressed. In other words, if the User has caused the
dialog to close by any method other than by pressing the "Ok" button,
this method will return true.protected boolean isValidData()
true. This method should be
implemented by each dialog that extends this class.public void setComponentLocale(Locale l)
setComponentLocale in interface Internationalizationpublic void setResourceBundle(ResourceBundle resourceBundle)
InternationalizationsetResourceBundle in interface InternationalizationresourceBundle - the new language bundle.public Vector getTextsToTranslate()
InternationalizationgetTextsToTranslate in interface InternationalizationCopyright © 2016 Imatia Innovation S.L.. All rights reserved.