public class IlvJTree extends JTree implements IlvVerticalExpandable
IlvJTree
is a Swing JTree
subclass that is
designed specifically to integrate easily with the Gantt framework. It will behave as
an expandable component when it is added to the
Gantt configuration like this:
anIlvGanttConfiguration.addVerticalExpandable(anIlvJTree)
.
IlvJTree
uses a client property to determine whether to
draw separator lines between each row. This is enabled by default and
can be explicitly set by:
anIlvJTree.putClientProperty("IlvJTree.rowSeparators", Boolean.TRUE);This can be disabled by:
anIlvJTree.putClientProperty("IlvJTree.rowSeparators", Boolean.FALSE);
IlvJTree
also supports the standard
JTree.lineStyle
client property that is used by the Metal
look and feel to configure how connecting lines are drawn between nodes.
The supported values are:
Angled
: A line is drawn connecting child nodes to
their parent.Horizontal
: A horizontal line is drawn dividing the
children of the root node.None
: No lines are drawn between nodes.Angled
. For example, to switch to
Horizontal
style you would do: anIlvJTree.putClientProperty("JTree.lineStyle", "Horizontal");For more details on the
JTree.lineStyle
client
property, consult the JDK documentation for the
javax.swing.plaf.metal.MetalTreeUI
class.
Unlike the standard Swing JTree
,IlvJTree
does not observe its global isEditable
flag to determine
whether editing is enabled. Instead, the tree's
renderPolicy.isEditable(row)
is
queried to determine whether editing is enabled on a row by row basis.
If the tree does not have a renderPolicy
set,
editing is disabled for the entire tree.
Modifier and Type | Class and Description |
---|---|
static class |
IlvJTree.DefaultEditor
DefaultEditor is a DefaultTreeCellEditor
that properly implements the IlvWrappedEditor
interface. |
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirector
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
ANCHOR_SELECTION_PATH_PROPERTY, CELL_EDITOR_PROPERTY, CELL_RENDERER_PROPERTY, cellEditor, cellRenderer, editable, EDITABLE_PROPERTY, EXPANDS_SELECTED_PATHS_PROPERTY, INVOKES_STOP_CELL_EDITING_PROPERTY, invokesStopCellEditing, LARGE_MODEL_PROPERTY, largeModel, LEAD_SELECTION_PATH_PROPERTY, ROOT_VISIBLE_PROPERTY, rootVisible, ROW_HEIGHT_PROPERTY, rowHeight, SCROLLS_ON_EXPAND_PROPERTY, scrollsOnExpand, SELECTION_MODEL_PROPERTY, selectionModel, selectionRedirector, SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles, TOGGLE_CLICK_COUNT_PROPERTY, toggleClickCount, TREE_MODEL_PROPERTY, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCount
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
IlvJTree()
Constructs a new
IlvJTree . |
IlvJTree(IlvJTreeRenderPolicy renderPolicy)
Constructs a new
IlvJTree that will use the specified
policy for rendering and editing its rows. |
Modifier and Type | Method and Description |
---|---|
protected void |
baseTextDirectionChanged()
This method is invoked when the effective base text direction has changed.
|
protected void |
componentOrientationChanged(ComponentOrientation oldOrientation,
ComponentOrientation newOrientation)
This method is invoked when the component orientation of this tree has
changed.
|
String |
convertValueToText(Object row,
boolean selected,
boolean expanded,
boolean leaf,
int rowIndex,
boolean hasFocus)
Returns the text that will be rendered for the specified row.
|
void |
ganttModelChanged(GanttModelChangedEvent event)
Invoked by the
IlvGanttConfiguration when the data model has
been replaced. |
int |
getBaseTextDirection()
Returns the base text direction for this tree.
|
BasicTreeUI |
getBasicUI()
Returns the basic L&F object that renders this tree.
|
IlvHierarchyNode |
getFirstVisibleRow()
Returns the first visible row in the tree or
null if no rows are
visible. |
TreePath |
getPathForRow(IlvHierarchyNode row)
Returns the path for the specified row.
|
IlvJTreeRenderPolicy |
getRenderPolicy()
Returns the policy for rendering and editing rows displayed in this
tree.
|
int |
getResolvedBaseTextDirection()
Returns the resolved base text direction.
|
IlvHierarchyNode |
getRootVisibleRow()
Deprecated.
Beginning with Rogue Wave JViews 8.5, use
getFirstVisibleRow()
instead. |
IlvHierarchyNode |
getRow(int rowIndex)
Returns the row that is visible on the specified row index.
|
int |
getRowHeight(IlvHierarchyNode row)
Returns the height of the specified row in the tree.
|
int |
getRowIndex(IlvHierarchyNode row)
Returns the row index that the specified row is displayed on.
|
ULocale |
getULocale()
Returns the locale of this tree.
|
boolean |
isExpanded(IlvHierarchyNode row)
Returns whether the specified row is currently expanded.
|
protected boolean |
isLocationInExpandControl(TreePath path,
int x,
int y)
Returns whether the specified
x ,y
location is within the area that is used to expand/collapse the row
that path is displayed on. |
boolean |
isPathEditable(TreePath path)
Returns whether the specified
path is editable. |
boolean |
isVisible(IlvHierarchyNode row)
Returns whether the specified row is visible.
|
protected void |
paintComponent(Graphics g)
Paints the tree.
|
protected void |
paintHorizontalRowSeparators(Graphics g)
Paints the horizontal lines between each row.
|
void |
rootRowVisibilityChanged(RootRowVisibilityChangedEvent event)
This method is invoked by the
Gantt configuration when
the visibility of the root row has been changed. |
void |
rowCollapsed(IlvHierarchyNode row)
Deprecated.
Beginning with Rogue Wave JViews 8.5, an
IlvJTree can no longer
be used in the role of an IlvVerticalExpansionMaster . Use an
IlvRowExpansionMaster instead. |
void |
rowCollapsed(RowCollapsedEvent event)
Invoked by the
IlvGanttConfiguration when this tree is
configured as an IlvVerticalExpandable slave component and a
row has been collapsed in the data tree. |
void |
rowExpanded(IlvHierarchyNode row)
Deprecated.
Beginning with Rogue Wave JViews 8.5, an
IlvJTree can no longer
be used in the role of an IlvVerticalExpansionMaster . Use an
IlvRowExpansionMaster instead. |
void |
rowExpanded(RowExpandedEvent event)
Invoked by the
IlvGanttConfiguration when this tree is
configured as an IlvVerticalExpandable slave component and a
row has been expanded in the data tree. |
void |
rowHeightChanged(RowHeightChangedEvent event)
Invoked by the
Gantt configuration when
the row height has been changed. |
void |
rowMoved(IlvHierarchyNode row,
IlvHierarchyNode oldParent,
int oldIndex,
IlvHierarchyNode newParent,
int newIndex)
Deprecated.
Beginning with Rogue Wave JViews 8.5, an
IlvJTree can no longer
be used in the role of an IlvVerticalExpansionMaster . Use an
IlvRowExpansionMaster instead. |
void |
rowMoved(RowMovedEvent event)
Invoked by the
IlvGanttConfiguration when this tree is
configured as an IlvVerticalExpandable slave component and a
row has been moved within the data tree. |
void |
rowsInserted(IlvHierarchyNode parent,
IlvHierarchyNode[] children,
int[] childIndices)
Deprecated.
Beginning with Rogue Wave JViews 8.5, an
IlvJTree can no longer
be used in the role of an IlvVerticalExpansionMaster . Use an
IlvRowExpansionMaster instead. |
void |
rowsInserted(RowsInsertedEvent event)
Invoked by the
IlvGanttConfiguration when this tree is
configured as an IlvVerticalExpandable slave component and
children have been inserted into a common parent row in the data tree. |
void |
rowsRemoved(IlvHierarchyNode parent,
IlvHierarchyNode[] children,
int[] childIndices)
Deprecated.
Beginning with Rogue Wave JViews 8.5, an
IlvJTree can no longer
be used in the role of an IlvVerticalExpansionMaster . Use an
IlvRowExpansionMaster instead. |
void |
rowsRemoved(RowsRemovedEvent event)
Invoked by the
IlvGanttConfiguration when this tree is
configured as an IlvVerticalExpandable slave component and
children have been removed from a common parent row in the data tree. |
void |
rowUpdated(IlvHierarchyNode row)
Invoke this method to notify the tree that the representation of the
specified
row has changed. |
void |
setBaseTextDirection(int btd)
Sets the base text direction for this tree.
|
void |
setComponentOrientation(ComponentOrientation o)
Sets the component orientation of this tree.
|
void |
setExpandableGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
Sets the Gantt configuration that this UI component is coordinating
with.
|
protected void |
setExpandedState(TreePath path,
boolean state)
Sets the expanded state of the specified
path . |
void |
setExpansionMasterGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
Deprecated.
Beginning with Rogue Wave JViews 8.5, an
IlvJTree can no longer
be used in the role of an IlvVerticalExpansionMaster . Use an
IlvRowExpansionMaster instead. |
void |
setLocale(Locale locale)
Sets the locale of this component.
|
void |
setRenderPolicy(IlvJTreeRenderPolicy policy)
Sets the rendering and editing policy for rows displayed in this tree.
|
void |
setULocale(ULocale locale)
Sets the locale of this component.
|
void |
toggleExpandState(int row)
Expands the specified
row if it is collapsed, or
collapses it if it is currently expanded. |
void |
toggleExpandState(TreePath path)
Expands
path if it is collapsed, or collapses it if it
is currently expanded. |
void |
updateUI()
This method is a notification that the L&F has changed.
|
void |
validateRowHeights()
Ensures that the heights of all rows are up-to-date.
|
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, createTreeModel, createTreeModelListener, expandPath, expandRow, fireTreeCollapsed, fireTreeExpanded, fireTreeWillCollapse, fireTreeWillExpand, fireValueChanged, getAccessibleContext, getAnchorSelectionPath, getCellEditor, getCellRenderer, getClosestPathForLocation, getClosestRowForLocation, getDefaultTreeModel, getDescendantToggledPaths, getDragEnabled, getDropLocation, getDropMode, getEditingPath, getExpandedDescendants, getExpandsSelectedPaths, getInvokesStopCellEditing, getLastSelectedPathComponent, getLeadSelectionPath, getLeadSelectionRow, getMaxSelectionRow, getMinSelectionRow, getModel, getNextMatch, getPathBetweenRows, getPathBounds, getPathForLocation, getPathForRow, getPreferredScrollableViewportSize, getRowBounds, getRowCount, getRowForLocation, getRowForPath, getRowHeight, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getScrollsOnExpand, getSelectionCount, getSelectionModel, getSelectionPath, getSelectionPaths, getSelectionRows, getShowsRootHandles, getToggleClickCount, getToolTipText, getTreeExpansionListeners, getTreeSelectionListeners, getTreeWillExpandListeners, getUI, getUIClassID, getVisibleRowCount, hasBeenExpanded, isCollapsed, isCollapsed, isEditable, isEditing, isExpanded, isExpanded, isFixedRowHeight, isLargeModel, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, makeVisible, paramString, removeDescendantSelectedPaths, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setCellRenderer, setDragEnabled, setDropMode, setEditable, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setModel, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionInterval, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange
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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, 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
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, transferFocusDownCycle, validate, validateTree
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, 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, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public IlvJTree()
IlvJTree
. The tree rows will be
rendered and edited using a default rendering policy.public IlvJTree(IlvJTreeRenderPolicy renderPolicy)
IlvJTree
that will use the specified
policy for rendering and editing its rows.renderPolicy
- The rendering policy.@Deprecated public IlvHierarchyNode getRootVisibleRow()
getFirstVisibleRow()
instead.null
if no rows are
rows are visible.public IlvHierarchyNode getFirstVisibleRow()
null
if no rows are
visible. If the data model contains at least a root row and the root row is set visible, then this method will return the root
row. If the root row is set not visible, then this method will return the first child
of the root row, if it exists in the data model. This method is equivalent to
calling getRow(0)
.JTree.isRootVisible()
,
JTree.setRootVisible(boolean)
public IlvHierarchyNode getRow(int rowIndex)
null
is returned.rowIndex
- The row index.null
if
rowIndex < 0
or
rowIndex >= getRowCount()
.public int getRowIndex(IlvHierarchyNode row)
row
- The row.row
is visible on, where 0
is the first row, or -1 if row
is not visible.public int getRowHeight(IlvHierarchyNode row)
row
- The row. The type of the specified row must match
the row organization of the
Gantt configuration
that
the tree is associated with. In other words, if
getRowType
is
IlvGanttConfiguration.ACTIVITY_ROWS
, then row
must be an IlvActivity
. If
getRowType
is
IlvGanttConfiguration.RESOURCE_ROWS
, then row
must be an IlvResource
.protected void setExpandedState(TreePath path, boolean state)
path
. This
method is overridden to forward preSetExpandedState
and
postSetExpandedState
methods in the tree's vertical
adapter before and after the path is actually expanded.setExpandedState
in class JTree
public void toggleExpandState(TreePath path)
path
if it is collapsed, or collapses it if it
is currently expanded.public void toggleExpandState(int row)
row
if it is collapsed, or
collapses it if it is currently expanded.row
- The display row, where 0 is the first row in the display.public boolean isExpanded(IlvHierarchyNode row)
false
is returned.row
- The row.false
if the row has no children, is collapsed,
or any of its ancestors are collapsed. Returns
true
if the row and all of its ancestors are
expanded.public boolean isVisible(IlvHierarchyNode row)
row
- The row.true
if the row is visible, and
false
otherwise.public TreePath getPathForRow(IlvHierarchyNode row)
row
up to and including the root row, where
the specified row is the last component in the returned
TreePath
.row
- The row to get the tree path for.TreePath
from the root to the specified
row.protected boolean isLocationInExpandControl(TreePath path, int x, int y)
x
,y
location is within the area that is used to expand/collapse the row
that path
is displayed on.true
if path
is not a leaf node
and x
,y
is within its
expand/collapse icon area.public boolean isPathEditable(TreePath path)
path
is editable. This is
invoked from the UI before editing begins to insure that the given
path can be edited. This method is overridden here to ignore
JTree
'sisEditable()
flag. Instead the
tree's renderPolicy
is queried for whether the specific
row is editable. If the tree does not have a renderPolicy
,
then false
is returned.isPathEditable
in class JTree
IlvJTreeRenderPolicy.isEditable(ilog.views.gantt.IlvHierarchyNode)
public ULocale getULocale()
ULocale
.setULocale(ULocale)
public void setULocale(ULocale locale)
locale
- An ICU ULocale
, or null
if this
component shall inherit its locale from the parent component.getULocale()
,
setLocale(Locale)
public void setLocale(Locale locale)
setLocale
in class Component
locale
- An Locale
, or null
if this
component shall inherit its locale from the parent component.setULocale(ULocale)
public void setComponentOrientation(ComponentOrientation o)
setComponentOrientation
in class Component
o
- The orientation for this tree.protected void componentOrientationChanged(ComponentOrientation oldOrientation, ComponentOrientation newOrientation)
oldOrientation
- The component orientation before the change.newOrientation
- The component orientation after the change.Component.getComponentOrientation()
,
setComponentOrientation(ComponentOrientation)
public final int getBaseTextDirection()
The base text direction influences the display of text strings that are composed of segments that are read from left to right as well as of segments that are read from right to left. It determines the order of these segments.
IlvBidiUtil.COMPONENT_DIRECTION
,
IlvBidiUtil.CONTEXTUAL_DIRECTION
,
IlvBidiUtil.LEFT_TO_RIGHT
,
IlvBidiUtil.RIGHT_TO_LEFT
,
IlvBidiUtil.INHERITED_DIRECTION
.setBaseTextDirection(int)
,
getResolvedBaseTextDirection()
public void setBaseTextDirection(int btd)
The base text direction influences the display of text strings that are composed of segments that are read from left to right as well as of segments that are read from right to left. It determines the order of these segments.
Possible values are:
IlvBidiUtil.COMPONENT_DIRECTION
,
IlvBidiUtil.CONTEXTUAL_DIRECTION
,
IlvBidiUtil.LEFT_TO_RIGHT
, IlvBidiUtil.RIGHT_TO_LEFT
,
and IlvBidiUtil.INHERITED_DIRECTION
.
btd
- The base text direction.getBaseTextDirection()
public int getResolvedBaseTextDirection()
The base text direction influences the display of text strings that are composed of segments that are read from left to right as well as of segments that are read from right to left. It determines the order of these segments.
This method is based on getBaseTextDirection()
but determines
the value when it is inherited from a parent component
(IlvBidiUtil.INHERITED_DIRECTION
) or dependent on
the component orientation (IlvBidiUtil.COMPONENT_DIRECTION
).
IlvBidiUtil.CONTEXTUAL_DIRECTION
,
IlvBidiUtil.LEFT_TO_RIGHT
,
IlvBidiUtil.RIGHT_TO_LEFT
.protected void baseTextDirectionChanged()
getResolvedBaseTextDirection()
has
changed, orgetComponentOrientation()
has changed
and the value of getResolvedBaseTextDirection()
is
IlvBidiUtil.CONTEXTUAL_DIRECTION
.public IlvJTreeRenderPolicy getRenderPolicy()
public void setRenderPolicy(IlvJTreeRenderPolicy policy)
null
, the tree's default rendering and
editing policy will be used.policy
- The rendering and editing policy.public String convertValueToText(Object row, boolean selected, boolean expanded, boolean leaf, int rowIndex, boolean hasFocus)
IlvJTreeRenderPolicy.getValueAsText(ilog.views.gantt.IlvHierarchyNode)
.convertValueToText
in class JTree
row
- The row to be rendered and converted to text.selected
- Indicates whether the node is selected.expanded
- Indicates whether the node is expanded.leaf
- Indicates if the node is a leaf node.rowIndex
- The row index.hasFocus
- Indicates if the node has the focus.String
representation of the node's value.public void rowUpdated(IlvHierarchyNode row)
row
has changed. The tree will then repaint
the row.row
- The row whose visual representation has changed.public BasicTreeUI getBasicUI()
null
if the tree has no L&F installed or the
L&F is not a subclass of BasicTreeUI
.BasicTreeUI
object that renders this tree.public void updateUI()
protected void paintComponent(Graphics g)
paintComponent
in class JComponent
g
- the Graphics
context in which to paint.protected void paintHorizontalRowSeparators(Graphics g)
g
- the Graphics
context in which to paint.public void ganttModelChanged(GanttModelChangedEvent event)
IlvGanttConfiguration
when the data model has
been replaced. Logically, the root row has also changed as a result
(unless both the old and new Gantt data models have a
null
root node). However, separate
rowsInserted
or rowsRemoved
events will
not be invoked by the Gantt configuration as a result of
the data model change being reported.ganttModelChanged
in interface IlvVerticalExpandable
event
- The event.public void rowHeightChanged(RowHeightChangedEvent event)
Gantt configuration
when
the row height has been changed.rowHeightChanged
in interface VerticalExpansionListener
event
- The event.public void rootRowVisibilityChanged(RootRowVisibilityChangedEvent event)
Gantt configuration
when
the visibility of the root row has been changed.rootRowVisibilityChanged
in interface VerticalExpansionListener2
event
- The event.public void setExpandableGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
addVerticalExpandable()
method. The expandable component should initially synchronize its
display with the Gantt configuration at this point. Note, however,
that the Gantt configuration may or may not have a valid data model at
this time and this must be taken into account. The expandable will be
subsequently informed when a data model is set or replaced through the
ganttModelChanged
event.
Warning: This method is considered to be part of an
IlvVerticalExpandable
's internal implementation and is
not a public API. Only the Gantt configuration should invoke this
method.
setExpandableGanttConfigurationImpl
in interface IlvVerticalExpandable
ganttConfig
- The Gantt configuration that this component is
being added to, or null
if this component is
being removed from its Gantt configuration.IlvGanttConfiguration.addVerticalExpandable(ilog.views.gantt.IlvVerticalExpandable)
public void validateRowHeights()
validateRowHeights
in interface IlvVerticalExpandable
public void rowsInserted(RowsInsertedEvent event)
IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpandable
slave component and
children have been inserted into a common parent row in the data tree.
This is the same as an ActivitiesInsertedEvent
or
ResourcesInsertedEvent
, but with additional visibility
information about the inserted rows. If the parent row is visible and
expanded, the newly inserted children will also be visible. Otherwise,
the new children will not be visible.rowsInserted
in interface VerticalExpansionListener
event
- The event.public void rowsRemoved(RowsRemovedEvent event)
IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpandable
slave component and
children have been removed from a common parent row in the data tree.
This is the same as an ActivitiesRemovedEvent
or
ResourcesRemovedEvent
, but with additional visibility
information about the deleted rows. All, some, or none of the rows
removed from the data model may have been visible.rowsRemoved
in interface VerticalExpansionListener
event
- The event.public void rowMoved(RowMovedEvent event)
IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpandable
slave component and a
row has been moved within the data tree. This is the same as an
ActivityMovedEvent
or ResourceMovedEvent
, but with
additional visibility information about the row that was moved.rowMoved
in interface VerticalExpansionListener
event
- The event.public void rowExpanded(RowExpandedEvent event)
IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpandable
slave component and a
row has been expanded in the data tree.rowExpanded
in interface VerticalExpansionListener
event
- The event.public void rowCollapsed(RowCollapsedEvent event)
IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpandable
slave component and a
row has been collapsed in the data tree.rowCollapsed
in interface VerticalExpansionListener
event
- The event.@Deprecated public void setExpansionMasterGanttConfigurationImpl(IlvGanttConfiguration ganttConfig)
IlvJTree
can no longer
be used in the role of an IlvVerticalExpansionMaster
. Use an
IlvRowExpansionMaster
instead.Gantt configuration
that this
expansion master is coordinating with. This method is invoked when the
expansion master is added to the configuration through its
IlvGanttConfiguration.setVerticalExpansionMaster(ilog.views.gantt.IlvVerticalExpansionMaster)
method. The
expansion master should initially synchronize its state with the Gantt
configuration at this point. Note, however, that the Gantt
configuration may or may not have a valid data model at this time and
this must be taken into account. The expansion master will be
subsequently informed when a data model is set or replaced through the
ganttModelChanged(ilog.views.gantt.event.GanttModelChangedEvent)
event.
Warning: This method is considered to be part of an
IlvVerticalExpansionMaster
's internal implementation and is
not a public API. Only the Gantt configuration should invoke this
method.
ganttConfig
- The Gantt configuration that this expansion master
is being added to, or null
if this expansion
master is being removed from its Gantt configuration.@Deprecated public void rowsInserted(IlvHierarchyNode parent, IlvHierarchyNode[] children, int[] childIndices)
IlvJTree
can no longer
be used in the role of an IlvVerticalExpansionMaster
. Use an
IlvRowExpansionMaster
instead.IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpansionMaster
and children have
been inserted into a common parent row in the data tree. A
RowsInsertedEvent
is published to all the
IlvVerticalExpandable
components registered with the Gantt
configuration.parent
- The parent row that has had children inserted. If the
insertion being reported is the hierarchy's root row,
parent
should be null
,
children
should be a single element array
containing the root row, and childIndices
should be a single element array with
childIndices[0]=0
.children
- The array of child IlvHierarchyNode
s that
have been inserted. The rows must be arranged in parallel
with childIndices
, ordered according to their
indices within their common parent row from lowest to
highest.childIndices
- An int
array of the child indices
arranged in parallel with children
, ordered
from lowest to highest. The indices point to the final
locations in the parent row where the children were inserted.@Deprecated public void rowsRemoved(IlvHierarchyNode parent, IlvHierarchyNode[] children, int[] childIndices)
IlvJTree
can no longer
be used in the role of an IlvVerticalExpansionMaster
. Use an
IlvRowExpansionMaster
instead.IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpansionMaster
and children have
been removed from a common parent row in the data tree. A
RowsRemovedEvent
is published to all of the
IlvVerticalExpandable
components registered with the Gantt
configuration.parent
- The parent row that has had children removed. If the
deletion being reported is the hierarchy's root row,
parent
should be null
,
children
should be a single element array
containing the root row, and childIndices
should be a single element array with
childIndices[0]=0
.children
- The array of child IlvHierarchyNode
s that
have been removed. The rows must be arranged in parallel with
childIndices
, ordered according to their
indices within their common parent row from lowest to
highest.childIndices
- An int
array of the child row
indices arranged in parallel with children
,
ordered from lowest to highest. The indices point to the
original locations in the parent row where the children were
removed.@Deprecated public void rowMoved(IlvHierarchyNode row, IlvHierarchyNode oldParent, int oldIndex, IlvHierarchyNode newParent, int newIndex)
IlvJTree
can no longer
be used in the role of an IlvVerticalExpansionMaster
. Use an
IlvRowExpansionMaster
instead.IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpansionMaster
and a row has been
moved within the data tree. A RowMovedEvent
is published to
all the IlvVerticalExpandable
components registered with the
Gantt configuration.row
- The row that has been moved.oldParent
- The previous parent of the row
.oldIndex
- The index of the row
within
oldParent
before it was moved.newParent
- The new parent of the row
.newIndex
- The row
index within
newParent
after it has been moved.@Deprecated public void rowExpanded(IlvHierarchyNode row)
IlvJTree
can no longer
be used in the role of an IlvVerticalExpansionMaster
. Use an
IlvRowExpansionMaster
instead.IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpansionMaster
and a row has been
expanded in the data tree. A RowExpandedEvent
is published to
all the IlvVerticalExpandable
components registered with the
Gantt configuration.row
- The expanded row.@Deprecated public void rowCollapsed(IlvHierarchyNode row)
IlvJTree
can no longer
be used in the role of an IlvVerticalExpansionMaster
. Use an
IlvRowExpansionMaster
instead.IlvGanttConfiguration
when this tree is
configured as an IlvVerticalExpansionMaster
and a row has been
collapsed in the data tree. A RowCollapsedEvent
is published
to all the IlvVerticalExpandable
components registered with
the Gantt configuration.row
- The collapsed row.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.