Class JDialog
java.lang.Object
vaadinx.awt.Component
vaadinx.awt.Container
vaadinx.awt.Window
vaadinx.awt.Dialog
vaadinx.swing.JDialog
- All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, WindowConstants, RootPaneContainer
Emulator for
JDialog. R_leaf_peer_lockdown-locked peer is SJDialog.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Dialog
Dialog.ModalityType -
Field Summary
FieldsFields inherited from class Dialog
DEFAULT_MODALITY_TYPEFields inherited from class Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, FILL_CHROME, FILL_DEFAULT, LEFT_ALIGNMENT, listenerList, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionJDialog()JDialog(Dialog owner, String title, boolean modal, GraphicsConfiguration gc) JDialog(Frame owner, String title, boolean modal, GraphicsConfiguration gc) JDialog(Window owner, String title, Dialog.ModalityType modalityType) JDialog(Window owner, String title, Dialog.ModalityType modalityType, GraphicsConfiguration gc) JDialog(Window owner, Dialog.ModalityType modalityType) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected JRootPaneprotected voidMirror ofJFrame.frameInit, and of the JDK's ownJDialog.dialogInit: build the root pane throughcreateRootPane()and plant it viasetRootPane(JRootPane), then turn root-pane checking on — each as a call, so a subclass override of any hook actually runs (R_no_vaadin_in_api limb 2).Delegates to the root pane, as the JDK's does.intprotected booleanWhetheradd/remove/setLayoutredirect into the content pane.protected Stringprotected voidMirrorsJFrame.processWindowEventminus the EXIT_ON_CLOSE branch — JDialog rejects EXIT_ON_CLOSE at set-time.voidvoidsetContentPane(Container newPane) Delegates to the root pane, as the JDK's does — sodialog.getContentPane()anddialog.getRootPane().getContentPane()are the same pane by construction rather than by a mirror kept in step.voidsetDefaultCloseOperation(int operation) JDialog rejectsEXIT_ON_CLOSEat set-time per JDK contract — only JFrame may terminate the JVM.voidsetGlassPane(Component glass) voidsetJMenuBar(JMenuBar bar) The JDK's one-line delegation togetRootPane().setJMenuBar(menu), which is now literally that — sodialog.setJMenuBar(x)anddialog.getRootPane().setJMenuBar(x)are the same bar.voidsetLayeredPane(JLayeredPane layered) voidsetLayout(LayoutManager manager) Stores the manager and invalidates as AWT does, minus the CSS dispatch — seeWindow.windowLayout.protected voidsetRootPane(JRootPane newRootPane) The JDK's body: remove the outgoing root pane, then add the incoming one, with root-pane checking cleared soaddImpl(Component, Object, int)'s redirect falls through instead of routing the new root pane into the old one's content pane.protected voidsetRootPaneCheckingEnabled(boolean enabled) voidStores the handler and fires"transferHandler"; no drop target is installed.Methods inherited from class Dialog
blocksAfterVisibilityChange, dispose, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, showMethods inherited from class Window
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, applyVisibleToPeer, applyVisibleToPeerImpl, createBufferStrategy, createBufferStrategy, disposePeer, fireWindowEvent, fireWindowFocusEvent, fireWindowStateEvent, getBackground, getBounds, getBounds, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getHeight, getIconImages, getInputContext, getLayout, getLocale, getLocation, getLocation, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getSize, getSize, getToolkit, getWarningString, getWidth, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, getX, getY, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setSize, setSize, toBack, toFrontMethods inherited from class Container
add, add, add, add, add, addContainerListener, addSlotChild, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, fireHierarchyEvent, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, peerContentElement, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeSlotChild, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, update, validate, validateTreeMethods inherited from class Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, applyBackgroundToPeer, awtListeners, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, defaultFillCssClass, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, fireComponentEvent, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isThemeDefault, 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, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, suppressMouseBridge, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, withPeer, withPeerOnLiveUI
-
Field Details
-
rootPane
-
rootPaneCheckingEnabled
protected boolean rootPaneCheckingEnabled
-
-
Constructor Details
-
JDialog
- Throws:
HeadlessException
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
-
JDialog
- Throws:
IllegalArgumentException- ifowneris neither aFramenor aDialog
-
JDialog
public JDialog(Window owner, String title, Dialog.ModalityType modalityType, GraphicsConfiguration gc)
-
-
Method Details
-
dialogInit
protected void dialogInit()Mirror ofJFrame.frameInit, and of the JDK's ownJDialog.dialogInit: build the root pane throughcreateRootPane()and plant it viasetRootPane(JRootPane), then turn root-pane checking on — each as a call, so a subclass override of any hook actually runs (R_no_vaadin_in_api limb 2). Carries the JDK's full five-line body:enableEventsandsetBackgroundare here becauseJDialog.dialogInithas them too, whereJWindow.windowInithas neither — seeJFrame.frameInitfor why both land on deliberate nothings. -
getContentPane
Delegates to the root pane, as the JDK's does.- Specified by:
getContentPanein interfaceRootPaneContainer
-
setContentPane
Delegates to the root pane, as the JDK's does — sodialog.getContentPane()anddialog.getRootPane().getContentPane()are the same pane by construction rather than by a mirror kept in step.- Specified by:
setContentPanein interfaceRootPaneContainer
-
addImpl
-
setLayout
Description copied from class:WindowStores the manager and invalidates as AWT does, minus the CSS dispatch — seeWindow.windowLayout. -
remove
-
setRootPaneCheckingEnabled
protected void setRootPaneCheckingEnabled(boolean enabled) -
isRootPaneCheckingEnabled
protected boolean isRootPaneCheckingEnabled()Whetheradd/remove/setLayoutredirect into the content pane. The redirect consults this method rather than the field, so a subclass override is honoured (R_no_vaadin_in_api second limb, D_r12_provenance). -
getRootPane
- Specified by:
getRootPanein interfaceRootPaneContainer
-
setRootPane
The JDK's body: remove the outgoing root pane, then add the incoming one, with root-pane checking cleared soaddImpl(Component, Object, int)'s redirect falls through instead of routing the new root pane into the old one's content pane. -
createRootPane
-
getLayeredPane
- Specified by:
getLayeredPanein interfaceRootPaneContainer
-
setLayeredPane
- Specified by:
setLayeredPanein interfaceRootPaneContainer
-
getGlassPane
- Specified by:
getGlassPanein interfaceRootPaneContainer
-
setGlassPane
- Specified by:
setGlassPanein interfaceRootPaneContainer
-
getDefaultCloseOperation
public int getDefaultCloseOperation() -
setDefaultCloseOperation
public void setDefaultCloseOperation(int operation) JDialog rejectsEXIT_ON_CLOSEat set-time per JDK contract — only JFrame may terminate the JVM. The other three values are accepted silently. Validation + gesture-disarm delegated to the SJDialog peer (which throwsIllegalArgumentExceptionon unknown values, matching Swing's D_never_fail_on_gaps contract). -
processWindowEvent
MirrorsJFrame.processWindowEventminus the EXIT_ON_CLOSE branch — JDialog rejects EXIT_ON_CLOSE at set-time.- Overrides:
processWindowEventin classDialog
-
setJMenuBar
The JDK's one-line delegation togetRootPane().setJMenuBar(menu), which is now literally that — sodialog.setJMenuBar(x)anddialog.getRootPane().setJMenuBar(x)are the same bar. It is planted in the root pane's layered pane, above the content pane.Fires no
"JMenuBar"property change: neither class fires anything.JInternalFrameis the only class injavax.swingthat does (itsMENU_BAR_PROPERTY), which is why the absence here is a decision and not an oversight (R_decline_effect_only, D_window_fanout). -
getJMenuBar
-
paramString
- Overrides:
paramStringin classDialog
-
getAccessibleContext
- Specified by:
getAccessibleContextin interfaceAccessible- Overrides:
getAccessibleContextin classDialog
-
setTransferHandler
Stores the handler and fires"transferHandler"; no drop target is installed. Window-level drop is not wired —JComponent's ownsetTransferHandleris (D_drag_and_drop) — so what is declined is the effect (R_decline_effect_only, D_owed_events). -
getTransferHandler
-