public abstract class AbstractPanelGroup extends JPanel implements ChangeListener, IPanelGroup, IButtonsPanel
IPanelGroup,
Serialized FormJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected byte |
ACCEPT_ACTION
Accept action identifier.
|
protected boolean |
accepted
If the last notification received has been accept().
|
protected byte |
APPLY_ACTION
Apply action identifier.
|
protected byte |
CANCEL_ACTION
Cancel action identifier.
|
protected IPanelGroup |
parentPanelGroup
Reference to another
IPanelGroup component which contains this one. |
protected Object |
reference
Object that has a a ''semantically'' or ''conceptually'' relation to this panel.
|
protected ArrayList<IPanel> |
registeredPanels
Array list with all
IPanel of this group. |
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 |
|---|
AbstractPanelGroup(Object reference)
Default constructor of a group of
IPanel. |
| Modifier and Type | Method and Description |
|---|---|
void |
accept()
Notifies this panel of an accept action.
|
void |
addPanel(IPanel panel)
Adds another
IPanel to this group. |
void |
apply()
Notifies this panel of an apply action.
|
protected boolean |
belongsThisGroup(IPanel panel)
Validates if the panel as parameter belongs this panel group.
|
void |
cancel()
Notifies this panel of a cancel action.
|
int |
getPanelCount()
Returns the number of panels registered in this group.
|
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.
|
protected void |
initialize()
This method is used by each concrete implementation of
AbstractPanelGroup to
execute its particular initialization tasks. |
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.
|
protected void |
loadPanel(IPanel panel)
Loads a particular panel.
|
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 |
setParentPanelGroup(IPanelGroup parent)
Sets the parent of this component.
|
abstract void |
stateChanged(ChangeEvent e) |
protected void |
unLoadPanel(IPanel panel)
Unloads a particular panel.
|
void |
updateReference(Object reference)
Updates the reference of all elements of the group with the new one.
|
Collection<IPanel> |
values()
Returns all panels of this group.
|
getAccessibleContext, 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, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, 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, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetActivePanel, getPanelInGUICount, isPanelInGUI, setPanelInGUIprotected boolean accepted
If the last notification received has been accept().
accept()protected Object reference
Object that has a a ''semantically'' or ''conceptually'' relation to this panel.
getReference()protected ArrayList<IPanel> registeredPanels
Array list with all IPanel of this group.
protected final byte ACCEPT_ACTION
Accept action identifier.
protected final byte APPLY_ACTION
Apply action identifier.
protected final byte CANCEL_ACTION
Cancel action identifier.
protected IPanelGroup parentPanelGroup
Reference to another IPanelGroup component which contains this one.
public final Collection<IPanel> values()
Returns all panels of this group.
loadPanels(IPanelGroupLoader),
addPanel(IPanel)protected void initialize()
This method is used by each concrete implementation of AbstractPanelGroup to
execute its particular initialization tasks.
public 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)protected void loadPanel(IPanel panel)
Loads a particular panel. It's supposed that this panel is valid.
panel - the panel to addaddPanel(IPanel),
loadPanels(IPanelGroupLoader)protected boolean belongsThisGroup(IPanel panel)
Validates if the panel as parameter belongs this panel group.
One panel belongs this panel group if have the same references, or
both references are null.
panel - the panel to validatetrue if belong to this group; otherwise falsepublic 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 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 void accept()
IPanelGroupNotifies this panel of an accept action.
accept in interface IPanelGrouppublic 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 abstract void stateChanged(ChangeEvent e)
stateChanged in interface ChangeListenerpublic 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 removePanel(IPanel panel)
IPanelGroupRemoves an IPanel from this group.
removePanel in interface IPanelGrouppanel - the IPanel to removeIPanelGroup.addPanel(IPanel),
IPanelGroup.loadPanels(IPanelGroupLoader)protected void unLoadPanel(IPanel panel)
Unloads a particular panel. It's supposed that this panel is valid.
panel - the panel to addremovePanel(IPanel),
loadPanel(IPanel),
loadPanels(IPanelGroupLoader)public int getPanelCount()
IPanelGroupReturns the number of panels registered in this group.
getPanelCount in interface IPanelGrouppublic 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()