public class PopPanelHost
extends javax.swing.JLayeredPane
javax.swing.JLayeredPane.AccessibleJLayeredPane
javax.swing.JComponent.AccessibleJComponent
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
PopPanelHost()
Creates a 'PopPanelHost' object.
|
PopPanelHost(boolean doubleBuffFlag)
Creates a 'PopPanelHost' object.
|
Modifier and Type | Method and Description |
---|---|
java.awt.Cursor |
getButtonCursor()
Returns the last value sent to 'setButtonCursor()', or null if
that function was never called.
|
javax.swing.JPanel |
getMainPanel()
Returns main content panel.
|
boolean |
getPopButtonPressedFlag()
Determines if the button on the displayed PopPanel was pressed
(resulting in the PopPanel being closed).
|
javax.swing.JPanel |
getPopupHostPanel()
Returns popup host panel.
|
boolean |
isPopupShowing()
Returns true if a popup panel is currently showing.
|
void |
removePopupPanel()
Removes the currently displayed popup panel.
|
void |
removePopupPanel(boolean removeNowFlag)
Removes the currently displayed popup panel.
|
void |
setButtonCursor(java.awt.Cursor buttonCursor)
Sets the cursor to be used with buttons on the popup panel.
|
void |
setLayout(java.awt.LayoutManager mgr)
Override of 'setLayout()' method that throws a runtime exception if
an attempt is made to change the layout on a 'PopPanelHost' object.
|
void |
showPopupPanel(javax.swing.JPanel panel)
Displays the given panel as a popup.
|
void |
showPopupPanel(javax.swing.JPanel panel,
boolean waitFlag,
java.awt.event.ComponentListener cListener)
Displays a generic popup panel with the given title and message.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title)
Displays a popup panel with an "OK" button and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
boolean waitFlag)
Displays a popup panel with an "OK" button.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
boolean waitFlag,
java.lang.String buttonText)
Displays a popup panel.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
java.awt.event.ComponentListener cListener)
Displays a popup panel with an "OK" button and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
int popupCharWidth)
Displays a popup panel with an "OK" button and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
int popupCharWidth,
boolean waitFlag)
Displays a popup panel with an "OK" button.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
int popupCharWidth,
boolean waitFlag,
java.lang.String buttonText)
Displays a popup panel.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
int popupCharWidth,
boolean waitFlag,
java.lang.String buttonText,
java.awt.event.ComponentListener cListener)
Displays a generic popup panel with the given title and message.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
int popupCharWidth,
java.awt.event.ComponentListener cListener)
Displays a popup panel with an "OK" button and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
int popupCharWidth,
java.lang.String buttonText,
java.awt.event.ComponentListener cListener)
Displays a popup panel and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
java.lang.String buttonText)
Displays a popup panel and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
java.lang.String buttonText,
java.awt.event.ComponentListener cListener)
Displays a popup panel and returns immediately.
|
void |
showPopupPanel(java.lang.String message,
java.lang.String title,
java.lang.String buttonText,
int popupCharWidth)
Displays a popup panel and returns immediately.
|
addImpl, getAccessibleContext, getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, paramString, putLayer, remove, removeAll, setLayer, setLayer, setPosition
addAncestorListener, 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, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, 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, reshape, 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, setVisible, unregisterKeyboardAction, update, updateUI
add, 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, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, 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, getFocusCycleRootAncestor, 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, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public PopPanelHost()
public PopPanelHost(boolean doubleBuffFlag)
doubleBuffFlag
- if true then double-buffering is used.public javax.swing.JPanel getMainPanel()
public javax.swing.JPanel getPopupHostPanel()
public void showPopupPanel(java.lang.String message, java.lang.String title)
message
- message text for the panel.title
- title text for the panel.public void showPopupPanel(java.lang.String message, java.lang.String title, int popupCharWidth)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.public void showPopupPanel(java.lang.String message, java.lang.String title, boolean waitFlag)
message
- message text for the panel.title
- title text for the panel.waitFlag
- if true then the calling thread is blocked until
the popup panel is dismissed; if false then this function returns
immediately.public void showPopupPanel(java.lang.String message, java.lang.String title, int popupCharWidth, boolean waitFlag)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.waitFlag
- if true then the calling thread is blocked until
the popup panel is dismissed; if false then this function returns
immediately.public void showPopupPanel(java.lang.String message, java.lang.String title, java.awt.event.ComponentListener cListener)
message
- message text for the panel.title
- title text for the panel.cListener
- a 'ComponentListener' object that is attached to
the popup panel such that its 'componentHidden()' method will be
called after the popup is dismissed.public void showPopupPanel(java.lang.String message, java.lang.String title, int popupCharWidth, java.awt.event.ComponentListener cListener)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.cListener
- a 'ComponentListener' object that is attached to
the popup panel such that its 'componentHidden()' method will be
called after the popup is dismissed.public void showPopupPanel(java.lang.String message, java.lang.String title, java.lang.String buttonText)
message
- message text for the panel.title
- title text for the panel.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.public void showPopupPanel(java.lang.String message, java.lang.String title, java.lang.String buttonText, int popupCharWidth)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.public void showPopupPanel(java.lang.String message, java.lang.String title, boolean waitFlag, java.lang.String buttonText)
message
- message text for the panel.title
- title text for the panel.waitFlag
- if true then the calling thread is blocked until
the popup panel is dismissed; if false then this function returns
immediately.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.public void showPopupPanel(java.lang.String message, java.lang.String title, int popupCharWidth, boolean waitFlag, java.lang.String buttonText)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.waitFlag
- if true then the calling thread is blocked until
the popup panel is dismissed; if false then this function returns
immediately.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.public void showPopupPanel(java.lang.String message, java.lang.String title, java.lang.String buttonText, java.awt.event.ComponentListener cListener)
message
- message text for the panel.title
- title text for the panel.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.cListener
- a 'ComponentListener' object that is attached to
the popup panel such that its 'componentHidden()' method will be
called after the popup is dismissed.public void showPopupPanel(java.lang.String message, java.lang.String title, int popupCharWidth, java.lang.String buttonText, java.awt.event.ComponentListener cListener)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.cListener
- a 'ComponentListener' object that is attached to
the popup panel such that its 'componentHidden()' method will be
called after the popup is dismissed.public void showPopupPanel(java.lang.String message, java.lang.String title, int popupCharWidth, boolean waitFlag, java.lang.String buttonText, java.awt.event.ComponentListener cListener)
message
- message text for the panel.title
- title text for the panel.popupCharWidth
- approximate width for the panel, measured in
characters; or zero for an automatically generated character width.waitFlag
- if true then the calling thread is blocked until
the popup panel is dismissed; if false then this function returns
immediately.buttonText
- if not null then a string containing the text
for the button; if null then no button is displayed.cListener
- a 'ComponentListener' object that is attached to
the popup panel such that its 'componentHidden()' method will be
called after the popup is dismissed.public void showPopupPanel(javax.swing.JPanel panel)
panel
- the panel to display as a popup panel.public void showPopupPanel(javax.swing.JPanel panel, boolean waitFlag, java.awt.event.ComponentListener cListener)
panel
- the panel to display as a popup panel.waitFlag
- if true and the panel is a 'PopPanel' then the
calling thread is blocked until the popup panel is dismissed;
if false then this function returns immediately.cListener
- a 'ComponentListener' object that is attached to
the popup panel such that its 'componentHidden()' method will be
called after the popup is dismissed.public void removePopupPanel()
public void removePopupPanel(boolean removeNowFlag)
removeNowFlag
- if true then the actual work of removing the
popup panel is performed immediately; otherwise it happens via
the component-hidden event.public void setButtonCursor(java.awt.Cursor buttonCursor)
buttonCursor
- button cursorpublic java.awt.Cursor getButtonCursor()
public boolean isPopupShowing()
public boolean getPopButtonPressedFlag()
public void setLayout(java.awt.LayoutManager mgr)
setLayout
in class java.awt.Container
mgr
- layout manager