JIDE 3.5.15

com.jidesoft.grid
Class HierarchicalPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by com.jidesoft.grid.HierarchicalPanel
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
TreeLikeHierarchicalPanel

public class HierarchicalPanel
extends JPanel

HierarchicalPanel is a special panel that is used as container for child component in HierarchicalTable. There are several versions of HierarchicalPanel and they are all extending HierarchicalPanel.

Note: future version of this panel will be resizable. In current version, when _component preferred size changed, the size of this panel will be changed automatically. In the future, we will make this an option. If the size of this panel doesn't change with _component, user will still be able to resize the bottom border to make it bigger or smaller.

Note: This class is part of HierarchicalTable component. In current release, HierarchicalTable is still in beta. Please feel free to try it, give us suggestions and feedback. However we reserve the right to change the public APIs if it's necessary.

See Also:
TreeLikeHierarchicalPanel, HierarchicalTable, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
 
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.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
HierarchicalPanel()
          Creates an empty HierarchicalPanel.
HierarchicalPanel(Component component)
          Creates a HierarchicalPanel.
HierarchicalPanel(Component component, Border border)
          Creates a HierarchicalPanel.
 
Method Summary
 Set getFocusTraversalKeys(int id)
          Overrides to provide TAB and CTRL-TAB as traversal keys so that it won't be affected by JTable.
protected  void initComponents()
          Initializes the layout, sets border, adds listeners etc.
 boolean isTabKeyEnabled()
          Checks if tab and shift-tab key is enabled to traversal focus among components.
 void setComponent(Component component)
          Changes the component of this panel.
 void setComponentOrientation(ComponentOrientation o)
           
protected  void setDefaultBorder()
           
 void setTabKeyEnabled(boolean tabKeyEnabled)
          Enables the tab and shift-tab key to traversal focus among components in child component of HierarchicalTable.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, 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, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, 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, hide, 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, 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

HierarchicalPanel

public HierarchicalPanel()
Creates an empty HierarchicalPanel. To add component to it, using setComponent(java.awt.Component) method.


HierarchicalPanel

public HierarchicalPanel(Component component)
Creates a HierarchicalPanel. The HierarchicalPanel will use BorderLayout. The component passed from the constructor will be added to the CENTER of the BorderLayout. An empty border with a default left margin will be used. If you want to specify your own border, you can use constructor HierarchicalPanel(Component,Border).

Parameters:
component -

HierarchicalPanel

public HierarchicalPanel(Component component,
                         Border border)
Creates a HierarchicalPanel. The HierarchicalPanel will use BorderLayout. The component passed from the constructor will be added to the CENTER of the BorderLayout. The border passed in will be used as the border of this HierarchicalPanel.

Parameters:
component -
border -
Method Detail

setComponent

public void setComponent(Component component)
Changes the component of this panel.

Parameters:
component -

initComponents

protected void initComponents()
Initializes the layout, sets border, adds listeners etc.


setDefaultBorder

protected void setDefaultBorder()

setComponentOrientation

public void setComponentOrientation(ComponentOrientation o)
Overrides:
setComponentOrientation in class Component

isTabKeyEnabled

public boolean isTabKeyEnabled()
Checks if tab and shift-tab key is enabled to traversal focus among components.

Returns:
true if tab key is enabled. By default, it returns true.

setTabKeyEnabled

public void setTabKeyEnabled(boolean tabKeyEnabled)
Enables the tab and shift-tab key to traversal focus among components in child component of HierarchicalTable.

Parameters:
tabKeyEnabled -

getFocusTraversalKeys

public Set getFocusTraversalKeys(int id)
Overrides to provide TAB and CTRL-TAB as traversal keys so that it won't be affected by JTable.

Overrides:
getFocusTraversalKeys in class Container
Parameters:
id -
Returns:
focusTraversalKeys.

JIDE 3.5.15