public class SIPCommTabbedPane extends javax.swing.JTabbedPane implements javax.swing.event.ChangeListener, Skinnable
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
javax.swing.JComponent.AccessibleJComponent
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
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
Constructor and Description |
---|
SIPCommTabbedPane() |
SIPCommTabbedPane(boolean closingTabs,
boolean maximizingTabs)
Creates the
CloseAndMaxTabbedPane with an enhanced UI if
enhancedUI parameter is set to true . |
Modifier and Type | Method and Description |
---|---|
void |
addCloseListener(CloseListener l)
Adds a
CloseListener to the tabbedPane. |
void |
addDoubleClickListener(DoubleClickListener l)
Adds a
DoubleClickListener to the tabbedPane. |
void |
addMaxListener(MaxListener l)
Adds a
MaxListener to the tabbedPane. |
void |
addPopupOutsideListener(PopupOutsideListener l)
Adds a
PopupOutsideListener to the tabbedPane. |
void |
detachTab(int index)
Detaches the
index tab in a separate frame. |
void |
fireCloseTabEvent(java.awt.event.MouseEvent e,
int overTabIndex)
Sends a
MouseEvent , whose source is this tabbedpane, to
every CloseListener . |
void |
fireDoubleClickTabEvent(java.awt.event.MouseEvent e,
int overTabIndex)
Sends a
MouseEvent , whose source is this tabbedpane, to
every DoubleClickListener . |
void |
fireMaxTabEvent(java.awt.event.MouseEvent e,
int overTabIndex)
Sends a
MouseEvent , whose source is this tabbedpane, to
every MaxListener . |
void |
firePopupOutsideTabEvent(java.awt.event.MouseEvent e)
Sends a
MouseEvent , whose source is this tabbedpane, to
every PopupOutsideListener . |
int |
getOverTabIndex()
Returns the index of the last tab on which the mouse did an action.
|
void |
highlightTab(int tabIndex)
Highlights the tab with the given index.
|
boolean |
isCloseEnabled()
Returns
true if the close icon is enabled. |
boolean |
isMaxEnabled()
Returns
true if the max/detach icon is enabled. |
void |
loadSkin()
Reloads skin information.
|
void |
removeCloseListener(CloseListener l)
Removes a
CloseListener from this tabbedPane. |
void |
removeDoubleClickListener(DoubleClickListener l)
Removes a
DoubleClickListener from this tabbedPane. |
void |
removeMaxListener(MaxListener l)
Removes a
MaxListener from this tabbedPane. |
void |
removePopupOutsideListener(PopupOutsideListener l)
Removes a
PopupOutsideListener from this tabbedPane. |
void |
removeTabAt(int index) |
void |
setCloseIcon(boolean b)
Sets whether the tabbedPane should have a close icon or not.
|
void |
setMaxIcon(boolean b)
Sets whether the tabbedPane should have a max/detach icon or not.
|
void |
setSelectedIndex(int tabIndex)
Overrides setSelectedIndex in JTabbedPane in order to remove the
highlight if the tab which is selected.
|
void |
setTabLayoutPolicy(int tabLayoutPolicy)
Override JTabbedPane method.
|
void |
setTabPlacement(int tabPlacement)
Override JTabbedPane method.
|
void |
stateChanged(javax.swing.event.ChangeEvent e) |
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setTabComponentAt, setTitleAt, setToolTipTextAt, 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, 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
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, 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 SIPCommTabbedPane()
public SIPCommTabbedPane(boolean closingTabs, boolean maximizingTabs)
CloseAndMaxTabbedPane
with an enhanced UI if
enhancedUI
parameter is set to true
.closingTabs
- support for closable tabsmaximizingTabs
- support for maximisable tabspublic int getOverTabIndex()
public boolean isCloseEnabled()
true
if the close icon is enabled.public boolean isMaxEnabled()
true
if the max/detach icon is enabled.public void setTabLayoutPolicy(int tabLayoutPolicy)
setTabLayoutPolicy
in class javax.swing.JTabbedPane
tabLayoutPolicy
- The tab layout policy.public void setTabPlacement(int tabPlacement)
setTabPlacement
in class javax.swing.JTabbedPane
tabPlacement
- The tab placement.public void setCloseIcon(boolean b)
b
- whether the tabbedPane should have a close icon or notpublic void setMaxIcon(boolean b)
b
- whether the tabbedPane should have a max/detach icon or notpublic void detachTab(int index)
index
tab in a separate frame. When the frame
is closed, the tab is automatically reinserted into the tabbedPane.index
- index of the tabbedPane to be detachedpublic void addCloseListener(CloseListener l)
CloseListener
to the tabbedPane.l
- the CloseListener
to addfireCloseTabEvent(java.awt.event.MouseEvent, int)
,
removeCloseListener(net.java.sip.communicator.plugin.desktoputil.event.CloseListener)
public void addMaxListener(MaxListener l)
MaxListener
to the tabbedPane.l
- the MaxListener
to addfireMaxTabEvent(java.awt.event.MouseEvent, int)
,
removeMaxListener(net.java.sip.communicator.plugin.desktoputil.event.MaxListener)
public void addDoubleClickListener(DoubleClickListener l)
DoubleClickListener
to the tabbedPane.l
- the DoubleClickListener
to addfireDoubleClickTabEvent(java.awt.event.MouseEvent, int)
,
removeDoubleClickListener(net.java.sip.communicator.plugin.desktoputil.event.DoubleClickListener)
public void addPopupOutsideListener(PopupOutsideListener l)
PopupOutsideListener
to the tabbedPane.l
- the PopupOutsideListener
to addfirePopupOutsideTabEvent(java.awt.event.MouseEvent)
,
removePopupOutsideListener(net.java.sip.communicator.plugin.desktoputil.event.PopupOutsideListener)
public void removeCloseListener(CloseListener l)
CloseListener
from this tabbedPane.l
- the CloseListener
to removefireCloseTabEvent(java.awt.event.MouseEvent, int)
,
addCloseListener(net.java.sip.communicator.plugin.desktoputil.event.CloseListener)
public void removeMaxListener(MaxListener l)
MaxListener
from this tabbedPane.l
- the MaxListener
to removefireMaxTabEvent(java.awt.event.MouseEvent, int)
,
addMaxListener(net.java.sip.communicator.plugin.desktoputil.event.MaxListener)
public void removeDoubleClickListener(DoubleClickListener l)
DoubleClickListener
from this tabbedPane.l
- the DoubleClickListener
to removefireDoubleClickTabEvent(java.awt.event.MouseEvent, int)
,
addDoubleClickListener(net.java.sip.communicator.plugin.desktoputil.event.DoubleClickListener)
public void removePopupOutsideListener(PopupOutsideListener l)
PopupOutsideListener
from this tabbedPane.l
- the PopupOutsideListener
to removefirePopupOutsideTabEvent(java.awt.event.MouseEvent)
,
addPopupOutsideListener(net.java.sip.communicator.plugin.desktoputil.event.PopupOutsideListener)
public void fireCloseTabEvent(java.awt.event.MouseEvent e, int overTabIndex)
MouseEvent
, whose source is this tabbedpane, to
every CloseListener
. The method also updates the
overTabIndex
of the tabbedPane with a value coming from
the UI. This method method is called each time a MouseEvent
is received from the UI when the user clicks on the close icon of the tab
which index is overTabIndex
.e
- the MouseEvent
to be sentoverTabIndex
- the index of a tab, usually the tab over which the mouse isaddCloseListener(net.java.sip.communicator.plugin.desktoputil.event.CloseListener)
public void fireMaxTabEvent(java.awt.event.MouseEvent e, int overTabIndex)
MouseEvent
, whose source is this tabbedpane, to
every MaxListener
. The method also updates the
overTabIndex
of the tabbedPane with a value coming from
the UI. This method method is called each time a MouseEvent
is received from the UI when the user clicks on the max icon of the tab
which index is overTabIndex
.e
- the MouseEvent
to be sentoverTabIndex
- the index of a tab, usually the tab over which the mouse isaddMaxListener(net.java.sip.communicator.plugin.desktoputil.event.MaxListener)
public void fireDoubleClickTabEvent(java.awt.event.MouseEvent e, int overTabIndex)
MouseEvent
, whose source is this tabbedpane, to
every DoubleClickListener
. The method also updates the
overTabIndex
of the tabbedPane with a value coming from
the UI. This method method is called each time a MouseEvent
is received from the UI when the user double-clicks on the tab which
index is overTabIndex
.e
- the MouseEvent
to be sentoverTabIndex
- the index of a tab, usually the tab over which the mouse isaddDoubleClickListener(net.java.sip.communicator.plugin.desktoputil.event.DoubleClickListener)
public void firePopupOutsideTabEvent(java.awt.event.MouseEvent e)
MouseEvent
, whose source is this tabbedpane, to
every PopupOutsideListener
. The method also sets the
overTabIndex
to -1. This method method is called each time
a MouseEvent
is received from the UI when the user
right-clicks on the inactive part of a tabbedPane.e
- the MouseEvent
to be sentaddPopupOutsideListener(net.java.sip.communicator.plugin.desktoputil.event.PopupOutsideListener)
public void setSelectedIndex(int tabIndex)
setSelectedIndex
in class javax.swing.JTabbedPane
tabIndex
- The index of the tab to be selected.public void highlightTab(int tabIndex)
tabIndex
- The tab index.public void removeTabAt(int index)
removeTabAt
in class javax.swing.JTabbedPane
public void stateChanged(javax.swing.event.ChangeEvent e)
stateChanged
in interface javax.swing.event.ChangeListener
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.