org.opennms.bb.eui.common.components
Class BBTabbedPane

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JTabbedPane
                          |
                          +--org.opennms.bb.eui.common.components.BBTabbedPane
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Serializable, SwingConstants

public class BBTabbedPane
extends JTabbedPane

BBTabbedPane 

 - allows mnemonics to be set for the tabs
 
 - Maintains a hashtable of dirty flags - each instance of this
   has its own dirty flag and its own 'id'. Other UI components that 
   want to check if a particular tabbedpane instance is clean/dirty
   can do so if they know the 'id' of the tabbed pane they are 
   interested in 

Author:
Sowmya
See Also:
Serialized Form

Inner Class Summary
private  class BBTabbedPane.MnemonicAction
           
private  class BBTabbedPane.MnemonicTabbedPaneUI
           
protected  class BBTabbedPane.ModelListener
           
 
Inner classes inherited from class javax.swing.JTabbedPane
JTabbedPane.AccessibleJTabbedPane, JTabbedPane.ModelListener
 
Inner classes inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent, JComponent.ActionStandin, JComponent.IntVector, JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.AWTTreeLock
 
Field Summary
(package private)  int condition
           
(package private) static Hashtable dirtyFlags
           
(package private)  String identifier
           
(package private)  Hashtable mnemonics
           
 
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, haveRegistered, model, pages, tabPlacement, uiClassID
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, actionMap, ACTIONMAP_CREATED, alignmentX, alignmentY, ANCESTOR_INPUTMAP_CREATED, ANCESTOR_USING_BUFFER, ancestorInputMap, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, CREATED_DOUBLE_BUFFER, flags, FOCUS_INPUTMAP_CREATED, focusInputMap, HAS_FOCUS, htmlKey, htmlView, inputVerifier, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, IS_PRINTING, IS_PRINTING_ALL, KEY_EVENTS_ENABLED, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, paintingChild, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, verifyInputWhenFocusTarget, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, WHEN_IN_FOCUSED_WINDOW_BINDINGS, WIF_INPUTMAP_CREATED, windowInputMap
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, needsPaint, printing, printingThreads, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NORTH, NORTH_EAST, NORTH_WEST, 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
BBTabbedPane(String str)
           
 
Method Summary
protected  ChangeListener createChangeListener()
           
protected  void fireStateChanged()
           
 int getMnemonicAt(int index)
           
 int getMnemonicCondition()
           
static boolean isDirty(String id)
          Checks if the tabbedpane whose ID is 'id' is dirty
protected  void processKeyEvent(KeyEvent e)
           
protected  void processMouseEvent(MouseEvent e)
           
static void setDirty(String id, boolean b)
          Sets the dirty flag of the tabbed pane 'id' to 'b'
 void setMnemonicAt(int index, char c)
          Sets mnemonic of the tab at index 'index' to 'c'
 void setMnemonicAt(int index, int keyCode)
          Sets mnemonic of the tab at index 'index' to 'keyCode'
 void setMnemonicCondition(int condition)
           
 void updateUI()
          Updates the UI and sets it back to MnemonicTabbedPaneUI
 
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, compWriteObjectNotify, getAccessibleContext, getBackgroundAt, getBoundsAt, getComponentAt, getDisabledIconAt, getForegroundAt, getIconAt, getModel, getSelectedComponent, getSelectedIndex, getTabCount, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexOfComponent, indexOfTab, indexOfTab, insertTab, isEnabledAt, paramString, readObject, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setEnabledAt, setForegroundAt, setIconAt, setModel, setSelectedComponent, setSelectedIndex, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, writeObject
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, , addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, adjustPaintFlags, alwaysOnTop, checkIfChildObscuredBySibling, clearFocusOwners, componentInputMapChanged, computeVisibleRect, computeVisibleRect, contains, createToolTip, disable, enable, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperties, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getFlag, getGraphics, getHeight, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isFocusTraversable, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paintWithBuffer, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processMouseMotionEvent, putClientProperty, rectangleIsObscured, rectangleIsObscuredBySibling, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, registerWithKeyboardManager, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFlag, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager, unregisterWithKeyboardManager, update
 
Methods inherited from class java.awt.Container
addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, constructComponentName, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resetGC, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

dirtyFlags

static Hashtable dirtyFlags

identifier

String identifier

mnemonics

Hashtable mnemonics

condition

int condition
Constructor Detail

BBTabbedPane

public BBTabbedPane(String str)
Method Detail

updateUI

public void updateUI()
Updates the UI and sets it back to MnemonicTabbedPaneUI
Overrides:
updateUI in class JTabbedPane

createChangeListener

protected ChangeListener createChangeListener()
Overrides:
createChangeListener in class JTabbedPane

fireStateChanged

protected void fireStateChanged()
Overrides:
fireStateChanged in class JTabbedPane

processMouseEvent

protected void processMouseEvent(MouseEvent e)
Overrides:
processMouseEvent in class Component

processKeyEvent

protected void processKeyEvent(KeyEvent e)
Overrides:
processKeyEvent in class JComponent

isDirty

public static boolean isDirty(String id)
Checks if the tabbedpane whose ID is 'id' is dirty

setDirty

public static void setDirty(String id,
                            boolean b)
Sets the dirty flag of the tabbed pane 'id' to 'b'

setMnemonicAt

public void setMnemonicAt(int index,
                          char c)
Sets mnemonic of the tab at index 'index' to 'c'

setMnemonicAt

public void setMnemonicAt(int index,
                          int keyCode)
Sets mnemonic of the tab at index 'index' to 'keyCode'

getMnemonicAt

public int getMnemonicAt(int index)

setMnemonicCondition

public void setMnemonicCondition(int condition)

getMnemonicCondition

public int getMnemonicCondition()