public class TabbedPanel extends AbstractPanelGroup implements Serializable
Graphical interface that's a JPanel
with an inner JTabbedPane
that
contains the IPanel
's of this group, and supports work with them.
AbstractPanelGroup
,
Serialized FormJPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
ACCEPT_ACTION, accepted, APPLY_ACTION, CANCEL_ACTION, parentPanelGroup, reference, registeredPanels
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
TabbedPanel(Object reference)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener l) |
IPanel |
getActivePanel()
Gets a reference to the active panel in this group.
|
ChangeListener[] |
getChangeListeners() |
protected JTabbedPane |
getJTabbedPane()
This method initializes jTabbedPane
|
int |
getPanelInGUICount()
Returns the number of panels registered in this group that are in GUI.
|
int |
getSelectedIndex() |
protected void |
initialize()
This method is used by each concrete implementation of
AbstractPanelGroup to
execute its particular initialization tasks. |
boolean |
isEnabledAt(int index) |
boolean |
isPanelInGUI(IPanel panel)
Returns
true if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns false . |
protected void |
loadPanel(IPanel panel)
Loads a particular panel.
|
void |
removeChangeListener(ChangeListener l) |
void |
setEnabledAt(int index,
boolean enabled) |
void |
setPanelInGUI(IPanel panel,
boolean b)
Changes the visibility of an existent panel of this group.
|
void |
setSelectedIndex(int position) |
void |
stateChanged(ChangeEvent e) |
protected void |
unLoadPanel(IPanel panel)
Unloads a particular panel.
|
accept, addPanel, apply, belongsThisGroup, cancel, getPanelCount, getProperties, getReference, isAccepted, isEnabledAcceptButton, isEnabledApplyButton, isEnabledCancelButton, isEnabledCloseButton, isEnabledExitButton, isEnabledHideDetailsButton, isEnabledNoButton, isEnabledPauseButton, isEnabledRestartButton, isEnabledSaveButton, isEnabledSeeDetailsButton, isEnabledYesButton, loadPanels, removePanel, setEnabledAcceptButton, setEnabledApplyButton, setEnabledCancelButton, setEnabledCloseButton, setEnabledExitButton, setEnabledHideDetailsButton, setEnabledNoButton, setEnabledPauseButton, setEnabledRestartButton, setEnabledSaveButton, setEnabledSeeDetailsButton, setEnabledYesButton, setParentPanelGroup, updateReference, values
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, setPreferredSize, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public TabbedPanel(Object reference)
Default constructor.
reference
- object that is ''semantically' or 'contextually' related to the group of panelsprotected void initialize()
AbstractPanelGroup
This method is used by each concrete implementation of AbstractPanelGroup
to
execute its particular initialization tasks.
initialize
in class AbstractPanelGroup
protected JTabbedPane getJTabbedPane()
public int getSelectedIndex()
public void setSelectedIndex(int position)
protected void loadPanel(IPanel panel)
AbstractPanelGroup
Loads a particular panel. It's supposed that this panel is valid.
loadPanel
in class AbstractPanelGroup
panel
- the panel to addAbstractPanelGroup.addPanel(IPanel)
,
AbstractPanelGroup.loadPanels(IPanelGroupLoader)
protected void unLoadPanel(IPanel panel)
AbstractPanelGroup
Unloads a particular panel. It's supposed that this panel is valid.
unLoadPanel
in class AbstractPanelGroup
panel
- the panel to addAbstractPanelGroup.removePanel(IPanel)
,
AbstractPanelGroup.loadPanel(IPanel)
,
AbstractPanelGroup.loadPanels(IPanelGroupLoader)
public IPanel getActivePanel()
IPanelGroup
Gets a reference to the active panel in this group.
getActivePanel
in interface IPanelGroup
null
if there is no any activepublic void stateChanged(ChangeEvent e)
stateChanged
in interface ChangeListener
stateChanged
in class AbstractPanelGroup
public void setPanelInGUI(IPanel panel, boolean b)
IPanelGroup
Changes the visibility of an existent panel of this group. If a panel changes to invisible, then that 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 that panel.
setPanelInGUI
in interface IPanelGroup
panel
- reference to the panel with visibility has changed.b
- the new visibility for that panel.public boolean isPanelInGUI(IPanel panel)
IPanelGroup
Returns true
if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns false
.
isPanelInGUI
in interface IPanelGroup
true
if the panel as parameter belongs to a this group and it's loaded in the graphical user interface;
otherwise returns false
public void setEnabledAt(int index, boolean enabled)
JTabbedPane.setEnabledAt(int, boolean)
public boolean isEnabledAt(int index)
JTabbedPane.isEnabledAt(int)
public int getPanelInGUICount()
IPanelGroup
Returns the number of panels registered in this group that are in GUI.
getPanelInGUICount
in interface IPanelGroup
public void addChangeListener(ChangeListener l)
public void removeChangeListener(ChangeListener l)
public ChangeListener[] getChangeListeners()
JTabbedPane.getChangeListeners()