public class PanelGroupDialog extends DefaultButtonsPanel implements ButtonsPanelListener, IWindow, IWindowListener, IPanelGroup, IButtonsPanel, Serializable
Graphical component that is represented as an IWindow, and that has two immediate internal
panels, the top is a PanelGroup, and the bottom is a PanelGroupDialog
of PanelGroupDialog.BUTTONS_ACCEPTCANCELAPPLY type.
DefaultButtonsPanel,
Serialized FormJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected static int |
defaultHeight
Default height.
|
protected static int |
defaultWidth
Default width.
|
protected IPanelGroup |
panelGroup
This graphical component has a panel that allows work
IPanel. |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWBOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
PanelGroupDialog(String windowTitle,
IPanelGroup panelGroup)
Default constructor with two parameters, that creates a panel with an
AbstractPanelGroup
on top and another with accept, apply, and cancel buttons on bottom. |
PanelGroupDialog(String additionalInfo,
String windowTitle,
int width,
int height,
byte windowInfoProperties,
IPanelGroup panelGroup)
Default constructor with six parameters, that creates a panel with an
AbstractPanelGroup
on top and another with accept, apply, and cancel buttons on bottom. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept()
Notifies this panel of an accept action.
|
void |
actionButtonPressed(ButtonsPanelEvent e) |
void |
addPanel(IPanel panel)
Adds another
IPanel to this group. |
void |
apply()
Notifies this panel of an apply action.
|
void |
cancel()
Notifies this panel of a cancel action.
|
void |
close()
Closes this
IWindow. |
IPanel |
getActivePanel()
Gets a reference to the active panel in this group.
|
int |
getPanelCount()
Returns the number of panels registered in this group.
|
int |
getPanelInGUICount()
Returns the number of panels registered in this group that are in GUI.
|
Hashtable |
getProperties()
Gets the properties associated to this group of panels.
|
Object |
getReference()
Gets the object that has a a ''semantically'' or ''conceptually'' relation to this panel.
|
WindowInfo |
getWindowInfo()
Gets the initial window properties.
|
Object |
getWindowProfile()
Gets the profile for this window
|
boolean |
isAccepted()
Determines if the last notification received has been IPanel.accept().
|
boolean |
isEnabledAcceptButton()
Determines whether the accept button is enabled.
|
boolean |
isEnabledApplyButton()
Determines whether the apply button is enabled.
|
boolean |
isEnabledCancelButton()
Determines whether the cancel button is enabled.
|
boolean |
isEnabledCloseButton()
Determines whether the close button is enabled.
|
boolean |
isEnabledExitButton()
Determines whether the exit button is enabled.
|
boolean |
isEnabledHideDetailsButton()
Determines whether the hide details button is enabled.
|
boolean |
isEnabledNoButton()
Determines whether the no button is enabled.
|
boolean |
isEnabledPauseButton()
Determines whether the pause button is enabled.
|
boolean |
isEnabledRestartButton()
Determines whether the restart button is enabled.
|
boolean |
isEnabledSaveButton()
Determines whether the save button is enabled.
|
boolean |
isEnabledSeeDetailsButton()
Determines whether the see details button is enabled.
|
boolean |
isEnabledYesButton()
Determines whether the yes button is enabled.
|
boolean |
isPanelInGUI(IPanel panel)
Returns
true if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns false. |
boolean |
isResizable()
Determinates if this panel is resizable or not.
|
void |
loadPanels(IPanelGroupLoader loader)
Tries to load as most as possible panels using an
IPanelGroupLoader. |
void |
removePanel(IPanel panel)
Removes an
IPanel from this group. |
void |
setEnabledAcceptButton(boolean b)
Enables (or disables) the accept button.
|
void |
setEnabledApplyButton(boolean b)
Enables (or disables) the apply button.
|
void |
setEnabledCancelButton(boolean b)
Enables (or disables) the cancel button.
|
void |
setEnabledCloseButton(boolean b)
Enables (or disables) the close button.
|
void |
setEnabledExitButton(boolean b)
Enables (or disables) the exit button.
|
void |
setEnabledHideDetailsButton(boolean b)
Enables (or disables) the hide details button.
|
void |
setEnabledNoButton(boolean b)
Enables (or disables) the no button.
|
void |
setEnabledPauseButton(boolean b)
Enables (or disables) the pause button.
|
void |
setEnabledRestartButton(boolean b)
Enables (or disables) the restart button.
|
void |
setEnabledSaveButton(boolean b)
Enables (or disables) the save button.
|
void |
setEnabledSeeDetailsButton(boolean b)
Enables (or disables) the see details button.
|
void |
setEnabledYesButton(boolean b)
Enables (or disables) the yes button.
|
void |
setPanelInGUI(IPanel panel,
boolean b)
Changes the visibility of an existent panel of this group.
|
void |
setParentPanelGroup(IPanelGroup parent)
Sets the parent of this component.
|
void |
setPreferredSize(Dimension preferredSize) |
void |
updateReference(Object reference)
Updates the reference of all elements of the group with the new one.
|
void |
windowActivated()
This method it is invoked when the window is activated.
|
void |
windowClosed()
This method it is invoked when the window is closed
|
add, add, add, add, add, addButtonPressedListener, getButtonsPanel, getContent, getLayout, getWindow, removeButtonPressedListener, setLayoutgetAccessibleContext, getUI, getUIClassID, paramString, setUI, 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, 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, paint, 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, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateaddContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, 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, 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, transferFocusUpCycleprotected static int defaultWidth
Default width.
protected static int defaultHeight
Default height.
protected IPanelGroup panelGroup
This graphical component has a panel that allows work IPanel.
#getPanelGroup()public PanelGroupDialog(String windowTitle, IPanelGroup panelGroup)
Default constructor with two parameters, that creates a panel with an AbstractPanelGroup
on top and another with accept, apply, and cancel buttons on bottom.
windowTitle - title for this IWindowPanelGroup - kind of panel for work with this IWindowpublic PanelGroupDialog(String additionalInfo, String windowTitle, int width, int height, byte windowInfoProperties, IPanelGroup panelGroup)
Default constructor with six parameters, that creates a panel with an AbstractPanelGroup
on top and another with accept, apply, and cancel buttons on bottom.
Last parameter is the PanelGroup graphical component that
this panel will have, and the previous are information to initialize this IWindow.
additionalInfo - additional information about this IWindowwindowTitle - title for this IWindowwidth - width for this componentheight - height for this componentwindowInfoProperties - properties about the managing of this dialog by AndamiPanelGroup - kind of panel for work with this IWindowpublic boolean isResizable()
Determinates if this panel is resizable or not.
true if it's resizable; false otherwise.public void close()
Closes this IWindow.
public WindowInfo getWindowInfo()
IWindowGets the initial window properties. It must be called just once
from the framework. To get the current WindowInfo from this
window, use
PluginServices.getMDIManager.getWindowInfo(window);
getWindowInfo in interface IWindowpublic void actionButtonPressed(ButtonsPanelEvent e)
actionButtonPressed in interface ButtonsPanelListenerpublic void windowActivated()
IWindowListenerwindowActivated in interface IWindowListenerpublic void windowClosed()
IWindowListenerwindowClosed in interface IWindowListenerpublic void accept()
IPanelGroupNotifies this panel of an accept action.
accept in interface IPanelGrouppublic void addPanel(IPanel panel) throws BaseException
IPanelGroupAdds another IPanel to this group.
addPanel in interface IPanelGrouppanel - the IPanel to addEmptyPanelGroupException - if there was no panel loaded and tries to add a new one, launches this exception
if the panel to add hasn't been registered to this component and then, no remains without panelsEmptyPanelGroupGUIException - if there was no panel loaded and tries to add a new one, launches this exception
if the panel to add hasn't been set to this component graphical interface and then, no remains without panels
in its graphical interfaceBaseExceptionIPanelGroup.loadPanels(IPanelGroupLoader),
IPanelGroup.removePanel(IPanel)public void apply()
IPanelGroupNotifies this panel of an apply action.
apply in interface IPanelGrouppublic void cancel()
IPanelGroupNotifies this panel of a cancel action.
cancel in interface IPanelGrouppublic IPanel getActivePanel()
IPanelGroupGets a reference to the active panel in this group.
getActivePanel in interface IPanelGroupnull if there is no any activepublic Hashtable getProperties()
IPanelGroupGets the properties associated to this group of panels.
getProperties in interface IPanelGrouppublic Object getReference()
IPanelGroupGets the object that has a a ''semantically'' or ''conceptually'' relation to this panel.
getReference in interface IPanelGroupnull if there has reference
to no objectpublic void updateReference(Object reference)
IPanelGroupUpdates the reference of all elements of the group with the new one.
updateReference in interface IPanelGroupreference - type of object that has reference this panel, or null if there has reference
to no objectpublic boolean isAccepted()
IPanelGroupDetermines if the last notification received has been IPanel.accept().
isAccepted in interface IPanelGrouptrue if that has been the last notification received, false otherwisepublic void loadPanels(IPanelGroupLoader loader) throws ListCouldntAddPanelException, EmptyPanelGroupException, EmptyPanelGroupGUIException
IPanelGroupTries to load as most as possible panels using an IPanelGroupLoader.
loadPanels in interface IPanelGrouploader - used to load the panels into this groupListCouldntAddPanelException - list with all exceptions produced loading and adding the panelsEmptyPanelGroupException - launched if there was no exception during the loading and adding processes
but there is no panel registered finally in this componentEmptyPanelGroupGUIException - launched if there was no exception during the loading and adding processes
there is at least one panel registered, but finally none of them is in the graphical interface of this componentIPanelGroup.addPanel(IPanel)public void removePanel(IPanel panel)
IPanelGroupRemoves an IPanel from this group.
removePanel in interface IPanelGrouppanel - the IPanel to removeIPanelGroup.addPanel(IPanel),
IPanelGroup.loadPanels(IPanelGroupLoader)public boolean isPanelInGUI(IPanel panel)
IPanelGroupReturns true if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns false.
isPanelInGUI in interface IPanelGrouptrue if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns falsepublic void setPanelInGUI(IPanel panel, boolean b)
IPanelGroupChanges the visibility of an existent panel of this group. If a panel changes to invisible, then that panel won't be accessible by the user interface. But if changes to visible and was invisible before, then will appear at the same position it was in the user interface. The position is according the order of the insertion at the group. Anyway, the group will have that panel.
setPanelInGUI in interface IPanelGrouppanel - reference to the panel with visibility has changed.b - the new visibility for that panel.public int getPanelCount()
IPanelGroupReturns the number of panels registered in this group.
getPanelCount in interface IPanelGrouppublic int getPanelInGUICount()
IPanelGroupReturns the number of panels registered in this group that are in GUI.
getPanelInGUICount in interface IPanelGrouppublic void setPreferredSize(Dimension preferredSize)
setPreferredSize in class JComponentpublic void setParentPanelGroup(IPanelGroup parent)
IPanelGroupSets the parent of this component. That object must be another IPanelGroup component.
setParentPanelGroup in interface IPanelGroupparent - parent of this componentpublic boolean isEnabledAcceptButton()
IButtonsPanelDetermines whether the accept button is enabled. An enabled component can respond to user input and generate events.
isEnabledAcceptButton in interface IButtonsPaneltrue if the accept button is enabled, false otherwiseIButtonsPanel.setEnabledAcceptButton(boolean)public boolean isEnabledApplyButton()
IButtonsPanelDetermines whether the apply button is enabled. An enabled component can respond to user input and generate events.
isEnabledApplyButton in interface IButtonsPaneltrue if the apply button is enabled, false otherwiseIButtonsPanel.setEnabledApplyButton(boolean)public boolean isEnabledCancelButton()
IButtonsPanelDetermines whether the cancel button is enabled. An enabled component can respond to user input and generate events.
isEnabledCancelButton in interface IButtonsPaneltrue if the cancel button is enabled, false otherwiseIButtonsPanel.setEnabledCancelButton(boolean)public boolean isEnabledCloseButton()
IButtonsPanelDetermines whether the close button is enabled. An enabled component can respond to user input and generate events.
isEnabledCloseButton in interface IButtonsPaneltrue if the close button is enabled, false otherwiseIButtonsPanel.setEnabledCloseButton(boolean)public boolean isEnabledExitButton()
IButtonsPanelDetermines whether the exit button is enabled. An enabled component can respond to user input and generate events.
isEnabledExitButton in interface IButtonsPaneltrue if the exit button is enabled, false otherwiseIButtonsPanel.setEnabledExitButton(boolean)public boolean isEnabledHideDetailsButton()
IButtonsPanelDetermines whether the hide details button is enabled. An enabled component can respond to user input and generate events.
isEnabledHideDetailsButton in interface IButtonsPaneltrue if the hide details button is enabled, false otherwiseIButtonsPanel.setEnabledHideDetailsButton(boolean)public boolean isEnabledNoButton()
IButtonsPanelDetermines whether the no button is enabled. An enabled component can respond to user input and generate events.
isEnabledNoButton in interface IButtonsPaneltrue if the no button is enabled, false otherwiseIButtonsPanel.setEnabledNoButton(boolean)public boolean isEnabledPauseButton()
IButtonsPanelDetermines whether the pause button is enabled. An enabled component can respond to user input and generate events.
isEnabledPauseButton in interface IButtonsPaneltrue if the pause button is enabled, false otherwiseIButtonsPanel.setEnabledPauseButton(boolean)public boolean isEnabledRestartButton()
IButtonsPanelDetermines whether the restart button is enabled. An enabled component can respond to user input and generate events.
isEnabledRestartButton in interface IButtonsPaneltrue if the restart button is enabled, false otherwiseIButtonsPanel.setEnabledRestartButton(boolean)public boolean isEnabledSaveButton()
IButtonsPanelDetermines whether the save button is enabled. An enabled component can respond to user input and generate events.
isEnabledSaveButton in interface IButtonsPaneltrue if the save button is enabled, false otherwiseIButtonsPanel.setEnabledSaveButton(boolean)public boolean isEnabledSeeDetailsButton()
IButtonsPanelDetermines whether the see details button is enabled. An enabled component can respond to user input and generate events.
isEnabledSeeDetailsButton in interface IButtonsPaneltrue if the see details button is enabled, false otherwiseIButtonsPanel.setEnabledSeeDetailsButton(boolean)public boolean isEnabledYesButton()
IButtonsPanelDetermines whether the yes button is enabled. An enabled component can respond to user input and generate events.
isEnabledYesButton in interface IButtonsPaneltrue if the yes button is enabled, false otherwiseIButtonsPanel.setEnabledYesButton(boolean)public void setEnabledAcceptButton(boolean b)
IButtonsPanelEnables (or disables) the accept button.
setEnabledAcceptButton in interface IButtonsPanelb - true to enable the accept button, otherwise falseIButtonsPanel.isEnabledAcceptButton()public void setEnabledApplyButton(boolean b)
IButtonsPanelEnables (or disables) the apply button.
setEnabledApplyButton in interface IButtonsPanelb - true to enable the apply button, otherwise falseIButtonsPanel.isEnabledApplyButton()public void setEnabledCancelButton(boolean b)
IButtonsPanelEnables (or disables) the cancel button.
setEnabledCancelButton in interface IButtonsPanelb - true to enable the cancel button, otherwise falseIButtonsPanel.isEnabledCancelButton()public void setEnabledCloseButton(boolean b)
IButtonsPanelEnables (or disables) the close button.
setEnabledCloseButton in interface IButtonsPanelb - true to enable the close button, otherwise falseIButtonsPanel.isEnabledCloseButton()public void setEnabledExitButton(boolean b)
IButtonsPanelEnables (or disables) the exit button.
setEnabledExitButton in interface IButtonsPanelb - true to enable the exit button, otherwise falseIButtonsPanel.isEnabledExitButton()public void setEnabledHideDetailsButton(boolean b)
IButtonsPanelEnables (or disables) the hide details button.
setEnabledHideDetailsButton in interface IButtonsPanelb - true to enable the hide details button, otherwise falseIButtonsPanel.isEnabledHideDetailsButton()public void setEnabledNoButton(boolean b)
IButtonsPanelEnables (or disables) the no button.
setEnabledNoButton in interface IButtonsPanelb - true to enable the no button, otherwise falseIButtonsPanel.isEnabledNoButton()public void setEnabledPauseButton(boolean b)
IButtonsPanelEnables (or disables) the pause button.
setEnabledPauseButton in interface IButtonsPanelb - true to enable the pause button, otherwise falseIButtonsPanel.isEnabledPauseButton()public void setEnabledRestartButton(boolean b)
IButtonsPanelEnables (or disables) the restart button.
setEnabledRestartButton in interface IButtonsPanelb - true to enable the restart button, otherwise falseIButtonsPanel.isEnabledRestartButton()public void setEnabledSaveButton(boolean b)
IButtonsPanelEnables (or disables) the save button.
setEnabledSaveButton in interface IButtonsPanelb - true to enable the save button, otherwise falseIButtonsPanel.isEnabledSaveButton()public void setEnabledSeeDetailsButton(boolean b)
IButtonsPanelEnables (or disables) the see details button.
setEnabledSeeDetailsButton in interface IButtonsPanelb - true to enable the see details button, otherwise falseIButtonsPanel.isEnabledSeeDetailsButton()public void setEnabledYesButton(boolean b)
IButtonsPanelEnables (or disables) the yes button.
setEnabledYesButton in interface IButtonsPanelb - true to enable the yes button, otherwise falseIButtonsPanel.isEnabledYesButton()public Object getWindowProfile()
IWindowGets the profile for this window
getWindowProfile in interface IWindow