public class TearoffTabbedPane
extends javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListenerjavax.swing.JComponent.AccessibleJComponentchangeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUTlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT| Constructor and Description |
|---|
TearoffTabbedPane()
create a new TearoffTabbedPane
|
| Modifier and Type | Method and Description |
|---|---|
void |
addTab(java.lang.String title,
java.awt.Component component) |
void |
addTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component component) |
void |
addTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component component,
java.lang.String tip) |
void |
dock(java.awt.Component c)
return the component into this TearoffTabbedPane.
|
java.awt.event.ComponentListener |
getFrameComponentListener(java.awt.Component panel1,
java.awt.Component frame1,
java.awt.Component panel2,
java.awt.Component frame2,
java.lang.Object direction)
get the listener that will keep the two JFrames close together
|
java.awt.Component |
getTabByTitle(java.lang.String title)
return the tab contents, the first tab with this name.
|
void |
hideMouseAdapter()
I needed a way to hide the mouseAdapter, since we can't do this automatically.
|
void |
insertTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component component,
java.lang.String tip,
int index) |
static void |
main(java.lang.String[] args) |
protected void |
paintComponent(java.awt.Graphics g) |
void |
peek()
show all the tabs descriptions
|
void |
remove(java.awt.Component c) |
void |
removeTabAt(int index) |
void |
setSelectedIndex(int index) |
void |
setSelectedTab(java.lang.String title)
this will set the selected tab, or raise the babysitter
|
void |
slideRight(int tabIndex)
instead of undocking, "slide" the component into a second JFrame that follows the first.
|
void |
tearOff(int tabIndex,
java.awt.Container newContainer) |
protected javax.swing.JFrame |
tearOffIntoFrame(int tabIndex)
create a new Frame to contain the tab that was torn off.
|
add, add, add, add, add, addChangeListener, 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, isEnabledAt, paramString, remove, removeAll, removeChangeListener, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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, updateaddContainerListener, 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, 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, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected void paintComponent(java.awt.Graphics g)
paintComponent in class javax.swing.JComponentpublic void hideMouseAdapter()
public void peek()
public void tearOff(int tabIndex,
java.awt.Container newContainer)
public java.awt.event.ComponentListener getFrameComponentListener(java.awt.Component panel1,
java.awt.Component frame1,
java.awt.Component panel2,
java.awt.Component frame2,
java.lang.Object direction)
panel1 - component within the master frame.frame1 - master frame that controls.panel2 - component within the compliant frameframe2 - compliant frame that follows.direction - the direction, which is STICK_RIGHT (private) or nullpublic void slideRight(int tabIndex)
tabIndex - the tab to slide (0 is the left or first tab)protected javax.swing.JFrame tearOffIntoFrame(int tabIndex)
tabIndex - the tab to slide (0 is the left or first tab)public void dock(java.awt.Component c)
c - the component.public void addTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component component)
addTab in class javax.swing.JTabbedPanepublic void addTab(java.lang.String title,
java.awt.Component component)
addTab in class javax.swing.JTabbedPanepublic void insertTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component component,
java.lang.String tip,
int index)
insertTab in class javax.swing.JTabbedPanepublic void addTab(java.lang.String title,
javax.swing.Icon icon,
java.awt.Component component,
java.lang.String tip)
addTab in class javax.swing.JTabbedPanepublic void remove(java.awt.Component c)
remove in class javax.swing.JTabbedPanepublic java.awt.Component getTabByTitle(java.lang.String title)
title - public void removeTabAt(int index)
removeTabAt in class javax.swing.JTabbedPanepublic void setSelectedIndex(int index)
setSelectedIndex in class javax.swing.JTabbedPanepublic void setSelectedTab(java.lang.String title)
title - public static void main(java.lang.String[] args)