public abstract class G9DialogFrame extends JInternalFrame
setEnabledComponent
It works as follows:
setEnabledComponent
method or was enabled at the time this component was disabled.
A G9MenuBar might be added to the dialog window. If so, the
G9DesktopPane, will manage the dialog windows menu bar, and merge it with
the application bar when ever the dialog window has focus, and clean up the
application menu bar when needed. Please note that the the menu bar will be
temporarily empty while it is merged with the applications menu bar (the
components in the menu bar can only be in one container).
JInternalFrame.AccessibleJInternalFrame, JInternalFrame.JDesktopIconJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected Map |
componentToName
Map components to names
|
protected Set |
disabledComponents
disabledComponents should contain at any time the disabled
components in the dialog. |
protected EventListenerList |
g9WindowEventListeners
The list of event listeners
|
protected Set |
mnemonicsComponents
(missing javadoc)
|
protected Map |
nameToComponent
Map names to components
|
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTYlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTDISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSEABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
G9DialogFrame()
Default constructor.
|
G9DialogFrame(String title,
boolean resizable,
boolean closable,
boolean maximizable,
boolean iconifable)
Constructs a new dialog frame.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addG9WindowListener(G9WindowListener l)
Adds the specified listener to receive g9 window events from this
g9 window.
|
protected void |
addNotePage(Component page,
G9TabPaneManager manager)
Registers a tab pane and the corresponding tab pane manager.
|
protected void |
addToMnemonicButtons(JButton button)
Internal use.
|
protected void |
cleanUpMnemonicButtons()
Internal use.
|
protected void |
disableComponent(Component component)
Recursivly disables a component and all its children.
|
protected void |
fireG9WindowEvent(int id)
Fires a g9 window event.
|
String |
fromComponentToName(JComponent component)
Returns the name of the attribute displayed by the specified component.
|
JComponent |
fromNameToComponent(String name)
Returns the swing component associated with the specified attribute name.
|
abstract G9DialogController |
getController()
Returns the controller for this dialog.
|
G9MenuBar |
getG9MenuBar()
Gets the
G9MenuBar of this dialog window, or
null if this dialog window does not have a
G9MenuBar set. |
G9ToolBar |
getG9ToolBar()
Gets the
G9ToolBar of this dialog window, or
null if this dialog window does not have a
G9ToolBar set. |
protected Object |
getNullValueForCell(String attribute)
Internal use.
|
protected G9TabPaneManager |
getTabManager(Component page)
Gets the tab pane manager for the specified tab page.
|
boolean |
isEnabledComponent(Component component)
Returns
true if the given component is enabled otherwise
false. |
abstract boolean |
isModal()
Deprecated.
Internal frames support of modality is broken.
|
boolean |
isRegisteredMnemonic(KeyStroke stroke)
Internal use.
|
protected int |
modifyKeyCode(int code)
Deprecated.
(missing javadoc)
|
protected void |
registerMnemonic(int mnemonic)
Internal use.
|
void |
setClosed(boolean b)
Overrides the setClosed method in JInternalFrame.
|
void |
setEnabledComponent(Component component,
boolean enable)
Recursivly enables or disables a component and all its children except
the components in
disableComponents. |
void |
setEnabledComponent(Component component,
boolean enable,
boolean delay)
Internal use only.
|
void |
setG9MenuBar(G9MenuBar menuBar)
Sets this dialog windows menu bar (using the inherited
setJMenuBar(JMenuBar) method). |
void |
setG9ToolBar(G9ToolBar toolBar)
Sets this dialog windows tool bar.
|
void |
setVisible(boolean visible)
Makes the component visible or invisible.
|
void |
setVisible(boolean visible,
boolean firstTimeOpened)
Makes the component visible or invisible.
|
void |
setVisibleComponent(Component component,
boolean visible)
Recursivly hides a component and all its children or recursivly shows a
component and all its children except explicedly hidden children.
|
void |
setVisibleComponent(Component component,
boolean visible,
boolean delay)
Shows or hide the specified component.
|
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected final Set disabledComponents
disabledComponents should contain at any time the disabled
components in the dialog. It is the job of the subclass initialise this
set with "default" hidden dialog components.protected EventListenerList g9WindowEventListeners
protected Map nameToComponent
protected Map componentToName
protected Set mnemonicsComponents
public G9DialogFrame()
public G9DialogFrame(String title, boolean resizable, boolean closable, boolean maximizable, boolean iconifable)
title - the title of the frame (used in title bar)resizable - if true the frame is resizableclosable - if true the frame is closablemaximizable - if true the frame is maxiizableiconifable - if true the frame is iconifableJInternalFrameprotected void addNotePage(Component page, G9TabPaneManager manager)
page - the managed tab pane.manager - the tab pane manager.protected G9TabPaneManager getTabManager(Component page)
page - the tab page.protected void fireG9WindowEvent(int id)
id - the type of the event being fired; one of the following:
G9WindowEvent.G9_DIALOG_VISIBLEG9WindowEvent.G9_DIALOG_CREATEDG9WindowEvent.G9_DIALOG_HIDDENpublic void addG9WindowListener(G9WindowListener l)
l - the g9 window listenerpublic void setVisible(boolean visible)
JInternalFrame.setVisible. Each time a g9 dialog frame
is made visible, it fires a G9WindowEvent, after the frame is
painted.setVisible in class JComponentvisible - true to make the component visible; false to make it invisiblepublic void setVisible(boolean visible,
boolean firstTimeOpened)
callSetAccessPolicy parameter is true the
controller's setAccessPolicy method is invoked before the
opened event is fired (only applies if the window is made visible). The
actual showing/hiding of the internal frame is performed by invoking
super.setVisible(boolean).visible - if true the frame is painted and shown.firstTimeOpened - if true and visible is also
true the setAccessPolicy-method is invoked, and
the opened event is fieredComponent.setVisible(boolean)public void setEnabledComponent(Component component, boolean enable)
disableComponents.component - the component to enable or disableenable - if true the component is enabled.public void setEnabledComponent(Component component, boolean enable, boolean delay)
Recursivly enables or disables a component and all its children except
the components in disableComponents. The delay
parameter controlls wheter the disabling should be delayed or not. If,
true other tasks and events (such as focus shifts) on the
EDT are allowed to finish before this task.
component - the component to enable or disableenable - if true the component is enableddelay - if true the task is put last on the EDTpublic boolean isEnabledComponent(Component component)
true if the given component is enabled otherwise
false.component - a componenttrue if the given component is enabled
otherwise false.protected void disableComponent(Component component)
component - the component to disablepublic void setVisibleComponent(Component component, boolean visible, boolean delay)
component - the component to show or hidevisible - flag indicating if component should be shown or hidden,
true indicating show.delay - flag indicating if component should be shown or hidden
imidiatly or delayed (allowing other tasks on EDT to finish)public void setVisibleComponent(Component component, boolean visible)
component - the component to show or hidevisible - if true the component is shown.public JComponent fromNameToComponent(String name)
name - the name of the attribute, e.g. DomainClass.idpublic String fromComponentToName(JComponent component)
component - the component that displays an attributepublic void setG9MenuBar(G9MenuBar menuBar)
setJMenuBar(JMenuBar) method).
If a dialog window has a G9MenuBar, the menu bar will be automatically merged with the application menu bar when needed. See class description for details.
menuBar - the menu bar of this dialog window.public G9MenuBar getG9MenuBar()
G9MenuBar of this dialog window, or
null if this dialog window does not have a
G9MenuBar set.G9MenuBar of this dialog window.public void setG9ToolBar(G9ToolBar toolBar)
If a dialog window has a G9ToolBar, the tool bar will be automatically merged with the application menu bar when needed. See class description for details.
toolBar - the menu bar of this dialog window.public G9ToolBar getG9ToolBar()
G9ToolBar of this dialog window, or
null if this dialog window does not have a
G9ToolBar set.G9ToolBar of this dialog window.public abstract G9DialogController getController()
@Deprecated protected int modifyKeyCode(int code)
code - (missing javadoc)@Deprecated public abstract boolean isModal()
public void setClosed(boolean b)
setClosed in class JInternalFrameb - not usedprotected Object getNullValueForCell(String attribute)
Used by listblock lines that needs to supply a renderer for a cell
holding a null value. If the cell value is null the line
invokes this method and will pass the resulting value to the
cell-renderer.
false is returned.
null is returned.
attribute - the domain attributeprotected void registerMnemonic(int mnemonic)
mnemonic - the mnemonicprotected void addToMnemonicButtons(JButton button)
button - (missing javadoc)protected void cleanUpMnemonicButtons()
public boolean isRegisteredMnemonic(KeyStroke stroke)
stroke - the stroketrue if the stroke is a registered mnemonicCopyright © 2006–2020 Esito AS. All rights reserved.