public abstract class AbstractPanel extends javax.swing.JPanel implements IPanel
Represents a JPanel
adapted to work as a panel of an AbstractPanelGroup
.
JPanel
,
IPanel
,
AbstractPanelGroup
,
Serialized Formjavax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
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.
|
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
AbstractPanel()
Initializes this panel.
|
AbstractPanel(java.lang.String id,
java.lang.String label,
java.lang.String labelGroup)
Initializes this panel using three parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(IPanel comparedPanel) |
java.lang.String |
getID()
Gets the panel identifier.
|
java.lang.String |
getLabel()
Gets the identifier of the panel used by a
AbstractPanelGroup . |
java.lang.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.
|
java.lang.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(java.lang.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(java.lang.String label)
Sets the identifier of the panel used by a
AbstractPanelGroup . |
void |
setLabelGroup(java.lang.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(java.awt.Dimension preferredSize) |
void |
setPriority(int priority)
Sets priority of this properties page.
|
void |
setReference(java.lang.Object ref)
Sets a reference to an object that is ''semantically' or 'contextually' related to this panel.
|
java.lang.String |
toString() |
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
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, 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, transferFocus, transferFocusBackward, transferFocusUpCycle
protected 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(java.lang.String id, java.lang.String label, java.lang.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 AbstractPanelGroup
protected abstract void initialize()
This method is used by each concrete implementation of AbstractPanel
to
execute its particular initialization tasks.
public java.lang.String getID()
IPanel
Gets the panel identifier.
.getID
in interface IPanel
null
if undefinedIPanel.setID(String)
public java.lang.String getLabel()
IPanel
Gets the identifier of the panel used by a AbstractPanelGroup
.
getLabel
in interface IPanel
null
if undefinedIPanel.setLabel(String)
public java.lang.String getLabelGroup()
IPanel
Gets the identifier of the panel used to group together different IPanel
panels
in a AbstractPanelGroup
.
getLabelGroup
in interface IPanel
null
if undefinedIPanel.setLabelGroup(String)
public void setID(java.lang.String id)
IPanel
Sets the identifier of the panel used by a AbstractPanelGroup
.
setID
in interface IPanel
id
- panel label identifier, or null
if undefinedIPanel.getID()
public void setLabel(java.lang.String label)
IPanel
Sets the identifier of the panel used by a AbstractPanelGroup
.
setLabel
in interface IPanel
label
- panel label identifier, or null
if undefinedIPanel.getLabel()
public void setLabelGroup(java.lang.String labelGroup)
IPanel
Sets the identifier of the panel used to group together different IPanel
panels
of a AbstractPanelGroup
.
setLabelGroup
in interface IPanel
labelGroup
- label group identifier, or null
if undefinedIPanel.getLabelGroup()
public java.lang.Object getReference()
IPanel
Gets 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 IPanel
null
if there has reference
to no objectIPanel.setReference(Object)
public void setReference(java.lang.Object ref)
IPanel
Sets a reference to an object that is ''semantically' or 'contextually' related to this panel.
setReference
in interface IPanel
ref
- an objectIPanel.getReference()
public AbstractPanelGroup getPanelGroup()
IPanel
Gets a reference to the object that contains the group which this panel is a member.
getPanelGroup
in interface IPanel
IPanel.setPanelGroup(AbstractPanelGroup)
public void setPanelGroup(AbstractPanelGroup panelGroup)
IPanel
Sets a reference to the object that contains the group which this panel is a member.
setPanelGroup
in interface IPanel
panelGroup
- object that contains this panel's groupIPanel.getPanelGroup()
public void setInGroupGUI(boolean visible)
IPanel
If 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 IPanel
visible
- the new visibility for that panel.public boolean isInGroupGUI()
IPanel
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
.
isInGroupGUI
in interface IPanel
true
if this panel belongs to a 'panel group' and it's loaded in the graphical user interface
of that componentpublic java.lang.String toString()
toString
in class java.awt.Component
public boolean remainsWithItsDefaultPreferredSize()
IPanel
Returns if this panel remains with its initial preferred size of it has been changed.
remainsWithItsDefaultPreferredSize
in interface IPanel
public void setPreferredSize(java.awt.Dimension preferredSize)
setPreferredSize
in class javax.swing.JComponent
public boolean hasChanged()
IPanel
Determines 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 IPanel
true
if this panel has changed since it was created, or applied (or accepted or cancelled); otherwise false
public void resetChangedStatus()
IPanel
Resets this panel changed status to its initial value.
resetChangedStatus
in interface IPanel
public void setAlwaysApplicable(boolean b)
IPanel
Sets if this panel will always be applied and accepted (by default), or only when has changed.
setAlwaysApplicable
in interface IPanel
b
- if this panel will always be applied and accepted, or only when has changedIPanel.isAlwaysApplicable()
,
IPanel.hasChanged()
public boolean isAlwaysApplicable()
IPanel
Gets if this panel will always be applied and accepted (by default), or only when has changed.
isAlwaysApplicable
in interface IPanel
IPanel.setAlwaysApplicable(boolean)
,
IPanel.hasChanged()
public int getPriority()
IPanel
getPriority
in interface IPanel
public void setPriority(int priority)
IPanel
setPriority
in interface IPanel