public class PFCDialog extends JDialog
JDialog.AccessibleJDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected static int |
BUTTON_START_LOCATION |
protected JPanel |
mBtnPanel |
protected ArrayList |
mButtonsArray |
protected boolean |
mDialogInitialized |
protected JButton |
mHelpButton |
protected JPanel |
mMainPanel |
protected Gripper |
mOuterPanel |
protected Dimension |
mPreferredBtnSize |
protected JCheckBox |
mSaveAsDefaultChkBox |
protected JPanel |
mTopPanel |
accessibleContext, rootPane, rootPaneCheckingEnabled
DEFAULT_MODALITY_TYPE
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
PFCDialog()
Creates a non-modal dialog without a title and without a specified
Frame owner. |
PFCDialog(Dialog owner)
Creates a non-modal dialog without a title with the
specifed
Dialog as its owner. |
PFCDialog(Dialog owner,
boolean modal)
Creates a modal or non-modal dialog without a title and
with the specified owner dialog.
|
PFCDialog(Dialog owner,
String title)
Creates a non-modal dialog with the specified title and
with the specified owner dialog.
|
PFCDialog(Dialog owner,
String title,
boolean modal)
Creates a modal or non-modal dialog with the specified title
and the specified owner frame.
|
PFCDialog(Dialog owner,
String title,
JPanel mainPanel,
boolean modal)
Creates a modal or non-modal dialog with the specified title,
the specified owner frame and the specified main panel.
|
PFCDialog(Dialog owner,
String title,
JPanel topPanel,
JPanel mainPanel,
boolean modal)
Creates a modal or non-modal dialog with the specified title,
the specified owner frame, the specified main panel and the specified
top panel.
|
PFCDialog(Frame owner)
Creates a non-modal dialog without a title with the
specifed
Frame as its owner. |
PFCDialog(Frame owner,
boolean modal)
Creates a modal or non-modal dialog without a title and
with the specified owner
Frame . |
PFCDialog(Frame owner,
String title)
Creates a non-modal dialog with the specified title and
with the specified owner frame.
|
PFCDialog(Frame owner,
String title,
boolean modal)
Creates a modal or non-modal dialog with the specified title
and the specified owner
Frame . |
PFCDialog(Frame owner,
String title,
JPanel mainPanel,
boolean modal)
Creates a modal or non-modal dialog with the specified title,
the specified owner frame and the specified main panel.
|
PFCDialog(Frame owner,
String title,
JPanel topPanel,
JPanel mainPanel,
boolean modal)
Creates a modal or non-modal dialog with the specified title,
the specified owner frame, the specified main panel and the specified
top panel.
|
Modifier and Type | Method and Description |
---|---|
void |
addButton(JButton button)
Adds the specified button to the right most position on the button panel which
is at the bottom of the dialog.
|
protected static ResourceBundle |
getResourceBundle() |
void |
hideHelpButton()
Hides the help button on the dialog.
|
protected void |
initPFCDialog(JPanel topPanel,
JPanel mainPanel) |
protected void |
initPFCDialogLayout() |
boolean |
isSaveAsDefault()
Returns whether the "Save As Default" check box is being checked.
|
protected void |
setCentered() |
protected void |
setColors(JComponent c) |
void |
setHelpID(ImageIcon helpIcon,
String helpID)
Displays a Help button with the specified icon at the left most position
of the button panel which displays a help page for the specified help ID.
|
void |
setHelpID(String helpID)
Displays a Help button at the left most position of the button panel
which displays a help page for the specified help ID.
|
void |
setMainPanel(JPanel mainPanel)
Sets the main panel in the dialog to be displayed.
|
protected void |
setPanelsLnF() |
protected void |
setPreferredBtnSize() |
void |
setSaveAsDefault()
Displays a "Save as default" check box in between the help button and the
button group.
|
void |
setTopPanel(JPanel topPanel)
Sets the top panel in the dialog to be displayed.
|
void |
setVisible(boolean b) |
static int |
showConfirmDialog(Component owner,
String title,
JPanel topPanel,
JComponent mainPanel)
Convenience wrapper that manages the button display automatically.
|
static int |
showConfirmDialog(Component owner,
String title,
JPanel topPanel,
JComponent mainPanel,
JTextField tf)
Convenience wrapper that manages the button display automatically.
|
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, 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, 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, setModalExclusionType, setSize, setSize, setType, toFront
add, 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, validateTree
action, 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, processKeyEvent, 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, transferFocusUpCycle
protected JButton mHelpButton
protected JCheckBox mSaveAsDefaultChkBox
protected JPanel mTopPanel
protected JPanel mMainPanel
protected JPanel mBtnPanel
protected Gripper mOuterPanel
protected Dimension mPreferredBtnSize
protected ArrayList mButtonsArray
protected boolean mDialogInitialized
protected static final int BUTTON_START_LOCATION
public PFCDialog(Dialog owner)
Dialog
as its owner.owner
- the Dialog
from which the dialog is displayedpublic PFCDialog(Dialog owner, boolean modal)
owner
- the Dialog
from which the dialog is displayedmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic PFCDialog(Dialog owner, String title)
owner
- the Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barpublic PFCDialog(Dialog owner, String title, boolean modal)
owner
- the Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic PFCDialog(Dialog owner, String title, JPanel mainPanel, boolean modal)
owner
- the Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmainPanel
- the JPanel
to display in the dialog's
main areamodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic PFCDialog(Dialog owner, String title, JPanel topPanel, JPanel mainPanel, boolean modal)
owner
- the Dialog
from which the dialog is displayedtitle
- the String
to display in the dialog's
title bartopPanel
- the JPanel
to display in the dialog's
top areamainPanel
- the JPanel
to display in the dialog's
main areamodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic PFCDialog()
Frame
owner. A shared, hidden frame will be
set as the owner of the dialog.public PFCDialog(Frame owner)
Frame
as its owner.owner
- the Frame
from which the dialog is displayedpublic PFCDialog(Frame owner, boolean modal)
Frame
.owner
- the Frame
from which the dialog is displayedmodal
- true for a modal dialog, false for one that allows
others windows to be active at the same timepublic PFCDialog(Frame owner, String title)
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barpublic PFCDialog(Frame owner, String title, boolean modal)
Frame
. All constructors
defer to this one.
NOTE: Any popup components (JComboBox
,
JPopupMenu
, JMenuBar
)
created within a modal dialog will be forced to be lightweight.
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic PFCDialog(Frame owner, String title, JPanel mainPanel, boolean modal)
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title barmainPanel
- the JPanel
to display in the dialog's
main areamodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic PFCDialog(Frame owner, String title, JPanel topPanel, JPanel mainPanel, boolean modal)
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title bartopPanel
- the JPanel
to display in the dialog's
top areamainPanel
- the JPanel
to display in the dialog's
main areamodal
- true for a modal dialog, false for one that allows
other windows to be active at the same timepublic static int showConfirmDialog(Component owner, String title, JPanel topPanel, JComponent mainPanel)
owner
- the Frame
from which the dialog is displayedtitle
- the String
to display in the dialog's
title bartopPanel
- the JPanel
to display in the dialog's
top areamainPanel
- the JPanel
to display in the dialog's
main areapublic static int showConfirmDialog(Component owner, String title, JPanel topPanel, JComponent mainPanel, JTextField tf)
owner
- the Component
on which to center this dialog.
This component should be in a JFrametitle
- the String
to display in the dialog's
title bartopPanel
- the JPanel
to display in the dialog's
top areamainPanel
- the JPanel
to display in the dialog's
main areatf
- JTextField contained in either the topPanel or mainPanel.
Hitting the Enter key in the textfield will have the same
effect as the user pressing the OK button.public void setTopPanel(JPanel topPanel)
topPanel
- the top panel to be displayed in this dialogpublic void setMainPanel(JPanel mainPanel)
mainPanel
- the main panel to be displayed in this dialogpublic void setVisible(boolean b)
setVisible
in class Dialog
public void addButton(JButton button)
button
- the button will be added to the end
of the button panelpublic void setHelpID(String helpID)
helpID
- the help ID to be associated with the help button.public void setHelpID(ImageIcon helpIcon, String helpID)
helpIcon
- the icon to be display on the help button.helpID
- the help ID to be associated with the help button.public void hideHelpButton()
public void setSaveAsDefault()
public boolean isSaveAsDefault()
protected void setCentered()
protected static ResourceBundle getResourceBundle()
protected void initPFCDialogLayout()
protected void setPanelsLnF()
protected void setPreferredBtnSize()
protected void setColors(JComponent c)
Copyright © 2003, 2023, Oracle and/or its affiliates.