cynosurex.awt
Class TabPanel

java.lang.Object
  extended by java.awt.Component
      extended by cynosurex.awt.TabPanel
All Implemented Interfaces:
cynosurex.internal.AuthorCommon, cynosurex.internal.CommonInterface, cynosurex.internal.CompanyCommon, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener

public class TabPanel
extends java.awt.Component
implements cynosurex.internal.CommonInterface, java.awt.event.MouseListener

A panel showing only tabs. This object is used by the TabbedPanel. It generates a event for its parent when one of the tab is clicked.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static int border_height
          the height of the border (predefined).
static int border_width
          the width of the border (predefined).
static int margin_height
          the height of the margin is predefined.
static int margin_width
          the width of the margin is predefined.
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface cynosurex.internal.CommonInterface
copyright, copyrightYears, notice, program, version
 
Fields inherited from interface cynosurex.internal.AuthorCommon
author, copyrightSymbol, noticeMsg, rights
 
Fields inherited from interface cynosurex.internal.CompanyCommon
company, email, website
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TabPanel()
          Constructs and initializes a tabbed panel.
 
Method Summary
 void add(java.lang.String name)
          Adds a name to the list of tabs.
 void addTabListener(TabListener listener)
           
 java.awt.Dimension getMinimumSize()
          Returns the minimum size of the panel.
 java.awt.Dimension getPreferredSize()
          Returns the preferred size of the panel.
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
          Determine which tab the mouse clicked on.
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics g)
          Paint routine to fill in the panel with tabs.
 void removeTabListener(TabListener listener)
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

border_height

public static int border_height
the height of the border (predefined).


border_width

public static int border_width
the width of the border (predefined).


margin_height

public static int margin_height
the height of the margin is predefined.


margin_width

public static int margin_width
the width of the margin is predefined.

Constructor Detail

TabPanel

public TabPanel()
Constructs and initializes a tabbed panel.

Method Detail

add

public void add(java.lang.String name)
Adds a name to the list of tabs.

Parameters:
name - name to add

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Determine which tab the mouse clicked on.

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

paint

public void paint(java.awt.Graphics g)
Paint routine to fill in the panel with tabs.

Overrides:
paint in class java.awt.Component
Parameters:
g - graphics object passed in by the Java Virtual Machine

getPreferredSize

public java.awt.Dimension getPreferredSize()
Returns the preferred size of the panel.

Overrides:
getPreferredSize in class java.awt.Component

getMinimumSize

public java.awt.Dimension getMinimumSize()
Returns the minimum size of the panel.

Overrides:
getMinimumSize in class java.awt.Component

addTabListener

public void addTabListener(TabListener listener)

removeTabListener

public void removeTabListener(TabListener listener)