public abstract class AbstractPanel extends JPanel implements IPanel
Represents a JPanel adapted to work as a panel of an AbstractPanelGroup.
JPanel,
IPanel,
AbstractPanelGroup,
Serialized FormJPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
protected boolean |
hasChanged
Determines if this component has changed since it was created, or applied (or accepted).
|
protected boolean |
remainsWithDefaultPreferredSize
If this panel remains with its initial preferred size of it has been changed.
|
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 |
|---|
AbstractPanel()
Initializes this panel.
|
AbstractPanel(String id,
String label,
String labelGroup)
Initializes this panel using three parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IPanel comparedPanel) |
String |
getID()
Gets the panel identifier.
|
String |
getLabel()
Gets the identifier of the panel used by a
AbstractPanelGroup. |
String |
getLabelGroup()
Gets the identifier of the panel used to group together different
IPanel panels
in a AbstractPanelGroup. |
AbstractPanelGroup |
getPanelGroup()
Gets a reference to the object that contains the group which this panel is a member.
|
int |
getPriority()
The priority of this properties page.
|
Object |
getReference()
Gets the object that has a ''semantically'' or ''conceptually'' relation to this panel, this is used to group
IPanel panels on a IPanelGroup object. |
boolean |
hasChanged()
Determines if this panel has changed since it was created, or applied (or accepted or cancelled).
|
protected abstract void |
initialize()
This method is used by each concrete implementation of
AbstractPanel to
execute its particular initialization tasks. |
boolean |
isAlwaysApplicable()
Gets if this panel will always be applied and accepted (by default), or only when has changed.
|
boolean |
isInGroupGUI()
Returns
true if this panel belongs to a 'panel group' and it's loaded in the graphical user interface
of that component; otherwise returns false. |
boolean |
remainsWithItsDefaultPreferredSize()
Returns if this panel remains with its initial preferred size of it has been changed.
|
void |
resetChangedStatus()
Resets this panel changed status to its initial value.
|
void |
setAlwaysApplicable(boolean b)
Sets if this panel will always be applied and accepted (by default), or only when has changed.
|
void |
setID(String id)
Sets the identifier of the panel used by a
AbstractPanelGroup. |
void |
setInGroupGUI(boolean visible)
If this panel belongs to a 'panel group', changes its visibility at the interface of the panel group.
|
void |
setLabel(String label)
Sets the identifier of the panel used by a
AbstractPanelGroup. |
void |
setLabelGroup(String labelGroup)
Sets the identifier of the panel used to group together different
IPanel panels
of a AbstractPanelGroup. |
void |
setPanelGroup(AbstractPanelGroup panelGroup)
Sets a reference to the object that contains the group which this panel is a member.
|
void |
setPreferredSize(Dimension preferredSize) |
void |
setPriority(int priority)
Sets priority of this properties page.
|
void |
setReference(Object ref)
Sets a reference to an object that is ''semantically' or 'contextually' related to this panel.
|
String |
toString() |
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, 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, transferFocus, transferFocusBackward, transferFocusUpCycleprotected boolean remainsWithDefaultPreferredSize
If this panel remains with its initial preferred size of it has been changed.
remainsWithItsDefaultPreferredSize()protected boolean hasChanged
Determines if this component has changed since it was created, or applied (or accepted).
public AbstractPanel()
Initializes this panel.
public AbstractPanel(String id, String label, String labelGroup)
Initializes this panel using three parameters.
id - optional attribute that identifies this panellabel - identifier used by a AbstractPanelGroup to identify this panellabelGroup - identifier used to group together different IPanel panels
in a AbstractPanelGroupprotected abstract void initialize()
This method is used by each concrete implementation of AbstractPanel to
execute its particular initialization tasks.
public String getID()
IPanelGets the panel identifier.
.getID in interface IPanelnull if undefinedIPanel.setID(String)public String getLabel()
IPanelGets the identifier of the panel used by a AbstractPanelGroup.
getLabel in interface IPanelnull if undefinedIPanel.setLabel(String)public String getLabelGroup()
IPanelGets the identifier of the panel used to group together different IPanel panels
in a AbstractPanelGroup.
getLabelGroup in interface IPanelnull if undefinedIPanel.setLabelGroup(String)public void setID(String id)
IPanelSets the identifier of the panel used by a AbstractPanelGroup.
setID in interface IPanelid - panel label identifier, or null if undefinedIPanel.getID()public void setLabel(String label)
IPanelSets the identifier of the panel used by a AbstractPanelGroup.
setLabel in interface IPanellabel - panel label identifier, or null if undefinedIPanel.getLabel()public void setLabelGroup(String labelGroup)
IPanelSets the identifier of the panel used to group together different IPanel panels
of a AbstractPanelGroup.
setLabelGroup in interface IPanellabelGroup - label group identifier, or null if undefinedIPanel.getLabelGroup()public Object getReference()
IPanelGets the object that has a ''semantically'' or ''conceptually'' relation to this panel, this is used to group
IPanel panels on a IPanelGroup object.
getReference in interface IPanelnull if there has reference
to no objectIPanel.setReference(Object)public void setReference(Object ref)
IPanelSets a reference to an object that is ''semantically' or 'contextually' related to this panel.
setReference in interface IPanelref - an objectIPanel.getReference()public AbstractPanelGroup getPanelGroup()
IPanelGets a reference to the object that contains the group which this panel is a member.
getPanelGroup in interface IPanelIPanel.setPanelGroup(AbstractPanelGroup)public void setPanelGroup(AbstractPanelGroup panelGroup)
IPanelSets a reference to the object that contains the group which this panel is a member.
setPanelGroup in interface IPanelpanelGroup - object that contains this panel's groupIPanel.getPanelGroup()public void setInGroupGUI(boolean visible)
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.
setInGroupGUI in interface IPanelvisible - the new visibility for that panel.public boolean isInGroupGUI()
IPanelReturns true if this panel belongs to a 'panel group' and it's loaded in the graphical user interface
of that component; otherwise returns false.
isInGroupGUI in interface IPaneltrue if this panel belongs to a 'panel group' and it's loaded in the graphical user interface
of that componentpublic boolean remainsWithItsDefaultPreferredSize()
IPanelReturns if this panel remains with its initial preferred size of it has been changed.
remainsWithItsDefaultPreferredSize in interface IPanelpublic void setPreferredSize(Dimension preferredSize)
setPreferredSize in class JComponentpublic boolean hasChanged()
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 true that a panel has changed.
hasChanged in interface IPaneltrue if this panel has changed since it was created, or applied (or accepted or cancelled); otherwise falsepublic void resetChangedStatus()
IPanelResets this panel changed status to its initial value.
resetChangedStatus in interface IPanelpublic void setAlwaysApplicable(boolean b)
IPanelSets if this panel will always be applied and accepted (by default), or only when has changed.
setAlwaysApplicable in interface IPanelb - if this panel will always be applied and accepted, or only when has changedIPanel.isAlwaysApplicable(),
IPanel.hasChanged()public boolean isAlwaysApplicable()
IPanelGets if this panel will always be applied and accepted (by default), or only when has changed.
isAlwaysApplicable in interface IPanelIPanel.setAlwaysApplicable(boolean),
IPanel.hasChanged()public int getPriority()
IPanelgetPriority in interface IPanelpublic void setPriority(int priority)
IPanelsetPriority in interface IPanelpublic int compareTo(IPanel comparedPanel)
compareTo in interface Comparable<IPanel>