edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils
Class JTabbedPaneCAPE

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTabbedPane
                          |
                          +--edu.wpi.cs.dsrg.xmldb.xat.component.gui.utils.JTabbedPaneCAPE
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable, javax.swing.SwingConstants

public class JTabbedPaneCAPE
extends javax.swing.JTabbedPane
implements java.awt.event.MouseListener

JTabbedPaneCAPE adds features to the tabbed pane's tab(s). The tabs have an 'X' button to close the tabs. A XATQueryObject can also be associated with each tab.

Author:
Maylene Waltz
See Also:
Serialized Form

Field Summary
 
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
(package private) JTabbedPaneCAPE()
          Constructor makes an empty tabbed pane with the default tab placement of JTabbedPane.TOP.
(package private) JTabbedPaneCAPE(int tabPlacement, int tabLayoutPolicy)
          JTabbedPaneCAPE constructor makes a tabbed pane with the specified tabPlacement and tabLayoutPolicy.
(package private) JTabbedPaneCAPE(int tabPlacement, int tabLayoutPolicy, GUI gui)
          JTabbedPaneCAPE constructor makes a tabbed pane with the specified tabPlacement and tabLayoutPolicy and associates the given Rainstorm gui with this tabbed pane.
 
Method Summary
 void addTab(int index, javax.swing.JComponent component)
          Adds a tab at the specified index in the tabbed pane with the given component.
 void addTab(java.lang.String title, javax.swing.JComponent component)
          Adds a tab with the given title and component to the tabbed pane.
 void addTab(java.lang.String title, javax.swing.JComponent component, java.lang.String paneType)
          Adds a tab with the given title and component to the tabbed pane.
 void addTab(java.lang.String title, java.lang.Object queryObject, javax.swing.JComponent component, java.lang.String paneType)
          Adds a tab with the given component and sets the tab title to: For trees: 'T' + TREE_ID If the given queryObject is an XATTree, then the title is set to 'T' + TREE_ID.
 void mouseClicked(java.awt.event.MouseEvent e)
          Handles the mouseClicked event on a tab.
 void mouseEntered(java.awt.event.MouseEvent e)
          Handles the mouseEntered event on a tab.
 void mouseExited(java.awt.event.MouseEvent e)
          Handles the mouseExited event on a tab.
 void mousePressed(java.awt.event.MouseEvent e)
          Handles the mousePressed event on a tab.
 void mouseReleased(java.awt.event.MouseEvent e)
          Handles the mouseReleased event on a tab.
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, 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
 

Constructor Detail

JTabbedPaneCAPE

JTabbedPaneCAPE()
Constructor makes an empty tabbed pane with the default tab placement of JTabbedPane.TOP.


JTabbedPaneCAPE

JTabbedPaneCAPE(int tabPlacement,
                int tabLayoutPolicy)
JTabbedPaneCAPE constructor makes a tabbed pane with the specified tabPlacement and tabLayoutPolicy.

Parameters:
tabPlacement - the location of the tabs (i.e. JTabbedPane.TOP)
tabLayoutPolicy - the layout policy for the tabs (i.e. JTabbedPane.WRAP_TAB_LAYOUT)

JTabbedPaneCAPE

JTabbedPaneCAPE(int tabPlacement,
                int tabLayoutPolicy,
                GUI gui)
JTabbedPaneCAPE constructor makes a tabbed pane with the specified tabPlacement and tabLayoutPolicy and associates the given Rainstorm gui with this tabbed pane.

Parameters:
tabPlacement - the location of the tabs (i.e. JTabbedPane.TOP)
tabLayoutPolicy - the layout policy for the tabs (i.e. JTabbedPane.WRAP_TAB_LAYOUT)
gui - the GUI this tabbed pane is associated with
Method Detail

addTab

public void addTab(java.lang.String title,
                   javax.swing.JComponent component)
Adds a tab with the given title and component to the tabbed pane.

Parameters:
title - the title for the tab
component - the component to place in the tab's panel

addTab

public void addTab(java.lang.String title,
                   javax.swing.JComponent component,
                   java.lang.String paneType)
Adds a tab with the given title and component to the tabbed pane. The paneType specifies the type of tabbed pane. For example, "QUERY" for the tabbed pane of query graphs and "STATS" for the statistics tabbed pane.

Parameters:
title - the title for the tab
component - the component to place in the tab's panel
paneType - the type of pane specifies the type of tab to use

addTab

public void addTab(int index,
                   javax.swing.JComponent component)
Adds a tab at the specified index in the tabbed pane with the given component.

Parameters:
index - the position in the tabbed pane to add the tab
component - the component to place in the tab's panel

addTab

public void addTab(java.lang.String title,
                   java.lang.Object queryObject,
                   javax.swing.JComponent component,
                   java.lang.String paneType)
Adds a tab with the given component and sets the tab title to: If the given queryObject is an XATTree, then the title is set to 'T' + TREE_ID. The paneType specifies the type of tabbed pane. For example, "QUERY" for the tabbed pane of query graphs and "STATS" for the statistics tabbed pane.

Parameters:
title - the tab title
queryObject - the query object to associate with this tab
component - the component to place in the tab's panel
paneType - the type of pane specifies the type of tab to use

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Handles the mouseClicked event on a tab. If the paneType is "STATS" then hitting 'X' closes the statistics table. If the paneType is "QUERY" then hitting 'X' closes the graph and removes the graph from CAPE's open graphs.

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

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Handles the mouseEntered event on a tab. Does nothing.

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

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Handles the mouseExited event on a tab. Does nothing.

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

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Handles the mousePressed event on a tab. Does nothing.

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

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Handles the mouseReleased event on a tab. Does nothing.

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