Class AbstractPanelGroup
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,IButtonsPanel,IPanelGroup
- Direct Known Subclasses:
TabbedPanel,TreePanel
- Version:
- 15/10/2007
- Author:
- Pablo Piqueras Bartolomé (pablo.piqueras@iver.es)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final byteAccept action identifier.protected booleanIf the last notification received has been accept().protected final byteApply action identifier.protected final byteCancel action identifier.protected IPanelGroupReference to anotherIPanelGroupcomponent which contains this one.protected ObjectObject that has a a ''semantically'' or ''conceptually'' relation to this panel.Array list with allIPanelof this group.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_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPanelGroup(Object reference) Default constructor of a group ofIPanel. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept()Notifies this panel of an accept action.voidAdds anotherIPanelto this group.voidapply()Notifies this panel of an apply action.protected booleanbelongsThisGroup(IPanel panel) Validates if the panel as parameter belongs this panel group.voidcancel()Notifies this panel of a cancel action.intReturns the number of panels registered in this group.Gets the properties associated to this group of panels.Gets the object that has a a ''semantically'' or ''conceptually'' relation to this panel.protected voidThis method is used by each concrete implementation ofAbstractPanelGroupto execute its particular initialization tasks.booleanDetermines if the last notification received has been IPanel.accept().booleanDetermines whether the accept button is enabled.booleanDetermines whether the apply button is enabled.booleanDetermines whether the cancel button is enabled.booleanDetermines whether the close button is enabled.booleanDetermines whether the exit button is enabled.booleanDetermines whether the hide details button is enabled.booleanDetermines whether the no button is enabled.booleanDetermines whether the pause button is enabled.booleanDetermines whether the restart button is enabled.booleanDetermines whether the save button is enabled.booleanDetermines whether the see details button is enabled.booleanDetermines whether the yes button is enabled.protected voidLoads a particular panel.voidloadPanels(IPanelGroupLoader loader) Tries to load as most as possible panels using anIPanelGroupLoader.voidremovePanel(IPanel panel) Removes anIPanelfrom this group.voidsetEnabledAcceptButton(boolean b) Enables (or disables) the accept button.voidsetEnabledApplyButton(boolean b) Enables (or disables) the apply button.voidsetEnabledCancelButton(boolean b) Enables (or disables) the cancel button.voidsetEnabledCloseButton(boolean b) Enables (or disables) the close button.voidsetEnabledExitButton(boolean b) Enables (or disables) the exit button.voidsetEnabledHideDetailsButton(boolean b) Enables (or disables) the hide details button.voidsetEnabledNoButton(boolean b) Enables (or disables) the no button.voidsetEnabledPauseButton(boolean b) Enables (or disables) the pause button.voidsetEnabledRestartButton(boolean b) Enables (or disables) the restart button.voidsetEnabledSaveButton(boolean b) Enables (or disables) the save button.voidsetEnabledSeeDetailsButton(boolean b) Enables (or disables) the see details button.voidsetEnabledYesButton(boolean b) Enables (or disables) the yes button.voidsetParentPanelGroup(IPanelGroup parent) Sets the parent of this component.abstract voidprotected voidunLoadPanel(IPanel panel) Unloads a particular panel.voidupdateReference(Object reference) Updates the reference of all elements of the group with the new one.final Collection<IPanel> values()Returns all panels of this group.Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, 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, updateMethods 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, 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, validateTreeMethods 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, 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, 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, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gvsig.gui.beans.panelGroup.IPanelGroup
getActivePanel, getPanelInGUICount, isPanelInGUI, setPanelInGUI
-
Field Details
-
accepted
protected boolean acceptedIf the last notification received has been accept().
- See Also:
-
reference
Object that has a a ''semantically'' or ''conceptually'' relation to this panel.
- See Also:
-
registeredPanels
Array list with all
IPanelof this group.- See Also:
-
ACCEPT_ACTION
protected final byte ACCEPT_ACTIONAccept action identifier.
- See Also:
-
APPLY_ACTION
protected final byte APPLY_ACTIONApply action identifier.
- See Also:
-
CANCEL_ACTION
protected final byte CANCEL_ACTIONCancel action identifier.
- See Also:
-
parentPanelGroup
Reference to another
IPanelGroupcomponent which contains this one.
-
-
Constructor Details
-
AbstractPanelGroup
Default constructor of a group of
IPanel.- Parameters:
reference- object that is ''semantically' or 'contextually' related to the group of panels
-
-
Method Details
-
values
Returns all panels of this group.
- Returns:
- panels of this group
- See Also:
-
initialize
protected void initialize()This method is used by each concrete implementation of
AbstractPanelGroupto execute its particular initialization tasks. -
loadPanels
public void loadPanels(IPanelGroupLoader loader) throws ListCouldntAddPanelException, EmptyPanelGroupException, EmptyPanelGroupGUIException Description copied from interface:IPanelGroupTries to load as most as possible panels using an
IPanelGroupLoader.- Specified by:
loadPanelsin interfaceIPanelGroup- Parameters:
loader- used to load the panels into this group- Throws:
ListCouldntAddPanelException- 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 component- See Also:
-
loadPanel
Loads a particular panel. It's supposed that this panel is valid.
- Parameters:
panel- the panel to add- See Also:
-
belongsThisGroup
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.- Parameters:
panel- the panel to validate- Returns:
trueif belong to this group; otherwisefalse
-
isAccepted
public boolean isAccepted()Description copied from interface:IPanelGroupDetermines if the last notification received has been IPanel.accept().
- Specified by:
isAcceptedin interfaceIPanelGroup- Returns:
trueif that has been the last notification received,falseotherwise
-
getProperties
Description copied from interface:IPanelGroupGets the properties associated to this group of panels.
- Specified by:
getPropertiesin interfaceIPanelGroup- Returns:
- properties associated to this group of panels
-
getReference
Description copied from interface:IPanelGroupGets the object that has a a ''semantically'' or ''conceptually'' relation to this panel.
- Specified by:
getReferencein interfaceIPanelGroup- Returns:
- type of object that has reference this panel, or
nullif there has reference to no object
-
updateReference
Description copied from interface:IPanelGroupUpdates the reference of all elements of the group with the new one.
- Specified by:
updateReferencein interfaceIPanelGroup- Parameters:
reference- type of object that has reference this panel, ornullif there has reference to no object
-
accept
public void accept()Description copied from interface:IPanelGroupNotifies this panel of an accept action.
- Specified by:
acceptin interfaceIPanelGroup
-
apply
public void apply()Description copied from interface:IPanelGroupNotifies this panel of an apply action.
- Specified by:
applyin interfaceIPanelGroup
-
cancel
public void cancel()Description copied from interface:IPanelGroupNotifies this panel of a cancel action.
- Specified by:
cancelin interfaceIPanelGroup
-
stateChanged
- Specified by:
stateChangedin interfaceChangeListener
-
addPanel
Description copied from interface:IPanelGroupAdds another
IPanelto this group.- Specified by:
addPanelin interfaceIPanelGroup- Parameters:
panel- theIPanelto add- Throws:
org.gvsig.tools.exception.BaseException- See Also:
-
removePanel
Description copied from interface:IPanelGroupRemoves an
IPanelfrom this group.- Specified by:
removePanelin interfaceIPanelGroup- Parameters:
panel- theIPanelto remove- See Also:
-
unLoadPanel
Unloads a particular panel. It's supposed that this panel is valid.
- Parameters:
panel- the panel to add- See Also:
-
getPanelCount
public int getPanelCount()Description copied from interface:IPanelGroupReturns the number of panels registered in this group.
- Specified by:
getPanelCountin interfaceIPanelGroup- Returns:
- number of panels registered in this group
-
setParentPanelGroup
Description copied from interface:IPanelGroupSets the parent of this component. That object must be another
IPanelGroupcomponent.- Specified by:
setParentPanelGroupin interfaceIPanelGroup- Parameters:
parent- parent of this component
-
isEnabledAcceptButton
public boolean isEnabledAcceptButton()Description copied from interface:IButtonsPanelDetermines whether the accept button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledAcceptButtonin interfaceIButtonsPanel- Returns:
trueif the accept button is enabled,falseotherwise- See Also:
-
isEnabledApplyButton
public boolean isEnabledApplyButton()Description copied from interface:IButtonsPanelDetermines whether the apply button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledApplyButtonin interfaceIButtonsPanel- Returns:
trueif the apply button is enabled,falseotherwise- See Also:
-
isEnabledCancelButton
public boolean isEnabledCancelButton()Description copied from interface:IButtonsPanelDetermines whether the cancel button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledCancelButtonin interfaceIButtonsPanel- Returns:
trueif the cancel button is enabled,falseotherwise- See Also:
-
isEnabledCloseButton
public boolean isEnabledCloseButton()Description copied from interface:IButtonsPanelDetermines whether the close button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledCloseButtonin interfaceIButtonsPanel- Returns:
trueif the close button is enabled,falseotherwise- See Also:
-
isEnabledExitButton
public boolean isEnabledExitButton()Description copied from interface:IButtonsPanelDetermines whether the exit button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledExitButtonin interfaceIButtonsPanel- Returns:
trueif the exit button is enabled,falseotherwise- See Also:
-
isEnabledHideDetailsButton
public boolean isEnabledHideDetailsButton()Description copied from interface:IButtonsPanelDetermines whether the hide details button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledHideDetailsButtonin interfaceIButtonsPanel- Returns:
trueif the hide details button is enabled,falseotherwise- See Also:
-
isEnabledNoButton
public boolean isEnabledNoButton()Description copied from interface:IButtonsPanelDetermines whether the no button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledNoButtonin interfaceIButtonsPanel- Returns:
trueif the no button is enabled,falseotherwise- See Also:
-
isEnabledPauseButton
public boolean isEnabledPauseButton()Description copied from interface:IButtonsPanelDetermines whether the pause button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledPauseButtonin interfaceIButtonsPanel- Returns:
trueif the pause button is enabled,falseotherwise- See Also:
-
isEnabledRestartButton
public boolean isEnabledRestartButton()Description copied from interface:IButtonsPanelDetermines whether the restart button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledRestartButtonin interfaceIButtonsPanel- Returns:
trueif the restart button is enabled,falseotherwise- See Also:
-
isEnabledSaveButton
public boolean isEnabledSaveButton()Description copied from interface:IButtonsPanelDetermines whether the save button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledSaveButtonin interfaceIButtonsPanel- Returns:
trueif the save button is enabled,falseotherwise- See Also:
-
isEnabledSeeDetailsButton
public boolean isEnabledSeeDetailsButton()Description copied from interface:IButtonsPanelDetermines whether the see details button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledSeeDetailsButtonin interfaceIButtonsPanel- Returns:
trueif the see details button is enabled,falseotherwise- See Also:
-
isEnabledYesButton
public boolean isEnabledYesButton()Description copied from interface:IButtonsPanelDetermines whether the yes button is enabled. An enabled component can respond to user input and generate events.
- Specified by:
isEnabledYesButtonin interfaceIButtonsPanel- Returns:
trueif the yes button is enabled,falseotherwise- See Also:
-
setEnabledAcceptButton
public void setEnabledAcceptButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the accept button.
- Specified by:
setEnabledAcceptButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the accept button, otherwisefalse- See Also:
-
setEnabledApplyButton
public void setEnabledApplyButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the apply button.
- Specified by:
setEnabledApplyButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the apply button, otherwisefalse- See Also:
-
setEnabledCancelButton
public void setEnabledCancelButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the cancel button.
- Specified by:
setEnabledCancelButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the cancel button, otherwisefalse- See Also:
-
setEnabledCloseButton
public void setEnabledCloseButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the close button.
- Specified by:
setEnabledCloseButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the close button, otherwisefalse- See Also:
-
setEnabledExitButton
public void setEnabledExitButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the exit button.
- Specified by:
setEnabledExitButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the exit button, otherwisefalse- See Also:
-
setEnabledHideDetailsButton
public void setEnabledHideDetailsButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the hide details button.
- Specified by:
setEnabledHideDetailsButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the hide details button, otherwisefalse- See Also:
-
setEnabledNoButton
public void setEnabledNoButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the no button.
- Specified by:
setEnabledNoButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the no button, otherwisefalse- See Also:
-
setEnabledPauseButton
public void setEnabledPauseButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the pause button.
- Specified by:
setEnabledPauseButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the pause button, otherwisefalse- See Also:
-
setEnabledRestartButton
public void setEnabledRestartButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the restart button.
- Specified by:
setEnabledRestartButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the restart button, otherwisefalse- See Also:
-
setEnabledSaveButton
public void setEnabledSaveButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the save button.
- Specified by:
setEnabledSaveButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the save button, otherwisefalse- See Also:
-
setEnabledSeeDetailsButton
public void setEnabledSeeDetailsButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the see details button.
- Specified by:
setEnabledSeeDetailsButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the see details button, otherwisefalse- See Also:
-
setEnabledYesButton
public void setEnabledYesButton(boolean b) Description copied from interface:IButtonsPanelEnables (or disables) the yes button.
- Specified by:
setEnabledYesButtonin interfaceIButtonsPanel- Parameters:
b-trueto enable the yes button, otherwisefalse- See Also:
-