Package com.jidesoft.dialog
Class AbstractDialogPage
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.jidesoft.dialog.AbstractPage
com.jidesoft.dialog.AbstractDialogPage
- All Implemented Interfaces:
Laziness
,ImageObserver
,MenuContainer
,Serializable
,Accessible
AbstractDialogPage is an abstract base class extends AbstractPage. In addition to AbstractPage, this class has some
new properties so that it can be used in dialog.
For example, it can support ButtonEvent which is used by ButtonPanel. In addition, it has title, icon, description and parent attribute.
For example, it can support ButtonEvent which is used by ButtonPanel. In addition, it has title, icon, description and parent attribute.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ButtonEvent
protected String
protected Icon
protected boolean
protected AbstractDialogPage
protected String
static final String
static final String
static final String
static final String
Fields inherited from class com.jidesoft.dialog.AbstractPage
_pageEvent, INVOKE_ON_ALL, INVOKE_ON_NONE, INVOKE_ON_PAINT, INVOKE_ON_REPAINT, INVOKE_ON_UPDATE, INVOKE_ON_VALIDATE
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates an AbstractDialogPage.AbstractDialogPage
(String title) Creates an AbstractDialogPage with title.AbstractDialogPage
(String title, String description) Creates an AbstractDialogPage with title and icon.AbstractDialogPage
(String title, String description, Icon icon) Creates an AbstractDialogPage with title, icon and description.AbstractDialogPage
(String title, String description, Icon icon, AbstractDialogPage parentPage) /** Creates an AbstractDialogPage with title, icon, description and its parent.AbstractDialogPage
(String title, Icon icon) Creates an AbstractDialogPage with title and icon. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds aButtonListener
to the page.void
fireButtonEvent
(int id) Fire button event with id.void
fireButtonEvent
(int id, String buttonName) Fire button event with id and button name.void
fireButtonEvent
(int id, String buttonName, String userObject) Fire button event with id, button name and user object if needed.void
Focus the default focus component if not null.Returns an array of all theButtonListener
s added to thisPage
withButtonListener
.Gets the default focus component.Gets the description of the page.Gets the full title.getIcon()
Gets the icon of the page.Gets the parent page.getTitle()
Gets the title of the page.boolean
Checks if the page is enabled.void
Removes aButtonListener
from the page.void
setDefaultFocusComponent
(Component defaultFocusComponent) Sets the default focus component.void
setDescription
(String description) Sets the description of the page.void
Sets the icon of the page.void
setPageEnabled
(boolean pageEnabled) Sets page enabled or disabled.void
setParentPage
(AbstractDialogPage parentPage) Sets the parent page.void
Sets the title of the page.Methods inherited from class com.jidesoft.dialog.AbstractPage
addPageListener, allowClosing, firePageEvent, firePageEvent, getInvokeCondition, getPageListeners, initialize, invalidate, paint, paintAll, paintComponents, removePageListener, repaint, repaint, repaint, repaint, reset, revalidate, setAllowClosing, setInvokeCondition, update
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, 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, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, 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
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
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, 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, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.jidesoft.dialog.Laziness
lazyInitialize
-
Field Details
-
_buttonEvent
-
_title
-
_description
-
_icon
-
_pageEnabled
protected boolean _pageEnabled -
_parentPage
-
TITLE_PROPERTY
- See Also:
-
DESCRIPTION_PROPERTY
- See Also:
-
ICON_PROPERTY
- See Also:
-
PROPERTY_PAGE_ENABLED
- See Also:
-
-
Constructor Details
-
AbstractDialogPage
protected AbstractDialogPage()Creates an AbstractDialogPage. -
AbstractDialogPage
Creates an AbstractDialogPage with title.- Parameters:
title
- the title of the page
-
AbstractDialogPage
Creates an AbstractDialogPage with title and icon.- Parameters:
title
- the title of the pagedescription
- the description for the page
-
AbstractDialogPage
Creates an AbstractDialogPage with title and icon.- Parameters:
title
- the title of the pageicon
- the icon of the page
-
AbstractDialogPage
Creates an AbstractDialogPage with title, icon and description.- Parameters:
title
- the title of the pageicon
- the icon of the pagedescription
- the description for the page
-
AbstractDialogPage
public AbstractDialogPage(String title, String description, Icon icon, AbstractDialogPage parentPage) /** Creates an AbstractDialogPage with title, icon, description and its parent.- Parameters:
title
- the title of the pageicon
- the icon of the pagedescription
- the description for the pageparentPage
- the parent of the page
-
-
Method Details
-
addButtonListener
Adds aButtonListener
to the page.- Parameters:
l
- theButtonListener
to be added
-
removeButtonListener
Removes aButtonListener
from the page.- Parameters:
l
- theButtonListener
to be removed
-
getButtonListeners
Returns an array of all theButtonListener
s added to thisPage
withButtonListener
.- Returns:
- all of the
ButtonListener
s added, or an empty array if no listeners have been added - Since:
- 1.4
-
fireButtonEvent
public void fireButtonEvent(int id) Fire button event with id. The only event that doesn't take a button name as parameter is theButtonEvent.CLEAR_DEFAULT_BUTTON
event.- Parameters:
id
-
-
fireButtonEvent
Fire button event with id and button name.- Parameters:
id
-buttonName
-
-
fireButtonEvent
Fire button event with id, button name and user object if needed.- Parameters:
id
-buttonName
-userObject
-
-
getTitle
Gets the title of the page.- Returns:
- the title
-
setTitle
Sets the title of the page.- Parameters:
title
- the new title
-
getIcon
Gets the icon of the page.- Returns:
- the icon of the page.
-
setIcon
Sets the icon of the page.- Parameters:
icon
- the new icon
-
isPageEnabled
public boolean isPageEnabled()Checks if the page is enabled.- Returns:
- true if the page is enabled. Otherwise false.
-
setPageEnabled
public void setPageEnabled(boolean pageEnabled) Sets page enabled or disabled. The only place this flag is used right now is in MultiplePageDialog ICON_STYLE and TAB_STYLE. Disabled page will have a disabled icon or tab as indicator.- Parameters:
pageEnabled
-
-
getDescription
Gets the description of the page.- Returns:
- the description
-
setDescription
Sets the description of the page.- Parameters:
description
- the new description
-
getParentPage
Gets the parent page.- Returns:
- the parent page
-
setParentPage
Sets the parent page.- Parameters:
parentPage
- the parent page
-
getFullTitle
Gets the full title. It is basically a concat of the titles of all its parent with "." in between.- Returns:
- the full qualified title
-
getDefaultFocusComponent
Gets the default focus component. The default focus component will gain focus when page is shown.- Returns:
- the default focus component.
-
setDefaultFocusComponent
Sets the default focus component. The default focus component will gain focus when page is shown.- Parameters:
defaultFocusComponent
- a component inside the page.
-
focusDefaultFocusComponent
public void focusDefaultFocusComponent()Focus the default focus component if not null.
-