|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
cds.gui.CTabbedPane
CTabbedPane class
Nested Class Summary |
Nested classes inherited from class javax.swing.JTabbedPane |
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
(package private) java.lang.String |
actionCommand
|
(package private) java.awt.event.ActionListener |
actionListener
|
private int |
currentDragTab
|
(package private) java.awt.Color[] |
iconColors
|
private int |
pressedTab
|
private Tab |
selectedTab
|
private static java.util.ArrayList |
tabbedPanes
|
private TabList |
tabs
|
Fields inherited from class javax.swing.JTabbedPane |
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
CTabbedPane()
Constructor |
|
CTabbedPane(int tabPlacement)
Constructor |
|
CTabbedPane(int tabPlacement,
int tabLayoutPolicy)
Constructor |
Method Summary | |
void |
add(java.awt.Component p,
java.lang.String name,
int pos)
Add a component to the TabbedPane at the given position |
void |
add(java.awt.Component p,
java.lang.String name,
java.lang.String tip)
Add a component at the end of the current component list |
void |
addActionListener(java.awt.event.ActionListener al)
Add an action listener to the listener list |
void |
addTab(java.lang.String name,
java.awt.Component p)
Add a component at the end of the current component list |
void |
addTab(java.lang.String name,
javax.swing.Icon ic,
java.awt.Component p)
Add a component at the end of the current component list |
void |
addTab(java.lang.String name,
javax.swing.Icon ic,
java.awt.Component p,
java.lang.String tip)
Add a component at the end of the current component list |
void |
attach_action(java.awt.event.ActionEvent e)
Listener action method to re-attach the designated tab |
void |
attach_action(java.awt.event.WindowEvent e)
Listener action method to re-attach the designated tab, when clicking on the closing button of the window manager |
void |
attach_all_action()
Listener method to re-attach all frames coming from the same TabbedPane object than the one clicked |
private void |
attachFrame(javax.swing.JFrame frame)
Re-attach the content of a frame in its tabbedPane |
private void |
attachFrame(Tab t)
Re-attach the given tab |
static void |
clean_desk()
Listener method to reattach all the frames coming from all tabbed Panes |
private void |
detachTab(int n)
Detach the tab defined by its index |
void |
fireEvent(int type,
int orig,
int dest)
Fire an event when moving a tab |
java.awt.Component |
getComponentAt(java.lang.String tabName)
Return the main component of a tab designated by its name |
java.awt.Component |
getSelectedTab()
Return the main component in the currently selected tab. |
java.awt.Component |
getTab(java.lang.String tabName)
Return the main component of a tab designated by its name |
private void |
init()
Initialisations specific to the CTabbedPane |
protected int |
isInIcon(int x,
int y)
Checks if a coordinate is in the Icon in a tab |
protected int |
isInTab(int x,
int y)
Checks if a coordinate is in a tab |
void |
mouseClicked(java.awt.event.MouseEvent e)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
Mouse dragged. |
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
mouse pressed: define the origin when dragging |
void |
mouseReleased(java.awt.event.MouseEvent e)
mouse released: defines the end tab when dragging. depending on the position (first or second half of the tab), the dragged tab will be inserted left or right of the current one defines the tab to detach when the mouse button was pushed in the icon |
private void |
moveTab(int orig,
int dest)
Move a tab in the tabbedPane |
void |
removeActionListener(java.awt.event.ActionListener al)
Remove an action listener from the listener list |
void |
setActionCommand(java.lang.String actionCommand)
Sets an action command name |
void |
setSelectedName(java.lang.String tabName)
Select the tab according to its name. |
void |
startBlink(java.lang.String tabName)
|
void |
stopBlink(java.lang.String tabName)
|
Methods inherited from class javax.swing.JTabbedPane |
add, add, add, add, add, addChangeListener, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
java.awt.Color[] iconColors
private static java.util.ArrayList tabbedPanes
private TabList tabs
private int pressedTab
private int currentDragTab
private Tab selectedTab
java.awt.event.ActionListener actionListener
java.lang.String actionCommand
Constructor Detail |
public CTabbedPane()
public CTabbedPane(int tabPlacement)
tabPlacement
- Position of the tabs: TabbedPane.TOP,
JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHTpublic CTabbedPane(int tabPlacement, int tabLayoutPolicy)
tabPlacement
- Position of the tabs: TabbedPane.TOP,
JTabbedPane.BOTTOM, JTabbedPane.LEFT, or JTabbedPane.RIGHTtabLayoutPolicy
- Policy to display the tabs when they do not fit
in one line : JTabbedPane.WRAP_TAB_LAYOUT or JTabbedPane.SCROLL_TAB_LAYOUTMethod Detail |
private void init()
public void addTab(java.lang.String name, java.awt.Component p)
name
- name of this tabp
- component to add as a tabpublic void addTab(java.lang.String name, javax.swing.Icon ic, java.awt.Component p)
name
- name of this tabic
- Icone object. NOT USED by this class, which has its own Icon.p
- component to add as a tabpublic void addTab(java.lang.String name, javax.swing.Icon ic, java.awt.Component p, java.lang.String tip)
p
- component to add as a tabic
- Icone object. NOT USED by this class, which has its own Icon.name
- name of this tabtip
- text for the tooltip to be displayedpublic void add(java.awt.Component p, java.lang.String name, java.lang.String tip)
p
- component to add as a tabname
- name of this tabtip
- text for the tooltip to be displayedpublic void add(java.awt.Component p, java.lang.String name, int pos)
p
- component to add as a tabname
- name of this tabpos
- position where to insert the componentpublic void setSelectedName(java.lang.String tabName)
tabName
- name of the tabpublic java.awt.Component getSelectedTab()
public java.awt.Component getComponentAt(java.lang.String tabName)
tabName
- name of the tab
public java.awt.Component getTab(java.lang.String tabName)
tabName
- name of the tab
public void startBlink(java.lang.String tabName)
public void stopBlink(java.lang.String tabName)
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
e
- mouseEvent objectpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
e
- mouseEvent objectpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
e
- MouseEventprotected int isInTab(int x, int y)
x
- X coordinatey
- Y coordinate
protected int isInIcon(int x, int y)
x
- X coordinatey
- Y coordinate
private void moveTab(int orig, int dest)
orig
- initial position of the tab to movedest
- final position of the tabprivate void detachTab(int n)
n
- index in the tabbedPane of the tab to detachpublic void attach_action(java.awt.event.ActionEvent e)
e
- Action Eventpublic void attach_action(java.awt.event.WindowEvent e)
e
- Window Event objectprivate void attachFrame(javax.swing.JFrame frame)
frame
- Frame object to re-attachprivate void attachFrame(Tab t)
t
- Tab object to reattach.public void attach_all_action()
public static void clean_desk()
public void setActionCommand(java.lang.String actionCommand)
actionCommand
- the action command namepublic void addActionListener(java.awt.event.ActionListener al)
al
- the actionListener object that registerspublic void removeActionListener(java.awt.event.ActionListener al)
al
- the actionListener object that registerspublic void fireEvent(int type, int orig, int dest)
type
- type of event (CMotionEvent.MOVE, CMotionEvent.ATTACH,
CMotionEvent.DETACH)orig
- initial position (MOVE, DETACH)dest
- final position (MOVE, ATTACH)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |