public class PanelGroupDialog extends DefaultButtonsPanel implements ButtonsPanelListener, IWindow, IWindowListener, IPanelGroup, IButtonsPanel, java.io.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 Formjavax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
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 . |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
PanelGroupDialog(java.lang.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(java.lang.String additionalInfo,
java.lang.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.
|
java.util.Hashtable |
getProperties()
Gets the properties associated to this group of panels.
|
java.lang.Object |
getReference()
Gets the object that has a a ''semantically'' or ''conceptually'' relation to this panel.
|
WindowInfo |
getWindowInfo()
Gets the initial window properties.
|
java.lang.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(java.awt.Dimension preferredSize) |
void |
updateReference(java.lang.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, setLayout
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
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, 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, update
addContainerListener, 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, 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
protected 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(java.lang.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 IWindow
PanelGroup
- kind of panel for work with this IWindow
public PanelGroupDialog(java.lang.String additionalInfo, java.lang.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 IWindow
windowTitle
- title for this IWindow
width
- width for this componentheight
- height for this componentwindowInfoProperties
- properties about the managing of this dialog by AndamiPanelGroup
- kind of panel for work with this IWindow
public 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()
IWindow
Gets 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 IWindow
public void actionButtonPressed(ButtonsPanelEvent e)
actionButtonPressed
in interface ButtonsPanelListener
public void windowActivated()
IWindowListener
windowActivated
in interface IWindowListener
public void windowClosed()
IWindowListener
windowClosed
in interface IWindowListener
public void accept()
IPanelGroup
Notifies this panel of an accept action.
accept
in interface IPanelGroup
public void addPanel(IPanel panel) throws BaseException
IPanelGroup
Adds another IPanel
to this group.
addPanel
in interface IPanelGroup
panel
- 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 interfaceBaseException
IPanelGroup.loadPanels(IPanelGroupLoader)
,
IPanelGroup.removePanel(IPanel)
public void apply()
IPanelGroup
Notifies this panel of an apply action.
apply
in interface IPanelGroup
public void cancel()
IPanelGroup
Notifies this panel of a cancel action.
cancel
in interface IPanelGroup
public IPanel getActivePanel()
IPanelGroup
Gets a reference to the active panel in this group.
getActivePanel
in interface IPanelGroup
null
if there is no any activepublic java.util.Hashtable getProperties()
IPanelGroup
Gets the properties associated to this group of panels.
getProperties
in interface IPanelGroup
public java.lang.Object getReference()
IPanelGroup
Gets the object that has a a ''semantically'' or ''conceptually'' relation to this panel.
getReference
in interface IPanelGroup
null
if there has reference
to no objectpublic void updateReference(java.lang.Object reference)
IPanelGroup
Updates the reference of all elements of the group with the new one.
updateReference
in interface IPanelGroup
reference
- type of object that has reference this panel, or null
if there has reference
to no objectpublic boolean isAccepted()
IPanelGroup
Determines if the last notification received has been IPanel.accept().
isAccepted
in interface IPanelGroup
true
if that has been the last notification received, false
otherwisepublic void loadPanels(IPanelGroupLoader loader) throws ListCouldntAddPanelException, EmptyPanelGroupException, EmptyPanelGroupGUIException
IPanelGroup
Tries to load as most as possible panels using an IPanelGroupLoader
.
loadPanels
in interface IPanelGroup
loader
- 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)
IPanelGroup
Removes an IPanel
from this group.
removePanel
in interface IPanelGroup
panel
- the IPanel
to removeIPanelGroup.addPanel(IPanel)
,
IPanelGroup.loadPanels(IPanelGroupLoader)
public boolean isPanelInGUI(IPanel panel)
IPanelGroup
Returns 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 IPanelGroup
true
if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns false
public void setPanelInGUI(IPanel panel, boolean b)
IPanelGroup
Changes 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 IPanelGroup
panel
- reference to the panel with visibility has changed.b
- the new visibility for that panel.public int getPanelCount()
IPanelGroup
Returns the number of panels registered in this group.
getPanelCount
in interface IPanelGroup
public int getPanelInGUICount()
IPanelGroup
Returns the number of panels registered in this group that are in GUI.
getPanelInGUICount
in interface IPanelGroup
public void setPreferredSize(java.awt.Dimension preferredSize)
setPreferredSize
in class javax.swing.JComponent
public void setParentPanelGroup(IPanelGroup parent)
IPanelGroup
Sets the parent of this component. That object must be another IPanelGroup
component.
setParentPanelGroup
in interface IPanelGroup
parent
- parent of this componentpublic boolean isEnabledAcceptButton()
IButtonsPanel
Determines whether the accept button is enabled. An enabled component can respond to user input and generate events.
isEnabledAcceptButton
in interface IButtonsPanel
true
if the accept button is enabled, false
otherwiseIButtonsPanel.setEnabledAcceptButton(boolean)
public boolean isEnabledApplyButton()
IButtonsPanel
Determines whether the apply button is enabled. An enabled component can respond to user input and generate events.
isEnabledApplyButton
in interface IButtonsPanel
true
if the apply button is enabled, false
otherwiseIButtonsPanel.setEnabledApplyButton(boolean)
public boolean isEnabledCancelButton()
IButtonsPanel
Determines whether the cancel button is enabled. An enabled component can respond to user input and generate events.
isEnabledCancelButton
in interface IButtonsPanel
true
if the cancel button is enabled, false
otherwiseIButtonsPanel.setEnabledCancelButton(boolean)
public boolean isEnabledCloseButton()
IButtonsPanel
Determines whether the close button is enabled. An enabled component can respond to user input and generate events.
isEnabledCloseButton
in interface IButtonsPanel
true
if the close button is enabled, false
otherwiseIButtonsPanel.setEnabledCloseButton(boolean)
public boolean isEnabledExitButton()
IButtonsPanel
Determines whether the exit button is enabled. An enabled component can respond to user input and generate events.
isEnabledExitButton
in interface IButtonsPanel
true
if the exit button is enabled, false
otherwiseIButtonsPanel.setEnabledExitButton(boolean)
public boolean isEnabledHideDetailsButton()
IButtonsPanel
Determines whether the hide details button is enabled. An enabled component can respond to user input and generate events.
isEnabledHideDetailsButton
in interface IButtonsPanel
true
if the hide details button is enabled, false
otherwiseIButtonsPanel.setEnabledHideDetailsButton(boolean)
public boolean isEnabledNoButton()
IButtonsPanel
Determines whether the no button is enabled. An enabled component can respond to user input and generate events.
isEnabledNoButton
in interface IButtonsPanel
true
if the no button is enabled, false
otherwiseIButtonsPanel.setEnabledNoButton(boolean)
public boolean isEnabledPauseButton()
IButtonsPanel
Determines whether the pause button is enabled. An enabled component can respond to user input and generate events.
isEnabledPauseButton
in interface IButtonsPanel
true
if the pause button is enabled, false
otherwiseIButtonsPanel.setEnabledPauseButton(boolean)
public boolean isEnabledRestartButton()
IButtonsPanel
Determines whether the restart button is enabled. An enabled component can respond to user input and generate events.
isEnabledRestartButton
in interface IButtonsPanel
true
if the restart button is enabled, false
otherwiseIButtonsPanel.setEnabledRestartButton(boolean)
public boolean isEnabledSaveButton()
IButtonsPanel
Determines whether the save button is enabled. An enabled component can respond to user input and generate events.
isEnabledSaveButton
in interface IButtonsPanel
true
if the save button is enabled, false
otherwiseIButtonsPanel.setEnabledSaveButton(boolean)
public boolean isEnabledSeeDetailsButton()
IButtonsPanel
Determines whether the see details button is enabled. An enabled component can respond to user input and generate events.
isEnabledSeeDetailsButton
in interface IButtonsPanel
true
if the see details button is enabled, false
otherwiseIButtonsPanel.setEnabledSeeDetailsButton(boolean)
public boolean isEnabledYesButton()
IButtonsPanel
Determines whether the yes button is enabled. An enabled component can respond to user input and generate events.
isEnabledYesButton
in interface IButtonsPanel
true
if the yes button is enabled, false
otherwiseIButtonsPanel.setEnabledYesButton(boolean)
public void setEnabledAcceptButton(boolean b)
IButtonsPanel
Enables (or disables) the accept button.
setEnabledAcceptButton
in interface IButtonsPanel
b
- true
to enable the accept button, otherwise false
IButtonsPanel.isEnabledAcceptButton()
public void setEnabledApplyButton(boolean b)
IButtonsPanel
Enables (or disables) the apply button.
setEnabledApplyButton
in interface IButtonsPanel
b
- true
to enable the apply button, otherwise false
IButtonsPanel.isEnabledApplyButton()
public void setEnabledCancelButton(boolean b)
IButtonsPanel
Enables (or disables) the cancel button.
setEnabledCancelButton
in interface IButtonsPanel
b
- true
to enable the cancel button, otherwise false
IButtonsPanel.isEnabledCancelButton()
public void setEnabledCloseButton(boolean b)
IButtonsPanel
Enables (or disables) the close button.
setEnabledCloseButton
in interface IButtonsPanel
b
- true
to enable the close button, otherwise false
IButtonsPanel.isEnabledCloseButton()
public void setEnabledExitButton(boolean b)
IButtonsPanel
Enables (or disables) the exit button.
setEnabledExitButton
in interface IButtonsPanel
b
- true
to enable the exit button, otherwise false
IButtonsPanel.isEnabledExitButton()
public void setEnabledHideDetailsButton(boolean b)
IButtonsPanel
Enables (or disables) the hide details button.
setEnabledHideDetailsButton
in interface IButtonsPanel
b
- true
to enable the hide details button, otherwise false
IButtonsPanel.isEnabledHideDetailsButton()
public void setEnabledNoButton(boolean b)
IButtonsPanel
Enables (or disables) the no button.
setEnabledNoButton
in interface IButtonsPanel
b
- true
to enable the no button, otherwise false
IButtonsPanel.isEnabledNoButton()
public void setEnabledPauseButton(boolean b)
IButtonsPanel
Enables (or disables) the pause button.
setEnabledPauseButton
in interface IButtonsPanel
b
- true
to enable the pause button, otherwise false
IButtonsPanel.isEnabledPauseButton()
public void setEnabledRestartButton(boolean b)
IButtonsPanel
Enables (or disables) the restart button.
setEnabledRestartButton
in interface IButtonsPanel
b
- true
to enable the restart button, otherwise false
IButtonsPanel.isEnabledRestartButton()
public void setEnabledSaveButton(boolean b)
IButtonsPanel
Enables (or disables) the save button.
setEnabledSaveButton
in interface IButtonsPanel
b
- true
to enable the save button, otherwise false
IButtonsPanel.isEnabledSaveButton()
public void setEnabledSeeDetailsButton(boolean b)
IButtonsPanel
Enables (or disables) the see details button.
setEnabledSeeDetailsButton
in interface IButtonsPanel
b
- true
to enable the see details button, otherwise false
IButtonsPanel.isEnabledSeeDetailsButton()
public void setEnabledYesButton(boolean b)
IButtonsPanel
Enables (or disables) the yes button.
setEnabledYesButton
in interface IButtonsPanel
b
- true
to enable the yes button, otherwise false
IButtonsPanel.isEnabledYesButton()
public java.lang.Object getWindowProfile()
IWindow
Gets the profile for this window
getWindowProfile
in interface IWindow