Class AbstractPanel
- All Implemented Interfaces:
ImageObserver,MenuContainer,Serializable,Comparable<IPanel>,Accessible,IPanel
- Direct Known Subclasses:
AbstractFilterQueryJPanel,TreePanel.DefaultPanel
Represents a JPanel adapted to work as a panel of an AbstractPanelGroup.
- Version:
- 16/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 booleanDetermines if this component has changed since it was created, or applied (or accepted).protected booleanIf this panel remains with its initial preferred size of it has been changed.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
ConstructorsConstructorDescriptionInitializes this panel.AbstractPanel(String id, String label, String labelGroup) Initializes this panel using three parameters. -
Method Summary
Modifier and TypeMethodDescriptionintgetID()Gets the panel identifier.getLabel()Gets the identifier of the panel used by aAbstractPanelGroup.Gets the identifier of the panel used to group together differentIPanelpanels in aAbstractPanelGroup.Gets a reference to the object that contains the group which this panel is a member.intThe priority of this properties page.Gets the object that has a ''semantically'' or ''conceptually'' relation to this panel, this is used to groupIPanelpanels on aIPanelGroupobject.booleanDetermines if this panel has changed since it was created, or applied (or accepted or cancelled).protected abstract voidThis method is used by each concrete implementation ofAbstractPanelto execute its particular initialization tasks.booleanGets if this panel will always be applied and accepted (by default), or only when has changed.booleanReturnstrueif this panel belongs to a 'panel group' and it's loaded in the graphical user interface of that component; otherwise returnsfalse.booleanReturns if this panel remains with its initial preferred size of it has been changed.voidResets this panel changed status to its initial value.voidsetAlwaysApplicable(boolean b) Sets if this panel will always be applied and accepted (by default), or only when has changed.voidSets the identifier of the panel used by aAbstractPanelGroup.voidsetInGroupGUI(boolean visible) If this panel belongs to a 'panel group', changes its visibility at the interface of the panel group.voidSets the identifier of the panel used by aAbstractPanelGroup.voidsetLabelGroup(String labelGroup) Sets the identifier of the panel used to group together differentIPanelpanels of aAbstractPanelGroup.voidsetPanelGroup(AbstractPanelGroup panelGroup) Sets a reference to the object that contains the group which this panel is a member.voidsetPreferredSize(Dimension preferredSize) voidsetPriority(int priority) Sets priority of this properties page.voidsetReference(Object ref) Sets a reference to an object that is ''semantically' or 'contextually' related to this panel.toString()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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
remainsWithDefaultPreferredSize
protected boolean remainsWithDefaultPreferredSizeIf this panel remains with its initial preferred size of it has been changed.
- See Also:
-
hasChanged
protected boolean hasChangedDetermines if this component has changed since it was created, or applied (or accepted).
-
-
Constructor Details
-
AbstractPanel
public AbstractPanel()Initializes this panel.
-
AbstractPanel
Initializes this panel using three parameters.
- Parameters:
id- optional attribute that identifies this panellabel- identifier used by aAbstractPanelGroupto identify this panellabelGroup- identifier used to group together differentIPanelpanels in aAbstractPanelGroup
-
-
Method Details
-
initialize
protected abstract void initialize()This method is used by each concrete implementation of
AbstractPanelto execute its particular initialization tasks. -
getID
Description copied from interface:IPanelGets the panel identifier.
. -
getLabel
Description copied from interface:IPanelGets the identifier of the panel used by a
AbstractPanelGroup. -
getLabelGroup
Description copied from interface:IPanelGets the identifier of the panel used to group together different
IPanelpanels in aAbstractPanelGroup.- Specified by:
getLabelGroupin interfaceIPanel- Returns:
- panel label group identifier, or
nullif undefined - See Also:
-
setID
Description copied from interface:IPanelSets the identifier of the panel used by a
AbstractPanelGroup. -
setLabel
Description copied from interface:IPanelSets the identifier of the panel used by a
AbstractPanelGroup. -
setLabelGroup
Description copied from interface:IPanelSets the identifier of the panel used to group together different
IPanelpanels of aAbstractPanelGroup.- Specified by:
setLabelGroupin interfaceIPanel- Parameters:
labelGroup- label group identifier, ornullif undefined- See Also:
-
getReference
Description copied from interface:IPanelGets the object that has a ''semantically'' or ''conceptually'' relation to this panel, this is used to group
IPanelpanels on aIPanelGroupobject.- Specified by:
getReferencein interfaceIPanel- Returns:
- object that has reference this panel, or
nullif there has reference to no object - See Also:
-
setReference
Description copied from interface:IPanelSets a reference to an object that is ''semantically' or 'contextually' related to this panel.
- Specified by:
setReferencein interfaceIPanel- Parameters:
ref- an object- See Also:
-
getPanelGroup
Description copied from interface:IPanelGets a reference to the object that contains the group which this panel is a member.
- Specified by:
getPanelGroupin interfaceIPanel- Returns:
- an object that contains this panel's group
- See Also:
-
setPanelGroup
Description copied from interface:IPanelSets a reference to the object that contains the group which this panel is a member.
- Specified by:
setPanelGroupin interfaceIPanel- Parameters:
panelGroup- object that contains this panel's group- See Also:
-
setInGroupGUI
public void setInGroupGUI(boolean visible) Description copied from interface:IPanelIf this panel belongs to a 'panel group', changes its visibility at the interface of the panel group. If changes to invisible, then this 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 this panel.
- Specified by:
setInGroupGUIin interfaceIPanel- Parameters:
visible- the new visibility for that panel.
-
isInGroupGUI
public boolean isInGroupGUI()Description copied from interface:IPanelReturns
trueif this panel belongs to a 'panel group' and it's loaded in the graphical user interface of that component; otherwise returnsfalse.- Specified by:
isInGroupGUIin interfaceIPanel- Returns:
trueif this panel belongs to a 'panel group' and it's loaded in the graphical user interface of that component
-
toString
-
remainsWithItsDefaultPreferredSize
public boolean remainsWithItsDefaultPreferredSize()Description copied from interface:IPanelReturns if this panel remains with its initial preferred size of it has been changed.
- Specified by:
remainsWithItsDefaultPreferredSizein interfaceIPanel- Returns:
- if this panel remains with its initial preferred size of it has been changed
-
setPreferredSize
- Overrides:
setPreferredSizein classJComponent
-
hasChanged
public boolean hasChanged()Description copied from interface:IPanelDetermines if this panel has changed since it was created, or applied (or accepted or cancelled). The programmer of each panel will be whom would set to
truethat a panel has changed.- Specified by:
hasChangedin interfaceIPanel- Returns:
trueif this panel has changed since it was created, or applied (or accepted or cancelled); otherwisefalse
-
resetChangedStatus
public void resetChangedStatus()Description copied from interface:IPanelResets this panel changed status to its initial value.
- Specified by:
resetChangedStatusin interfaceIPanel
-
setAlwaysApplicable
public void setAlwaysApplicable(boolean b) Description copied from interface:IPanelSets if this panel will always be applied and accepted (by default), or only when has changed.
- Specified by:
setAlwaysApplicablein interfaceIPanel- Parameters:
b- if this panel will always be applied and accepted, or only when has changed- See Also:
-
isAlwaysApplicable
public boolean isAlwaysApplicable()Description copied from interface:IPanelGets if this panel will always be applied and accepted (by default), or only when has changed.
- Specified by:
isAlwaysApplicablein interfaceIPanel- Returns:
- if this panel will always be applied and accepted, or only when has changed
- See Also:
-
getPriority
public int getPriority()Description copied from interface:IPanelThe priority of this properties page. When more high is the priority more to the left are set properties page.- Specified by:
getPriorityin interfaceIPanel- Returns:
- the priority of the properties page
-
setPriority
public void setPriority(int priority) Description copied from interface:IPanelSets priority of this properties page. When more high is the priority more to the left are set properties page.- Specified by:
setPriorityin interfaceIPanel
-
compareTo
- Specified by:
compareToin interfaceComparable<IPanel>
-