com.miginfocom.beans
Class CategoryTreeBean

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.miginfocom.beans.CategoryTreeBean
All Implemented Interfaces:
InteractionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

public class CategoryTreeBean
extends javax.swing.JPanel
implements InteractionListener

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
static java.lang.String CHECK_CLICKED
          The Command Value in for the InteractionEvent that is fired when the label is clicked.
static PropertyKey CHECK_SELECTED_KEY
          This is the default key used to set in the Category a Boolean object denoting if the check box is considered selected or not.
static java.lang.String FOLDER_CHECK_BACKGROUND_SHAPE_NAME
           
static java.lang.String FOLDER_CHECK_IMAGE_SHAPE_NAME
           
static java.lang.String FOLDER_CHECK_OUTLINE_SHAPE_NAME
           
static java.lang.String FOLDER_CONTAINER_SHAPE_NAME
           
static java.lang.String FOLDER_LABEL_SHAPE_NAME
           
static java.lang.String LABEL_CLICKED
          The Command Value in for the InteractionEvent that is fired when the label is clicked.
static PropertyKey LABEL_SELECTED_KEY
          This is the default key used to set in the Category a Boolean object denoting if the label is considered selected or not.
static java.lang.String LEAF_CHECK_BACKGROUND_SHAPE_NAME
           
static java.lang.String LEAF_CHECK_IMAGE_SHAPE_NAME
           
static java.lang.String LEAF_CHECK_OUTLINE_SHAPE_NAME
           
static java.lang.String LEAF_CONTAINER_SHAPE_NAME
           
static java.lang.String LEAF_LABEL_SHAPE_NAME
           
static java.lang.String ROOT_SHAPE_NAME
           
 
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
CategoryTreeBean()
           
 
Method Summary
 void addDecorator(Decorator decorator)
          Adds a decorator.
 void addDecorators(java.util.Collection decorators)
          Calls addDecorator(com.miginfocom.calendar.decorators.Decorator) for every element in the collection.
 void addInteractionListener(InteractionListener l)
          Adds a listener that listens to InteractionEvents.
 void addInteractionListener(InteractionListener l, boolean asWeakRef)
          Adds a listener that listens to InteractionEvents.
 void addNotify()
           
 int getAntiAliasHint()
          Property: The anti alias hint for the label text.
 java.awt.Paint getBackgroundPaint()
          Sets the background paint.
 Category getCategoryAtLocation(int x, int y)
          A hit test that returns the Category for a point.
 boolean getCategoryAutoRevalidate()
          Property: If the categories in the CategoryDepository changes the tree will revalidate itself if there is a category root set.
 CategoryViewFilter getCategoryViewFilter()
          Property: A filter that can be used to filter out which Categories should be visible in the tree.
static java.lang.Boolean getCheckedState(PropertyKey key, Category cat)
          Returns the checked state of a category.
 PropertyKey getCheckSelectedKey()
          Property: This is the key used to set in the Category a Boolean object denoting on if the check is considered selected or not.
 java.util.List getDecorators()
          Returns a cloned list with the decorators currently installed in this tree.
 DemoDataBean getDemoDataBean()
          Property: A reference to a demo data bean that creates demo category data for this bean.
 java.awt.Paint getFolderBackground()
          Property: The anti alias hint for the label text.
 java.awt.Paint getFolderCheckBackground()
          Property: The paint to use for the background of the check.
 java.awt.Cursor getFolderCheckCursor()
          Property: The cursor for when the mouse is over the check.
 java.awt.Paint getFolderCheckForeground()
          Property: The paint to use for the foreground of the check.
 XtdImage getFolderCheckHalfSelectedIcon()
          Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.
 PlaceRect getFolderCheckIconPlaceRect()
          Property: Where in the check shape the icon of the actual check should be placed.
 java.awt.Paint getFolderCheckMouseOverBackground()
          Property: The paint to use for the background of the check when the mouse is hovering over it.
 java.awt.Paint getFolderCheckMouseOverForeground()
          Property: The paint to use for the foreground of the check when the mouse is hovering over it.
 PlaceRect getFolderCheckPlaceRect()
          Property: Where the check outline should be placed within the node.
 XtdImage getFolderCheckSelectedIcon()
          Property: The selected check icon.
 java.awt.Shape getFolderCheckShape()
          Property: The shape outline of the check box.
 int getFolderCheckWidth()
          Property: The width in pixels for the check.
 java.awt.Font getFolderFont()
          Property: The font used to draw the label.
 java.awt.Color getFolderForeground()
          Property: The foreground color used to draw the label.
 int getFolderIconTextGap()
          Property: The gap in pixels between the icon and text.
 java.awt.Cursor getFolderLabelCursor()
          Property: The hover mouse cursor over the label.
 java.awt.Paint getFolderMouseOverBackground()
          Property: Background paint when the mouse is hovering over the node.
 java.awt.Font getFolderMouseOverFont()
          Property: The font when the mouse is hovering over the node.
 java.awt.Color getFolderMouseOverForeground()
          Property: Foreground paint when the mouse is hovering over the node.
 java.lang.Integer getFolderMouseOverUnderline()
          Property: The underline width.
 int getFolderRowHeight()
          Property: The height in pixels for every row in the tree.
 java.awt.Paint getFolderSelectedBackground()
          Property: The background if the node label is selected.
 java.awt.Font getFolderSelectedFont()
          Property: The font if the node label is selected.
 java.awt.Color getFolderSelectedForeground()
          Property: The foreground if the node label is selected.
 java.lang.Integer getFolderSelectedUnderline()
          Property: The underline width if the node label is selected.
 java.lang.Integer getFolderUnderline()
          Property: The underline width in pixels.
 PropertyKey getLabelSelectedKey()
          Property: This is the key used to set in the Category a Boolean object denoting on if the label is considered selected or not.
 java.awt.Paint getLeafBackground()
          Property: The background paint of the node.
 java.awt.Paint getLeafCheckBackground()
          Property: The paint to use for the background of the check.
 java.awt.Cursor getLeafCheckCursor()
          Property: The cursor set when the mouse is hovering over the check.
 java.awt.Paint getLeafCheckForeground()
          Property: The paint to use for the foreground of the check.
 XtdImage getLeafCheckHalfSelectedIcon()
          Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.
 PlaceRect getLeafCheckIconPlaceRect()
          Property: Where in the check shape the icon of the actual check should be placed.
 java.awt.Paint getLeafCheckMouseOverBackground()
          Property: The background for when the mouse is hovering over the check.
 java.awt.Paint getLeafCheckMouseOverForeground()
          Property: The foreground for when the mouse is hovering over the check.
 PlaceRect getLeafCheckPlaceRect()
          Property: Where the check outline should be placed within the node.
 XtdImage getLeafCheckSelectedIcon()
          Property: The icon/image for when the check is selected.
 java.awt.Shape getLeafCheckShape()
          Property: The shape outline of the check box.
 int getLeafCheckWidth()
          Property: The width in pixels for the check.
 java.awt.Font getLeafFont()
          Property: The font of the label.
 java.awt.Color getLeafForeground()
          Property: The foreground of the label.
 int getLeafIconTextGap()
          Property: The gap in pixels between the icon and text.
 java.awt.Cursor getLeafLabelCursor()
          Property: The cursor for when the mouse is hovering over the label.
 java.awt.Paint getLeafMouseOverBackground()
          Property: The background for when the mouse is hovering over the label.
 java.awt.Font getLeafMouseOverFont()
          Property: The font for when the mouse is hovering over the label.
 java.awt.Color getLeafMouseOverForeground()
          Property: The foreground for when the mouse is hovering over the label.
 java.lang.Integer getLeafMouseOverUnderline()
          Property: The underline in pixels for when the mouse is hovering over the label.
 int getLeafRowHeight()
          Property: The height in pixels for every row in the tree.
 java.awt.Paint getLeafSelectedBackground()
          Property: The background if the node label is selected.
 java.awt.Font getLeafSelectedFont()
          Property: The font if the node label is selected.
 java.awt.Color getLeafSelectedForeground()
          Property: The foreground if the node label is selected.
 java.lang.Integer getLeafSelectedUnderline()
          Property: The underline in pixels if the node label is selected.
 java.lang.Integer getLeafUnderline()
          Property: The underline width in pixels.
 java.awt.Dimension getPreferredSize()
           
 java.lang.Object getRootCategoryId()
          Returns the category ID of the root node.
 javax.swing.JScrollPane getScrollPane()
          Returns the scroll panel that is used to show the category tree.
 boolean getShowsRootHandles()
          Property: If the root handles should be visible.
 javax.swing.JTree getTree()
          Returns the JTree that is the backing component for this tree bean.
 void interactionOccured(InteractionEvent e)
          Called when an interaction has occurred-
 boolean isFolderCheckSelectable()
          Property: If the check can be selected.
 boolean isFolderCheckVisible()
          Property: If the check box is visible.
 boolean isFolderLabelSelectable()
          Property: If the label should be selectable (press-able)
 boolean isFolderRouteLabelClickToCheck()
          Property: If a click on the label should be transformed to a click on the check.
 boolean isIgnoreInteractionEvents()
          Returns if events are currently ignored.
 boolean isLeafCheckSelectable()
          Property: If the check should be selectable.
 boolean isLeafCheckVisible()
          Property: If the check box is visible.
 boolean isLeafLabelSelectable()
          Property: If the label should be selectable.
 boolean isLeafRouteLabelClickToCheck()
          Property: If a click on the label should be transformed to a click on the check.
 boolean isRootVisible()
          Property: If the root node should be visible.
protected  void paintComponent(java.awt.Graphics g)
           
 boolean removeDecorator(java.lang.Class type, boolean inclSubClasses)
          Removes the first decorator found with the class type type, including sub types id inclSubClasses == true.
 void removeDecorator(Decorator decorator)
          Removes a decorator.
 void removeDecorators()
          Removes all decorators.
 void removeDecorators(java.util.Collection decorators)
          Removes all decorators
 void removeInteractionListener(InteractionListener l)
          Removes the listener if it is added.
 void removeNotify()
           
 void revalidateNodes(java.lang.Object fromCatId, boolean keepExpanded)
          Revalidate the nodes starting from fromCatId.
 void setAntiAliasHint(int hint)
          Property: The anti alias hint for the label text.
 void setBackgroundPaint(java.awt.Paint bgPaint)
          Sets the background paint.
 void setCategoryAutoRevalidate(boolean b)
          Property: If the categories in the CategoryDepository changes the tree will revalidate itself if there is a category root set.
 void setCategoryViewFilter(CategoryViewFilter filter)
          Property: A filter that can be used to filter out which Categories should be visible in the tree.
static void setCheckedState(PropertyKey key, Category cat, boolean b)
          Set the selected state for the category.
 void setCheckSelectedKey(PropertyKey key)
          Property: This is the key used to set in the Category a Boolean object denoting on if the check is considered selected or not.
 void setDecorators(java.util.Collection decorators)
          Sets the decorators to use.
 void setDemoDataBean(DemoDataBean b)
          Property: A reference to a demo data bean that creates demo category data for this bean.
 void setFolderBackground(java.awt.Paint p)
          Property: The anti alias hint for the label text.
 void setFolderCheckBackground(java.awt.Paint p)
          Property: The paint to use for the background of the check.
 void setFolderCheckCursor(java.awt.Cursor cur)
          Property: The cursor for when the mouse is over the check.
 void setFolderCheckForeground(java.awt.Paint p)
          Property: The paint to use for the foreground of the check.
 void setFolderCheckHalfSelectedIcon(XtdImage image)
          Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.
 void setFolderCheckIconPlaceRect(PlaceRect r)
          Property: Where in the check shape the icon of the actual check should be placed.
 void setFolderCheckMouseOverBackground(java.awt.Paint p)
          Property: The paint to use for the background of the check when the mouse is hovering over it.
 void setFolderCheckMouseOverForeground(java.awt.Paint p)
          Property: The paint to use for the foreground of the check when the mouse is hovering over it.
 void setFolderCheckPlaceRect(PlaceRect r)
          Property: Where the check outline should be placed within the node.
 void setFolderCheckSelectable(boolean b)
          Property: If the check can be selected.
 void setFolderCheckSelectedIcon(XtdImage image)
          Property: The selected check icon.
 void setFolderCheckShape(java.awt.Shape s)
          Property: The shape outline of the check box.
 void setFolderCheckVisible(boolean b)
          Property: If the check box is visible.
 void setFolderCheckWidth(int w)
          Property: The width in pixels for the check.
 void setFolderFont(java.awt.Font f)
          Property: The font used to draw the label.
 void setFolderForeground(java.awt.Color c)
          Property: The foreground color used to draw the label.
 void setFolderIconTextGap(int gap)
          Property: The gap in pixels between the icon and text.
 void setFolderLabelCursor(java.awt.Cursor cur)
          Property: The hover mouse cursor over the label.
 void setFolderLabelSelectable(boolean b)
          Property: If the label should be selectable (press-able)
 void setFolderMouseOverBackground(java.awt.Paint p)
          Property: Background paint when the mouse is hovering over the node.
 void setFolderMouseOverFont(java.awt.Font f)
          Property: The font when the mouse is hovering over the node.
 void setFolderMouseOverForeground(java.awt.Color c)
          Property: Foreground paint when the mouse is hovering over the node.
 void setFolderMouseOverUnderline(java.lang.Integer b)
          Property: The underline width.
 void setFolderRouteLabelClickToCheck(boolean b)
          Property: If a click on the label should be transformed to a click on the check.
 void setFolderRowHeight(int height)
          Property: The height in pixels for every row in the tree.
 void setFolderSelectedBackground(java.awt.Paint p)
          Property: The background if the node label is selected.
 void setFolderSelectedFont(java.awt.Font f)
          Property: The font if the node label is selected.
 void setFolderSelectedForeground(java.awt.Color c)
          Property: The foreground if the node label is selected.
 void setFolderSelectedUnderline(java.lang.Integer width)
          Property: The underline width if the node label is selected.
 void setFolderUnderline(java.lang.Integer b)
          Property: The underline width in pixels.
 boolean setIgnoreInteractionEvents(boolean b)
          Sets if events should be ignored, and thus not fired.
 void setLabelSelectedKey(PropertyKey key)
          Property: This is the key used to set in the Category a Boolean object denoting on if the label is considered selected or not.
 void setLeafBackground(java.awt.Paint p)
          Property: The background paint of the node.
 void setLeafCheckBackground(java.awt.Paint p)
          Property: The paint to use for the background of the check.
 void setLeafCheckCursor(java.awt.Cursor cur)
          Property: The cursor set when the mouse is hovering over the check.
 void setLeafCheckForeground(java.awt.Paint p)
          Property: The paint to use for the foreground of the check.
 void setLeafCheckHalfSelectedIcon(XtdImage image)
          Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.
 void setLeafCheckIconPlaceRect(PlaceRect r)
          Property: Where in the check shape the icon of the actual check should be placed.
 void setLeafCheckMouseOverBackground(java.awt.Paint p)
          Property: The background for when the mouse is hovering over the check.
 void setLeafCheckMouseOverForeground(java.awt.Paint p)
          Property: The foreground for when the mouse is hovering over the check.
 void setLeafCheckPlaceRect(PlaceRect r)
          Property: Where the check outline should be placed within the node.
 void setLeafCheckSelectable(boolean b)
          Property: If the check should be selectable.
 void setLeafCheckSelectedIcon(XtdImage image)
          Property: The icon/image for when the check is selected.
 void setLeafCheckShape(java.awt.Shape s)
          Property: The shape outline of the check box.
 void setLeafCheckVisible(boolean b)
          Property: If the check box is visible.
 void setLeafCheckWidth(int w)
          Property: The width in pixels for the check.
 void setLeafFont(java.awt.Font f)
          Property: The font of the label.
 void setLeafForeground(java.awt.Color c)
          Property: The foreground of the label.
 void setLeafIconTextGap(int gap)
          Property: The gap in pixels between the icon and text.
 void setLeafLabelCursor(java.awt.Cursor cur)
          Property: The cursor for when the mouse is hovering over the label.
 void setLeafLabelSelectable(boolean b)
          Property: If the label should be selectable.
 void setLeafMouseOverBackground(java.awt.Paint p)
          Property: The background for when the mouse is hovering over the label.
 void setLeafMouseOverFont(java.awt.Font f)
          Property: The font for when the mouse is hovering over the label.
 void setLeafMouseOverForeground(java.awt.Color c)
          Property: The foreground for when the mouse is hovering over the label.
 void setLeafMouseOverUnderline(java.lang.Integer b)
          Property: The underline in pixels for when the mouse is hovering over the label.
 void setLeafRouteLabelClickToCheck(boolean b)
          Property: If a click on the label should be transformed to a click on the check.
 void setLeafRowHeight(int height)
          Property: The height in pixels for every row in the tree.
 void setLeafSelectedBackground(java.awt.Paint p)
          Property: The background if the node label is selected.
 void setLeafSelectedFont(java.awt.Font f)
          Property: The font if the node label is selected.
 void setLeafSelectedForeground(java.awt.Color c)
          Property: The foreground if the node label is selected.
 void setLeafSelectedUnderline(java.lang.Integer width)
          Property: The underline in pixels if the node label is selected.
 void setLeafUnderline(java.lang.Integer b)
          Property: The underline width in pixels.
 void setPreferredSize(java.awt.Dimension preferredSize)
           
 void setRootCategoryId(java.lang.Object catIDRoot)
          Sets the category ID of the root node.
 void setRootVisible(boolean b)
          Property: If the root node should be visible.
 void setShowsRootHandles(boolean b)
          Property: If the root handles should be visible.
 void sortDecorators()
          Resort the decorators that this tree handles.
static void toggleCheckedState(PropertyKey key, Category cat)
          Toggles the checked state on the category.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, 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, 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, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, 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, 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, getFocusTraversalKeys, 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, 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

LABEL_SELECTED_KEY

public static final PropertyKey LABEL_SELECTED_KEY
This is the default key used to set in the Category a Boolean object denoting if the label is considered selected or not. It can also be set on a tree by tree basis using setLabelSelectedKey(com.miginfocom.util.PropertyKey).


CHECK_SELECTED_KEY

public static final PropertyKey CHECK_SELECTED_KEY
This is the default key used to set in the Category a Boolean object denoting if the check box is considered selected or not. It can also be set on a tree by tree basis using setCheckSelectedKey(com.miginfocom.util.PropertyKey).


LABEL_CLICKED

public static final java.lang.String LABEL_CLICKED
The Command Value in for the InteractionEvent that is fired when the label is clicked.

See Also:
Constant Field Values

CHECK_CLICKED

public static final java.lang.String CHECK_CLICKED
The Command Value in for the InteractionEvent that is fired when the label is clicked.

See Also:
Constant Field Values

ROOT_SHAPE_NAME

public static final java.lang.String ROOT_SHAPE_NAME
See Also:
Constant Field Values

FOLDER_CHECK_BACKGROUND_SHAPE_NAME

public static final java.lang.String FOLDER_CHECK_BACKGROUND_SHAPE_NAME
See Also:
Constant Field Values

FOLDER_CHECK_OUTLINE_SHAPE_NAME

public static final java.lang.String FOLDER_CHECK_OUTLINE_SHAPE_NAME
See Also:
Constant Field Values

FOLDER_CHECK_IMAGE_SHAPE_NAME

public static final java.lang.String FOLDER_CHECK_IMAGE_SHAPE_NAME
See Also:
Constant Field Values

FOLDER_LABEL_SHAPE_NAME

public static final java.lang.String FOLDER_LABEL_SHAPE_NAME
See Also:
Constant Field Values

FOLDER_CONTAINER_SHAPE_NAME

public static final java.lang.String FOLDER_CONTAINER_SHAPE_NAME
See Also:
Constant Field Values

LEAF_CHECK_BACKGROUND_SHAPE_NAME

public static final java.lang.String LEAF_CHECK_BACKGROUND_SHAPE_NAME
See Also:
Constant Field Values

LEAF_CHECK_OUTLINE_SHAPE_NAME

public static final java.lang.String LEAF_CHECK_OUTLINE_SHAPE_NAME
See Also:
Constant Field Values

LEAF_CHECK_IMAGE_SHAPE_NAME

public static final java.lang.String LEAF_CHECK_IMAGE_SHAPE_NAME
See Also:
Constant Field Values

LEAF_LABEL_SHAPE_NAME

public static final java.lang.String LEAF_LABEL_SHAPE_NAME
See Also:
Constant Field Values

LEAF_CONTAINER_SHAPE_NAME

public static final java.lang.String LEAF_CONTAINER_SHAPE_NAME
See Also:
Constant Field Values
Constructor Detail

CategoryTreeBean

public CategoryTreeBean()
Method Detail

paintComponent

protected void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JComponent

removeNotify

public void removeNotify()
Overrides:
removeNotify in class javax.swing.JComponent

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

setPreferredSize

public void setPreferredSize(java.awt.Dimension preferredSize)
Overrides:
setPreferredSize in class javax.swing.JComponent

getTree

public javax.swing.JTree getTree()
Returns the JTree that is the backing component for this tree bean.

Returns:
The JTree that is the backing component for this tree bean.

getCategoryAtLocation

public Category getCategoryAtLocation(int x,
                                      int y)
A hit test that returns the Category for a point.

Parameters:
x - The x value that is relative to the contained tree.
y - The y value that is relative to the contained tree.
Returns:
The Category or null if no hit.

getScrollPane

public javax.swing.JScrollPane getScrollPane()
Returns the scroll panel that is used to show the category tree.

Returns:
The scroll panel that is used to show the category tree. Never null.

getCategoryViewFilter

public CategoryViewFilter getCategoryViewFilter()
Property: A filter that can be used to filter out which Categories should be visible in the tree.

Returns:
The current filter. null if no filter.

setCategoryViewFilter

public void setCategoryViewFilter(CategoryViewFilter filter)
Property: A filter that can be used to filter out which Categories should be visible in the tree.

Parameters:
filter - The new filter. null if no filter.

getBackgroundPaint

public java.awt.Paint getBackgroundPaint()
Sets the background paint. If != null this paint is drawn in the background (if opaque) rather than the normal background color. If this is null the normal color retrieved from Component.getBackground() is painted instead. If not opaque none of the colors will be painted.

Returns:
The background paint. May be null.

setBackgroundPaint

public void setBackgroundPaint(java.awt.Paint bgPaint)
Sets the background paint. If != null this paint is drawn in the background (if opaque) rather than the normal background color. If this is null the normal color retrieved from Component.getBackground() is painted instead. If not opaque none of the colors will be painted.

Parameters:
bgPaint - The background paint. May be null.

getCategoryAutoRevalidate

public boolean getCategoryAutoRevalidate()
Property: If the categories in the CategoryDepository changes the tree will revalidate itself if there is a category root set.

Returns:
If the auto revalidation is on.

setCategoryAutoRevalidate

public void setCategoryAutoRevalidate(boolean b)
Property: If the categories in the CategoryDepository changes the tree will revalidate itself if there is a category root set.

Parameters:
b - If the auto revalidation is on.

getLabelSelectedKey

public PropertyKey getLabelSelectedKey()
Property: This is the key used to set in the Category a Boolean object denoting on if the label is considered selected or not.

The key defaults to LABEL_SELECTED_KEY but using that means that all category trees will have the same model state for a category, which is sometime wanted and sometimes not.

Returns:
The current key. Never null.

setLabelSelectedKey

public void setLabelSelectedKey(PropertyKey key)
Property: This is the key used to set in the Category a Boolean object denoting on if the label is considered selected or not.

The key defaults to LABEL_SELECTED_KEY but using that means that all category trees will have the same model state for a category, which is sometime wanted and sometimes not.

Parameters:
key - The new key. null will reset it to the default value.

getCheckSelectedKey

public PropertyKey getCheckSelectedKey()
Property: This is the key used to set in the Category a Boolean object denoting on if the check is considered selected or not.

The key defaults to CHECK_SELECTED_KEY but using that means that all category trees will have the same model state for a category, which is sometime wanted and sometimes not.

Returns:
The current key. Never null.

setCheckSelectedKey

public void setCheckSelectedKey(PropertyKey key)
Property: This is the key used to set in the Category a Boolean object denoting on if the check is considered selected or not.

The key defaults to CHECK_SELECTED_KEY but using that means that all category trees will have the same model state for a category, which is sometime wanted and sometimes not.

Parameters:
key - The new key. null will reset it to the default value.

getDemoDataBean

public DemoDataBean getDemoDataBean()
Property: A reference to a demo data bean that creates demo category data for this bean. This is normally only used for testing purposes and should not be used in any production environment.

Returns:
The current value of the property or null.

setDemoDataBean

public void setDemoDataBean(DemoDataBean b)
Property: A reference to a demo data bean that creates demo category data for this bean. This is normally only used for testing purposes and should not be used in any production environment.

Parameters:
b - The new value for the property. May be null.

isLeafRouteLabelClickToCheck

public boolean isLeafRouteLabelClickToCheck()
Property: If a click on the label should be transformed to a click on the check.

Returns:
The current value. Default is false.

setLeafRouteLabelClickToCheck

public void setLeafRouteLabelClickToCheck(boolean b)
Property: If a click on the label should be transformed to a click on the check.

Parameters:
b - The new value. Default is false.

isFolderRouteLabelClickToCheck

public boolean isFolderRouteLabelClickToCheck()
Property: If a click on the label should be transformed to a click on the check.

Returns:
The current value. Default is false.

setFolderRouteLabelClickToCheck

public void setFolderRouteLabelClickToCheck(boolean b)
Property: If a click on the label should be transformed to a click on the check.

Parameters:
b - The new value. Default is false.

isLeafCheckVisible

public boolean isLeafCheckVisible()
Property: If the check box is visible.

Returns:
The current value. Default is true.

setLeafCheckVisible

public void setLeafCheckVisible(boolean b)
Property: If the check box is visible.

Parameters:
b - The new value. Default is true.

isFolderCheckVisible

public boolean isFolderCheckVisible()
Property: If the check box is visible.

Returns:
The current value. Default is true.

setFolderCheckVisible

public void setFolderCheckVisible(boolean b)
Property: If the check box is visible.

Parameters:
b - The new value. Default is true.

getLeafRowHeight

public int getLeafRowHeight()
Property: The height in pixels for every row in the tree.

Returns:
The current value. Default is 17.

setLeafRowHeight

public void setLeafRowHeight(int height)
Property: The height in pixels for every row in the tree.

Parameters:
height - The new value. Default is 17.

getFolderRowHeight

public int getFolderRowHeight()
Property: The height in pixels for every row in the tree.

Returns:
The current value. Default is 17.

setFolderRowHeight

public void setFolderRowHeight(int height)
Property: The height in pixels for every row in the tree.

Parameters:
height - The new value. Default is 17.

getShowsRootHandles

public boolean getShowsRootHandles()
Property: If the root handles should be visible.

Returns:
The current value. Default is true.

setShowsRootHandles

public void setShowsRootHandles(boolean b)
Property: If the root handles should be visible.

Parameters:
b - The new value. Default is true.

getLeafCheckShape

public java.awt.Shape getLeafCheckShape()
Property: The shape outline of the check box.

Returns:
The current value. Default is new RoundRectangle(0, 0, 14, 14, 6, 6).

setLeafCheckShape

public void setLeafCheckShape(java.awt.Shape s)
Property: The shape outline of the check box.

Parameters:
s - The new value. Default is new RoundRectangle(0, 0, 14, 14, 6, 6).

getFolderCheckShape

public java.awt.Shape getFolderCheckShape()
Property: The shape outline of the check box.

Returns:
The current value. Default is new RoundRectangle(0, 0, 14, 14, 6, 6).

setFolderCheckShape

public void setFolderCheckShape(java.awt.Shape s)
Property: The shape outline of the check box.

Parameters:
s - The new value. Default is new RoundRectangle(0, 0, 14, 14, 6, 6).

getLeafCheckIconPlaceRect

public PlaceRect getLeafCheckIconPlaceRect()
Property: Where in the check shape the icon of the actual check should be placed.

Returns:
The current value. Default is new AlignRect(new AtFraction(0.5f), new AtFraction(0.5f)).

setLeafCheckIconPlaceRect

public void setLeafCheckIconPlaceRect(PlaceRect r)
Property: Where in the check shape the icon of the actual check should be placed.

Parameters:
r - The new value. Default is new AlignRect(new AtFraction(0.5f), new AtFraction(0.5f)).

getFolderCheckIconPlaceRect

public PlaceRect getFolderCheckIconPlaceRect()
Property: Where in the check shape the icon of the actual check should be placed.

Returns:
The current value. Default is new AlignRect(new AtFraction(0.5f), new AtFraction(0.5f)).

setFolderCheckIconPlaceRect

public void setFolderCheckIconPlaceRect(PlaceRect r)
Property: Where in the check shape the icon of the actual check should be placed.

Parameters:
r - The new value. Default is new AlignRect(new AtFraction(0.5f), new AtFraction(0.5f)).

getLeafCheckPlaceRect

public PlaceRect getLeafCheckPlaceRect()
Property: Where the check outline should be placed within the node.

Returns:
The current value. Default is new AbsRect(new Insets(1, 1, 1, 1)).

setLeafCheckPlaceRect

public void setLeafCheckPlaceRect(PlaceRect r)
Property: Where the check outline should be placed within the node.

Parameters:
r - The new value. Default is new AbsRect(new Insets(1, 1, 1, 1)).

getFolderCheckPlaceRect

public PlaceRect getFolderCheckPlaceRect()
Property: Where the check outline should be placed within the node.

Returns:
The current value. Default is new AbsRect(new Insets(1, 1, 1, 1)).

setFolderCheckPlaceRect

public void setFolderCheckPlaceRect(PlaceRect r)
Property: Where the check outline should be placed within the node.

Parameters:
r - The new value. Default is new AbsRect(new Insets(1, 1, 1, 1)).

getLeafCheckWidth

public int getLeafCheckWidth()
Property: The width in pixels for the check.

Returns:
The current value. Default is 17.

setLeafCheckWidth

public void setLeafCheckWidth(int w)
Property: The width in pixels for the check.

Parameters:
w - The new value. Default is 17.

getFolderCheckWidth

public int getFolderCheckWidth()
Property: The width in pixels for the check.

Returns:
The current value. Default is 17.

setFolderCheckWidth

public void setFolderCheckWidth(int w)
Property: The width in pixels for the check.

Parameters:
w - The new value. Default is 17.

getFolderIconTextGap

public int getFolderIconTextGap()
Property: The gap in pixels between the icon and text.

Returns:
The current value. Default is 3.

setFolderIconTextGap

public void setFolderIconTextGap(int gap)
Property: The gap in pixels between the icon and text.

Parameters:
gap - The new value. Default is 3.

getLeafIconTextGap

public int getLeafIconTextGap()
Property: The gap in pixels between the icon and text.

Returns:
The current value. Default is 3.

setLeafIconTextGap

public void setLeafIconTextGap(int gap)
Property: The gap in pixels between the icon and text.

Parameters:
gap - The new value. Default is 3.

getAntiAliasHint

public int getAntiAliasHint()
Property: The anti alias hint for the label text.

Returns:
The current value. Default is GfxUtil.AA_HINT_PLATFORM.

setAntiAliasHint

public void setAntiAliasHint(int hint)
Property: The anti alias hint for the label text.

Parameters:
hint - The new value. Default is GfxUtil.AA_HINT_PLATFORM.

getFolderBackground

public java.awt.Paint getFolderBackground()
Property: The anti alias hint for the label text.

Returns:
The current value. Default is GfxUtil.AA_HINT_PLATFORM.

setFolderBackground

public void setFolderBackground(java.awt.Paint p)
Property: The anti alias hint for the label text.

Parameters:
p - The new value. Default is GfxUtil.AA_HINT_PLATFORM.

getFolderFont

public java.awt.Font getFolderFont()
Property: The font used to draw the label.

Returns:
The current value. Default is the font for the bean itself. Never null.

setFolderFont

public void setFolderFont(java.awt.Font f)
Property: The font used to draw the label.

Parameters:
f - The new value. If null set to the font for the bean itself.

getFolderForeground

public java.awt.Color getFolderForeground()
Property: The foreground color used to draw the label.

Returns:
The current value. Default is the foreground for the bean itself. Never null.

setFolderForeground

public void setFolderForeground(java.awt.Color c)
Property: The foreground color used to draw the label.

Parameters:
c - The new value. If null set to the foreground for the bean itself.

getFolderCheckCursor

public java.awt.Cursor getFolderCheckCursor()
Property: The cursor for when the mouse is over the check.

Returns:
The current value. Default is null.

setFolderCheckCursor

public void setFolderCheckCursor(java.awt.Cursor cur)
Property: The cursor for when the mouse is over the check.

Parameters:
cur - The new value. Default is null.

getFolderCheckHalfSelectedIcon

public XtdImage getFolderCheckHalfSelectedIcon()
Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.

Returns:
The current value. Default is HALF_CHECK_IMG (private)

setFolderCheckHalfSelectedIcon

public void setFolderCheckHalfSelectedIcon(XtdImage image)
Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.

Parameters:
image - The new value. Default is HALF_CHECK_IMG (private)

getFolderCheckMouseOverBackground

public java.awt.Paint getFolderCheckMouseOverBackground()
Property: The paint to use for the background of the check when the mouse is hovering over it.

Returns:
The current value. Default is null which means no mouse over effect.

setFolderCheckMouseOverBackground

public void setFolderCheckMouseOverBackground(java.awt.Paint p)
Property: The paint to use for the background of the check when the mouse is hovering over it.

Parameters:
p - The new value. Default is null which means no mouse over effect.

getFolderCheckMouseOverForeground

public java.awt.Paint getFolderCheckMouseOverForeground()
Property: The paint to use for the foreground of the check when the mouse is hovering over it.

Returns:
The current value. Default is null which means no mouse over effect.

setFolderCheckMouseOverForeground

public void setFolderCheckMouseOverForeground(java.awt.Paint p)
Property: The paint to use for the foreground of the check when the mouse is hovering over it.

Parameters:
p - The new value. Default is null which means no mouse over effect.

getLeafCheckForeground

public java.awt.Paint getLeafCheckForeground()
Property: The paint to use for the foreground of the check.

Returns:
The current value. Default is the foreground of the bean.

setLeafCheckForeground

public void setLeafCheckForeground(java.awt.Paint p)
Property: The paint to use for the foreground of the check.

Parameters:
p - The new value. If null it is reset to the foreground of the bean.

getFolderCheckForeground

public java.awt.Paint getFolderCheckForeground()
Property: The paint to use for the foreground of the check.

Returns:
The current value. Default is the foreground of the bean.

setFolderCheckForeground

public void setFolderCheckForeground(java.awt.Paint p)
Property: The paint to use for the foreground of the check.

Parameters:
p - The new value. If null it is reset to the foreground of the bean.

getLeafCheckBackground

public java.awt.Paint getLeafCheckBackground()
Property: The paint to use for the background of the check.

Returns:
The current value. Default is the background of the bean.

setLeafCheckBackground

public void setLeafCheckBackground(java.awt.Paint p)
Property: The paint to use for the background of the check.

Parameters:
p - The new value. If null it is reset to the background of the bean.

getFolderCheckBackground

public java.awt.Paint getFolderCheckBackground()
Property: The paint to use for the background of the check.

Returns:
The current value. Default is the background of the bean.

setFolderCheckBackground

public void setFolderCheckBackground(java.awt.Paint p)
Property: The paint to use for the background of the check.

Parameters:
p - The new value. If null it is reset to the background of the bean.

isFolderCheckSelectable

public boolean isFolderCheckSelectable()
Property: If the check can be selected.

Returns:
The current value. Default is true.

setFolderCheckSelectable

public void setFolderCheckSelectable(boolean b)
Property: If the check can be selected.

Parameters:
b - The new value. Default is true.

getFolderCheckSelectedIcon

public XtdImage getFolderCheckSelectedIcon()
Property: The selected check icon.

Returns:
The current value. Default is CHECK_IMG

setFolderCheckSelectedIcon

public void setFolderCheckSelectedIcon(XtdImage image)
Property: The selected check icon.

Parameters:
image - The new value. Default is CHECK_IMG

getFolderLabelCursor

public java.awt.Cursor getFolderLabelCursor()
Property: The hover mouse cursor over the label.

Returns:
The current value. Default is null.

setFolderLabelCursor

public void setFolderLabelCursor(java.awt.Cursor cur)
Property: The hover mouse cursor over the label.

Parameters:
cur - The new value. Default is null.

isFolderLabelSelectable

public boolean isFolderLabelSelectable()
Property: If the label should be selectable (press-able)

Returns:
The current value. Default is false.

setFolderLabelSelectable

public void setFolderLabelSelectable(boolean b)
Property: If the label should be selectable (press-able)

Parameters:
b - The new value. Default is false.

getFolderMouseOverBackground

public java.awt.Paint getFolderMouseOverBackground()
Property: Background paint when the mouse is hovering over the node.

Returns:
The current value. Default is null.

setFolderMouseOverBackground

public void setFolderMouseOverBackground(java.awt.Paint p)
Property: Background paint when the mouse is hovering over the node.

Parameters:
p - The new value. Default is null.

getFolderMouseOverFont

public java.awt.Font getFolderMouseOverFont()
Property: The font when the mouse is hovering over the node.

Returns:
The current value. Default is null which means no special font.

setFolderMouseOverFont

public void setFolderMouseOverFont(java.awt.Font f)
Property: The font when the mouse is hovering over the node.

Parameters:
f - The new value. Default is null which means no special font.

getFolderMouseOverForeground

public java.awt.Color getFolderMouseOverForeground()
Property: Foreground paint when the mouse is hovering over the node.

Returns:
The current value. Default is null.

setFolderMouseOverForeground

public void setFolderMouseOverForeground(java.awt.Color c)
Property: Foreground paint when the mouse is hovering over the node.

Parameters:
c - The new value. Default is null.

getFolderMouseOverUnderline

public java.lang.Integer getFolderMouseOverUnderline()
Property: The underline width.

Returns:
The current value. Default is null.

setFolderMouseOverUnderline

public void setFolderMouseOverUnderline(java.lang.Integer b)
Property: The underline width.

Parameters:
b - The new value. Default is null.

getFolderSelectedBackground

public java.awt.Paint getFolderSelectedBackground()
Property: The background if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setFolderSelectedBackground

public void setFolderSelectedBackground(java.awt.Paint p)
Property: The background if the node label is selected.

Parameters:
p - The new value. Default is null which means same as when not selected.

getFolderSelectedFont

public java.awt.Font getFolderSelectedFont()
Property: The font if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setFolderSelectedFont

public void setFolderSelectedFont(java.awt.Font f)
Property: The font if the node label is selected.

Parameters:
f - The new value. Default is null which means same as when not selected.

getFolderSelectedForeground

public java.awt.Color getFolderSelectedForeground()
Property: The foreground if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setFolderSelectedForeground

public void setFolderSelectedForeground(java.awt.Color c)
Property: The foreground if the node label is selected.

Parameters:
c - The new value. Default is null which means same as when not selected.

getFolderSelectedUnderline

public java.lang.Integer getFolderSelectedUnderline()
Property: The underline width if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setFolderSelectedUnderline

public void setFolderSelectedUnderline(java.lang.Integer width)
Property: The underline width if the node label is selected.

Parameters:
width - The new value. Default is null which means same as when not selected.

getLeafUnderline

public java.lang.Integer getLeafUnderline()
Property: The underline width in pixels.

Returns:
The current value. Default is null which means no underline.

setLeafUnderline

public void setLeafUnderline(java.lang.Integer b)
Property: The underline width in pixels.

Parameters:
b - The current value. Default is null which means no underline.

getFolderUnderline

public java.lang.Integer getFolderUnderline()
Property: The underline width in pixels.

Returns:
The current value. Default is null which means no underline.

setFolderUnderline

public void setFolderUnderline(java.lang.Integer b)
Property: The underline width in pixels.

Parameters:
b - The current value. Default is null which means no underline.

getLeafBackground

public java.awt.Paint getLeafBackground()
Property: The background paint of the node.

Returns:
The current value. Default is null which means no background.

setLeafBackground

public void setLeafBackground(java.awt.Paint p)
Property: The background paint of the node.

Parameters:
p - The new value. Default is null which means no background.

getLeafFont

public java.awt.Font getLeafFont()
Property: The font of the label.

Returns:
The current value. Default is same as for the bean.

setLeafFont

public void setLeafFont(java.awt.Font f)
Property: The font of the label.

Parameters:
f - The new value. null reset it to the same as for the bean.

getLeafForeground

public java.awt.Color getLeafForeground()
Property: The foreground of the label.

Returns:
The current value. Default is same as for the bean.

setLeafForeground

public void setLeafForeground(java.awt.Color c)
Property: The foreground of the label.

Parameters:
c - The new value. null reset it to the same as for the bean.

getLeafCheckCursor

public java.awt.Cursor getLeafCheckCursor()
Property: The cursor set when the mouse is hovering over the check.

Returns:
The current value. Default is null.

setLeafCheckCursor

public void setLeafCheckCursor(java.awt.Cursor cur)
Property: The cursor set when the mouse is hovering over the check.

Parameters:
cur - The new value. Default is null.

getLeafCheckHalfSelectedIcon

public XtdImage getLeafCheckHalfSelectedIcon()
Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.

Returns:
The current value. Default is HALF_CHECK_IMG (private)

setLeafCheckHalfSelectedIcon

public void setLeafCheckHalfSelectedIcon(XtdImage image)
Property: The icon for when a check is "half" selected, which menas that some children are checked and some are not.

Parameters:
image - The new value. Default is HALF_CHECK_IMG (private)

getLeafCheckMouseOverBackground

public java.awt.Paint getLeafCheckMouseOverBackground()
Property: The background for when the mouse is hovering over the check.

Returns:
The current value. Default is null.

setLeafCheckMouseOverBackground

public void setLeafCheckMouseOverBackground(java.awt.Paint p)
Property: The background for when the mouse is hovering over the check.

Parameters:
p - The new value. Default is null.

getLeafCheckMouseOverForeground

public java.awt.Paint getLeafCheckMouseOverForeground()
Property: The foreground for when the mouse is hovering over the check.

Returns:
The current value. Default is null.

setLeafCheckMouseOverForeground

public void setLeafCheckMouseOverForeground(java.awt.Paint p)
Property: The foreground for when the mouse is hovering over the check.

Parameters:
p - The new value. Default is null.

isLeafCheckSelectable

public boolean isLeafCheckSelectable()
Property: If the check should be selectable.

Returns:
The current value. Default is true.

setLeafCheckSelectable

public void setLeafCheckSelectable(boolean b)
Property: If the check should be selectable.

Parameters:
b - The new value. Default is true.

getLeafCheckSelectedIcon

public XtdImage getLeafCheckSelectedIcon()
Property: The icon/image for when the check is selected.

Returns:
The current value. Default is CHECK_IMG (private)

setLeafCheckSelectedIcon

public void setLeafCheckSelectedIcon(XtdImage image)
Property: The icon/image for when the check is selected.

Parameters:
image - The new value. Default is CHECK_IMG (private)

getLeafLabelCursor

public java.awt.Cursor getLeafLabelCursor()
Property: The cursor for when the mouse is hovering over the label.

Returns:
The current value. Default is null.

setLeafLabelCursor

public void setLeafLabelCursor(java.awt.Cursor cur)
Property: The cursor for when the mouse is hovering over the label.

Parameters:
cur - The new value. Default is null.

isLeafLabelSelectable

public boolean isLeafLabelSelectable()
Property: If the label should be selectable.

Returns:
The current value. Default is false.

setLeafLabelSelectable

public void setLeafLabelSelectable(boolean b)
Property: If the label should be selectable.

Parameters:
b - The new value. Default is false.

getLeafMouseOverBackground

public java.awt.Paint getLeafMouseOverBackground()
Property: The background for when the mouse is hovering over the label.

Returns:
The current value. Default is null.

setLeafMouseOverBackground

public void setLeafMouseOverBackground(java.awt.Paint p)
Property: The background for when the mouse is hovering over the label.

Parameters:
p - The new value. Default is null.

getLeafMouseOverFont

public java.awt.Font getLeafMouseOverFont()
Property: The font for when the mouse is hovering over the label.

Returns:
The current value. Default is null.

setLeafMouseOverFont

public void setLeafMouseOverFont(java.awt.Font f)
Property: The font for when the mouse is hovering over the label.

Parameters:
f - The new value. Default is null.

getLeafMouseOverForeground

public java.awt.Color getLeafMouseOverForeground()
Property: The foreground for when the mouse is hovering over the label.

Returns:
The current value. Default is null.

setLeafMouseOverForeground

public void setLeafMouseOverForeground(java.awt.Color c)
Property: The foreground for when the mouse is hovering over the label.

Parameters:
c - The new value. Default is null.

getLeafMouseOverUnderline

public java.lang.Integer getLeafMouseOverUnderline()
Property: The underline in pixels for when the mouse is hovering over the label.

Returns:
The current value. Default is null.

setLeafMouseOverUnderline

public void setLeafMouseOverUnderline(java.lang.Integer b)
Property: The underline in pixels for when the mouse is hovering over the label.

Parameters:
b - The new value. Default is null.

getLeafSelectedBackground

public java.awt.Paint getLeafSelectedBackground()
Property: The background if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setLeafSelectedBackground

public void setLeafSelectedBackground(java.awt.Paint p)
Property: The background if the node label is selected.

Parameters:
p - The new value. Default is null which means same as when not selected.

getLeafSelectedFont

public java.awt.Font getLeafSelectedFont()
Property: The font if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setLeafSelectedFont

public void setLeafSelectedFont(java.awt.Font f)
Property: The font if the node label is selected.

Parameters:
f - The new value. Default is null which means same as when not selected.

getLeafSelectedForeground

public java.awt.Color getLeafSelectedForeground()
Property: The foreground if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setLeafSelectedForeground

public void setLeafSelectedForeground(java.awt.Color c)
Property: The foreground if the node label is selected.

Parameters:
c - The new value. Default is null which means same as when not selected.

getLeafSelectedUnderline

public java.lang.Integer getLeafSelectedUnderline()
Property: The underline in pixels if the node label is selected.

Returns:
The current value. Default is null which means same as when not selected.

setLeafSelectedUnderline

public void setLeafSelectedUnderline(java.lang.Integer width)
Property: The underline in pixels if the node label is selected.

Parameters:
width - The new value. Default is null which means same as when not selected.

isRootVisible

public boolean isRootVisible()
Property: If the root node should be visible.

Returns:
The old value. Default is false.

setRootVisible

public void setRootVisible(boolean b)
Property: If the root node should be visible.

Parameters:
b - The new value. Default is false.

revalidateNodes

public void revalidateNodes(java.lang.Object fromCatId,
                            boolean keepExpanded)
Revalidate the nodes starting from fromCatId.

Parameters:
fromCatId - The category id to start from. Not the Node or Category, but the ID.
keepExpanded - If the tree shold have the same expanded state after the call.

getRootCategoryId

public java.lang.Object getRootCategoryId()
Returns the category ID of the root node.

Returns:
The category ID of the root node. null if the root node is the real root in the category depository.

setRootCategoryId

public void setRootCategoryId(java.lang.Object catIDRoot)
Sets the category ID of the root node.

Parameters:
catIDRoot - The category ID of the root node. null if the root node should be the real root in the category depository.

getCheckedState

public static java.lang.Boolean getCheckedState(PropertyKey key,
                                                Category cat)
Returns the checked state of a category. null means determinate because the category has sub categories where some are check and some are not checked. Boolean.TRUE means that this and all sub categories are selected. Boolean.FALSE means that this and all sub categories are un-selected.

Categories that has sub-categories does not maintain checked state. Their state are dependandt on the state of all sub-category leaves.

Parameters:
key - The key that is used to get the checked state from the Category. See getCheckSelectedKey()
cat - The category to check the state for.
Returns:
The state of the category and sub categories.

setCheckedState

public static void setCheckedState(PropertyKey key,
                                   Category cat,
                                   boolean b)
Set the selected state for the category. If a folder the state will propagate to all children.

Parameters:
key - The key that is used to get the checked state from the Category. See getCheckSelectedKey()
cat - The cageory to set the checked state on.
b - The new state of the check.

toggleCheckedState

public static void toggleCheckedState(PropertyKey key,
                                      Category cat)
Toggles the checked state on the category. If the category is a folder the folder and its childern will be set to "selected" if the folder itself or one or its childen are "unselected". Otherwise the category tree will be "unselected".

Parameters:
key - The key that is used to get the checked state from the Category. See getCheckSelectedKey()
cat - The category to toggle the selected state on.

interactionOccured

public void interactionOccured(InteractionEvent e)
Description copied from interface: InteractionListener
Called when an interaction has occurred-

Yes, embarrassing as it is, we are aware that occurred it is spelled wrong.

Specified by:
interactionOccured in interface InteractionListener
Parameters:
e - The event

addInteractionListener

public void addInteractionListener(InteractionListener l)
Adds a listener that listens to InteractionEvents. Interaction events are normally fired by the Interaction/Interactor/AbstractInteractionBroker framework, used for instance by the AShape framework.

The interaction events that is fired is when the user presses a check or the label in the tree.

Parameters:
l - The listener to add
See Also:
CHECK_CLICKED, LABEL_CLICKED

addInteractionListener

public void addInteractionListener(InteractionListener l,
                                   boolean asWeakRef)
Adds a listener that listens to InteractionEvents. Interaction events are normally fired by the Interaction/Interactor/AbstractInteractionBroker framework, used for instance by the AShape framework.

The interaction events that is fired is when the user presses a check or the label in the tree.

Parameters:
l - The listener to add
asWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since the garbage collector can collect the listener if it is only referenced from this list.

Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.

See Also:
CHECK_CLICKED, LABEL_CLICKED

removeInteractionListener

public void removeInteractionListener(InteractionListener l)
Removes the listener if it is added.

Parameters:
l - The listener to remove. If null nothing happens.

isIgnoreInteractionEvents

public boolean isIgnoreInteractionEvents()
Returns if events are currently ignored.

Returns:
If events are currently ignored.
See Also:
setIgnoreInteractionEvents(boolean)

setIgnoreInteractionEvents

public boolean setIgnoreInteractionEvents(boolean b)
Sets if events should be ignored, and thus not fired.

Parameters:
b - true turns off events
Returns:
The old state of this flag.

getDecorators

public java.util.List getDecorators()
Returns a cloned list with the decorators currently installed in this tree.

Returns:
The decorators. Not null.

setDecorators

public void setDecorators(java.util.Collection decorators)
Sets the decorators to use.

Parameters:
decorators - The decorators. Not null. List is cloned shallow for storage.
See Also:
DecoratorSupport.setDecorators(java.util.Collection)

addDecorators

public void addDecorators(java.util.Collection decorators)
Calls addDecorator(com.miginfocom.calendar.decorators.Decorator) for every element in the collection.

Parameters:
decorators - The decorators. Not null.
See Also:
DecoratorSupport.addDecorators(java.util.Collection)

sortDecorators

public void sortDecorators()
Resort the decorators that this tree handles. This is normally only needed if any of the decorators has changed its layer outside the control of this tree.


addDecorator

public void addDecorator(Decorator decorator)
Adds a decorator. A manual repaint has to be issued to paint the decorator.

Parameters:
decorator - The decorator. Insertion order is maintained and decorations will be painted in this order.
See Also:
DecoratorSupport.addDecorator(com.miginfocom.calendar.decorators.Decorator)

removeDecorator

public void removeDecorator(Decorator decorator)
Removes a decorator. A manual repaint has to be issued to paint the decorator.

Parameters:
decorator - The decorator to be removed.
See Also:
DecoratorSupport.removeDecorator(com.miginfocom.calendar.decorators.Decorator)

removeDecorator

public boolean removeDecorator(java.lang.Class type,
                               boolean inclSubClasses)
Removes the first decorator found with the class type type, including sub types id inclSubClasses == true.

Parameters:
type - The type. Not null.
inclSubClasses - If sub classes of type should be removed as well.
Returns:
If a decorator was removed.

removeDecorators

public void removeDecorators()
Removes all decorators. Note that this also removes the self decorating decorators. You should probably add DefaultDateArea.MultiSelectRectangleDecorator and DefaultDateArea.ActivityViewDecorator again. Add an instance by: dateArea.addDecorator(dateArea.new ActivityViewDecorator(110));

See Also:
DecoratorSupport.removeDecorators(java.util.Collection)

removeDecorators

public void removeDecorators(java.util.Collection decorators)
Removes all decorators

Parameters:
decorators - The decorators to remove.


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.