public class IlpTreeView extends JTree implements IlpStylableGraphicView, ilog.cpl.graphic.css.internal.IlpCSSGraphicView, AdapterListener
This class displays the content of a TreeModel object
in the form of a tree.
In addition to the common 'what is highlighted is what is selected' paradigm,
this tree offers an alternate look-and-feel using check boxes to render/manipulate
the selection. See setSelectionLookAndFeel(int).
| Modifier and Type | Class and Description |
|---|---|
protected class |
IlpTreeView.IlpTreeModelHandler
Listens to the model and updates the graphic representation
of the nodes accordingly when nodes are changed.
|
JTree.AccessibleJTree, JTree.DropLocation, JTree.DynamicUtilTreeNode, JTree.EmptySelectionModel, JTree.TreeModelHandler, JTree.TreeSelectionRedirectorJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static int |
CHECKBOX_SELECTION_LOOK_AND_FEEL
Selection is displayed/modified by check boxes.
|
static String |
HIGHLIGHT_MODE_PROPERTY
Bound property name for
highlightMode. |
static int |
HIGHLIGHT_SELECTION_LOOK_AND_FEEL
Selection is displayed/modified by highlighting nodes.
|
static int |
LEAD_SELECTION_HIGHLIGHT
Only the lead selection is highlighted.
|
static int |
SELECTED_SELECTION_HIGHLIGHT
The selected objects from the selection model are highlighted.
|
static String |
SELECTION_CHECKBOX_VISIBLE_PROPERTY
Bound property name for
selectionCheckBoxVisible. |
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, treeModel, treeModelListener, VISIBLE_ROW_COUNT_PROPERTY, visibleRowCountlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTUPDATE_ALL_MASK, UPDATE_COMPONENT_MASK, UPDATE_NONE_MASK, UPDATE_OBJECTS_MASKAPPLIED_RULE_MASK, BAD_CLASS_MASK, BAD_PROP_MASK, BAD_PROP_WITH_STACK_MASK, CREATED_MASK, DECL_MASK, DECL_VALUE_MASK, FAILED_CONVERSIONS_MASK, TIME_REPORT_MASK, WARNING_PROP_MASKABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
IlpTreeView()
Creates an
IlpTreeView object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addPseudoClass(IlpObject bo,
String pseudo)
Adds a pseudoclass to the specified business object.
|
void |
addPseudoClass(IlpRepresentationObject ro,
String pseudo)
Adds a pseudoclass to the given representation object.
|
protected TreePath |
createPathForNode(TreeNode node)
Creates a tree path for the given node.
|
protected TreeModelListener |
createTreeModelListener()
Creates and returns an instance of
IlpTreeModelHandler. |
boolean |
ensureVisible(IlpObject object)
Scrolls the view in such a way that a given object
becomes visible.
|
boolean |
ensureVisible(IlpRepresentationObject ro)
Scrolls the view in such a way that a given representation object
becomes visible.
|
IlpAttribute |
getAttribute(IlpPoint viewLocation)
Returns the
IlpAttribute object at the given position
in this object. |
boolean |
getCollapseUnselectsDescendants()
Returns
true if collapsing a node deselects its
descendants. |
Container |
getContainer()
Returns the concrete container where the graphics are currently being
displayed.
|
IlpContext |
getContext()
Returns the application context.
|
IlpGraphicController |
getController()
Returns the controller, which is responsible for
the interaction between the user and the view.
|
IlpGraphic |
getGraphic(IlpPoint viewLocation)
Returns the
IlpGraphic object at the given position in this object. |
Class<?> |
getGraphicComponentClass()
Returns the graphic component class supported by this implementation of
graphic view.
|
IlpGraphicHolder |
getGraphicHolder()
Returns the association between object representations
and graphics.
|
int |
getHighlightMode()
Returns the highlight mode.
|
IlpGraphic |
getInnermostGraphic(IlpPoint viewLocation)
Returns the innermost graphic at the given position in this object.
|
List<String> |
getPseudoClasses(IlpRepresentationObject ro,
IlpAttribute a)
Returns the custom pseudoclasses currently active for the object
|
IlpRepresentationObject |
getRepresentationObject(IlpPoint viewLocation)
Returns the
IlpRepresentationObject object at the given position
in this object. |
IlpRepresentationObjectMapper |
getRepresentationObjectMapper()
Returns the mapper that allows the tree view to know the
correspondence between
IlpRepresentationObject
and IlpObject. |
IlpRepresentationObjectSelectionModel |
getRepresentationObjectSelectionModel()
Returns the
IlpRepresentationObjectSelectionModel
used to handle the selection of representation objects. |
IlpGraphicViewStyleManager |
getStyleManager()
Deprecated.
The Style API has been replaced by the Cascading
Style Sheet mechanism. Please use the method
setStyleSheets
or getStyleSheets instead. |
int |
getStyleSheetDebugMask()
Returns the current debug level.
|
String[] |
getStyleSheets()
Returns the cascading style sheets.
|
String |
getStyleSheets(int index)
Returns one of the cascading style sheets.
|
ilog.cpl.tree.internal.IlpTreeViewSupport |
getTreeViewSupport()
useful for our friend: the controller.
|
ilog.cpl.graphic.css.internal.IlpViewCSSContext |
getViewCSSContext()
Returns the context information that provides
Cascading Style Sheets support for this graphic view.
|
boolean |
hasStyleSheets()
Returns
true if style sheets have been defined for this view. |
void |
invalidate(IlpRepresentationObject ro)
Invalidates the graphic representation of the given object.
|
void |
invalidateGraphics()
Invalidates all the graphic representations in this view.
|
void |
invalidateLayoutCache()
This is a convenient method to allow for explicitly invalidating the
layout cache.
|
void |
invalidateLayoutCache(IlpRepresentationObject ro)
Deprecated.
Invalidating the layout cache for a specific representation
object is no longer supported. Please use method
{
invalidateLayoutCache() instead. |
boolean |
isInvalidateGraphicRepresentationsLater()
If it is true, method treeNodesChanged() will not invoke invalidate(ro).
|
boolean |
isSelectionCheckBoxVisible()
Indicates whether the selected nodes are displayed using check boxes.
|
void |
makeVisible(TreePath path)
Ensures that the node identified by path is currently viewable.
|
protected void |
processKeyEvent(KeyEvent e)
Processes key events occurring on this component by dispatching
them to any registered
KeyListener objects. |
protected void |
processMouseEvent(MouseEvent e)
Processes mouse events occurring on this component by
dispatching them to any registered
MouseListener objects. |
protected boolean |
removeDescendantSelectedPaths(TreePath path,
boolean includePath)
Removes any paths in the selection that are descendants of
path. |
void |
removePseudoClass(IlpObject bo,
String pseudo)
Removes a pseudoclass from the specified business object.
|
void |
removePseudoClass(IlpRepresentationObject ro,
String pseudo)
Removes a pseudoclass from the given representation object.
|
void |
representationObjectsAdded(AdapterEvent e)
Called when objects have been added to the adapter.
|
void |
representationObjectsRemoved(AdapterEvent e)
Called when objects have been removed from the adapter.
|
void |
setCellRenderer(TreeCellRenderer x)
Sets the
TreeCellRenderer that will be used
to draw each cell. |
void |
setCollapseUnselectsDescendants(boolean collapseUnselectsDescendants)
Sets the descendants of a collapsed node to be deselected or not.
|
void |
setController(IlpGraphicController controller)
Sets the controller, which is responsible for
the interaction between the user and the view.
|
void |
setHighlightMode(int highlightMode)
Sets the mode used to determine whether a cell is highlighted or
not.
|
void |
setInvalidateGraphicRepresentationsLater(boolean invalidateGraphicRepresentationsLater)
If it is true, method treeNodesChanged() will not invoke invalidate(ro).
|
void |
setModel(TreeModel newModel)
Sets the
TreeModel that will provide the data. |
void |
setRepresentationObjectMapper(IlpRepresentationObjectMapper mapper)
Sets a mapper that allows the tree view to know the correspondence
between
IlpRepresentationObject and
IlpObject |
void |
setSelectionCheckBoxVisible(boolean selectionCheckBoxVisible)
Activates or deactivates the use of check boxes to display and modify the
selection status of nodes.
|
void |
setSelectionInterval(int index0,
int index1)
Selects the nodes between index0 and index1, inclusive.
|
void |
setSelectionLookAndFeel(int selectionLookAndFeel)
Sets the way the selection is rendered to/manipulated by the end-user.
|
void |
setStyleManager(IlpGraphicViewStyleManager config)
Deprecated.
The Style API has been replaced by the Cascading
Style Sheet mechanism. Please use the method
setStyleSheets
or getStyleSheets instead. |
void |
setStyleSheetDebugMask(int mask)
Sets the debug level while parsing the style sheets.
|
void |
setStyleSheets(int index,
String css)
Changes one of the cascading style sheets.
|
void |
setStyleSheets(int index,
String css,
int updateMask)
Changes one of the cascading style sheets.
|
void |
setStyleSheets(String[] css)
Sets the cascading style sheets.
|
void |
setStyleSheets(String[] css,
int updateMask)
Sets the cascading style sheets.
|
addSelectionInterval, addSelectionPath, addSelectionPaths, addSelectionRow, addSelectionRows, addTreeExpansionListener, addTreeSelectionListener, addTreeWillExpandListener, cancelEditing, clearSelection, clearToggledPaths, collapsePath, collapseRow, convertValueToText, createTreeModel, 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, isPathEditable, isPathSelected, isRootVisible, isRowSelected, isSelectionEmpty, isVisible, paramString, removeDescendantToggledPaths, removeSelectionInterval, removeSelectionPath, removeSelectionPaths, removeSelectionRow, removeSelectionRows, removeTreeExpansionListener, removeTreeSelectionListener, removeTreeWillExpandListener, scrollPathToVisible, scrollRowToVisible, setAnchorSelectionPath, setCellEditor, setDragEnabled, setDropMode, setEditable, setExpandedState, setExpandsSelectedPaths, setInvokesStopCellEditing, setLargeModel, setLeadSelectionPath, setRootVisible, setRowHeight, setScrollsOnExpand, setSelectionModel, setSelectionPath, setSelectionPaths, setSelectionRow, setSelectionRows, setShowsRootHandles, setToggleClickCount, setUI, setVisibleRowCount, startEditingAtPath, stopEditing, treeDidChange, updateUIaddAncestorListener, 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, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, 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, updateadd, 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, validateTreeaction, 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, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, removePropertyChangeListenerpublic static final String SELECTION_CHECKBOX_VISIBLE_PROPERTY
selectionCheckBoxVisible.public static final String HIGHLIGHT_MODE_PROPERTY
highlightMode.public static final int LEAD_SELECTION_HIGHLIGHT
Since the highlight does not reflect the actual selection, you probably
want to display the selection check boxes, using
setSelectionCheckBoxVisible(true).
public static final int SELECTED_SELECTION_HIGHLIGHT
JTree behavior.setHighlightMode(int),
Constant Field Valuespublic static final int HIGHLIGHT_SELECTION_LOOK_AND_FEEL
This is the common selection look-and-feel implemented in the Swing JTree.
Note that setting the selectionLookAndFeel to
HIGHLIGHT_SELECTION_LOOK_AND_FEEL is strictly equivalent to the
following:
setSelectionCheckBoxVisible(false);
setCollapseUnselectsDescendants(true);
setHighlightMode(SELECTED_SELECTION_HIGHLIGHT);
public static final int CHECKBOX_SELECTION_LOOK_AND_FEEL
Note that setting the selectionLookAndFeel to
CHECKBOX_SELECTION_LOOK_AND_FEEL is strictly equivalent to the
following:
setSelectionCheckBoxVisible(true);
setCollapseUnselectsDescendants(false);
setHighlightMode(LEAD_SELECTION_HIGHLIGHT);
public IlpTreeView()
IlpTreeView object.
By default, the selectionLookAndFeel is: HIGHLIGHT_SELECTION_LOOK_AND_FEEL;
the treeCellRenderer is an IlpTreeCellRenderer object;
the selectionModel is an IlpDefaultTreeSelectionModel object.public ilog.cpl.tree.internal.IlpTreeViewSupport getTreeViewSupport()
public IlpContext getContext()
getContext in interface IlpGraphicViewpublic IlpGraphicController getController()
getController in interface IlpGraphicViewpublic void setController(IlpGraphicController controller)
setController in interface IlpGraphicViewcontroller - The controller to be set.public void setModel(TreeModel newModel)
TreeModel that will provide the data.@Deprecated public IlpGraphicViewStyleManager getStyleManager()
setStyleSheets
or getStyleSheets instead.getStyleManager in interface IlpGraphicView@Deprecated public void setStyleManager(IlpGraphicViewStyleManager config)
setStyleSheets
or getStyleSheets instead.setStyleManager in interface IlpGraphicViewconfig - The view style manager to be set.public IlpGraphicHolder getGraphicHolder()
getGraphicHolder in interface IlpGraphicViewpublic IlpRepresentationObjectSelectionModel getRepresentationObjectSelectionModel()
IlpRepresentationObjectSelectionModel
used to handle the selection of representation objects.getRepresentationObjectSelectionModel in interface IlpGraphicViewIlpRepresentationObjectSelectionModel,
null otherwise.JTree.setSelectionModel(javax.swing.tree.TreeSelectionModel)public void setSelectionLookAndFeel(int selectionLookAndFeel)
selectionLookAndFeel - One of:
HIGHLIGHT_SELECTION_LOOK_AND_FEEL,
CHECKBOX_SELECTION_LOOK_AND_FEEL.setSelectionCheckBoxVisible(boolean),
setHighlightMode(int),
setCollapseUnselectsDescendants(boolean)public void setSelectionCheckBoxVisible(boolean selectionCheckBoxVisible)
public boolean isSelectionCheckBoxVisible()
public void setHighlightMode(int highlightMode)
highlightMode - One of: LEAD_SELECTION_HIGHLIGHT,
SELECTED_SELECTION_HIGHLIGHT.public int getHighlightMode()
LEAD_SELECTION_HIGHLIGHT,
SELECTED_SELECTION_HIGHLIGHT.public void setCollapseUnselectsDescendants(boolean collapseUnselectsDescendants)
selectionCheckBox mode, you will probably want
collapsing to leave the descendants selected.collapseUnselectsDescendants - true if collapsing a
node deselects its descendants.public boolean getCollapseUnselectsDescendants()
true if collapsing a node deselects its
descendants.protected boolean removeDescendantSelectedPaths(TreePath path, boolean includePath)
path. If includePath is true, and
path is selected, the path will be removed from the selection.
Overridden so that deselecting is controlled by the
collapseUnselectsDescendants property.removeDescendantSelectedPaths in class JTreepath - The path whose descendants are to be removed.includePath - true if path is to be deselected.true if descendants are to be deselected.setCollapseUnselectsDescendants(boolean)public IlpRepresentationObject getRepresentationObject(IlpPoint viewLocation)
IlpRepresentationObject object at the given position
in this object.getRepresentationObject in interface IlpGraphicViewviewLocation - The position to be checked.public IlpAttribute getAttribute(IlpPoint viewLocation)
IlpAttribute object at the given position
in this object.
If the view graphic holder is configured explicitly to not store the
IlpGraphic instance (see IlpEmptyGraphicHolder),
this method returns null.
If the tree cell renderer is configured to not work with IlpGraphic
instances, then this method returns null.
getAttribute in interface IlpGraphicViewviewLocation - The position to be checked.null
if there is no attribute represented at this position.public IlpGraphic getGraphic(IlpPoint viewLocation)
IlpGraphic object at the given position in this object.
If the view graphic holder is configured explicitly to not store the
IlpGraphic instance (see IlpEmptyGraphicHolder),
this method returns null.
If the tree cell renderer is configured to not work with IlpGraphic
instances, then this method returns null. In this case,
use getRepresentationObject(IlpPoint) instead.
getGraphic in interface IlpGraphicViewviewLocation - The position to be checked.public IlpGraphic getInnermostGraphic(IlpPoint viewLocation)
If the view graphic holder is configured explicitly to not store the
IlpGraphic instance (see IlpEmptyGraphicHolder),
this method returns null.
If the tree cell renderer is configured to not work with IlpGraphic
instances, then this method returns null.
getInnermostGraphic in interface IlpGraphicViewviewLocation - The position to be checked.public Container getContainer()
getContainer in interface IlpGraphicViewpublic void representationObjectsAdded(AdapterEvent e)
representationObjectsAdded in interface AdapterListenere - Adapter eventpublic void representationObjectsRemoved(AdapterEvent e)
representationObjectsRemoved in interface AdapterListenere - Adapter eventpublic Class<?> getGraphicComponentClass()
getGraphicComponentClass in interface IlpGraphicViewpublic boolean isInvalidateGraphicRepresentationsLater()
public void setInvalidateGraphicRepresentationsLater(boolean invalidateGraphicRepresentationsLater)
invalidateGraphicRepresentationsLater - public void invalidate(IlpRepresentationObject ro)
Indicates that it needs to be recomputed.
invalidate in interface IlpGraphicViewpublic void invalidateGraphics()
invalidateGraphics in interface IlpGraphicViewpublic void invalidateLayoutCache()
@Deprecated public void invalidateLayoutCache(IlpRepresentationObject ro)
invalidateLayoutCache() instead.protected TreePath createPathForNode(TreeNode node)
public boolean ensureVisible(IlpRepresentationObject ro)
The operation is ignored if the given representation object is not part of the tree component model.
true if the object is visible, false
otherwise.public boolean ensureVisible(IlpObject object)
The operation is ignored if the given business object is not currently represented in the component. For instance, if the business object has not yet been represented in the view due to the fact that its parent nodes have not yet been expanded.
true if the object is visible, false
otherwise.public IlpRepresentationObjectMapper getRepresentationObjectMapper()
IlpRepresentationObject
and IlpObject.public void setRepresentationObjectMapper(IlpRepresentationObjectMapper mapper)
IlpRepresentationObject and
IlpObjectgetRepresentationObjectMapper()protected TreeModelListener createTreeModelListener()
IlpTreeModelHandler.
The returned
object is responsible for updating the expanded state when the
TreeModel changes.
For more information on what expanded state means, see
JTree.
createTreeModelListener in class JTreepublic void setStyleSheets(String[] css) throws IlvStylingException
Each element can be a URL, a filename, or the style sheet string directly. The order is by priority (the last CSS takes precedence).
setStyleSheets in interface IlvStylablecss - An array of strings containing the URLs,
the file names of CSS files (usually with a .css
suffix) or CSS extracts directly.IlvStylingExceptiongetStyleSheets()public void setStyleSheets(String[] css, int updateMask) throws IlvStylingException
Each element can be a URL, a filename, or directly the style sheet string. The order is by priority (the last CSS takes precedence).
setStyleSheets in interface IlpStylablecss - An array of strings containing the URLs, the file
names of CSS files (usually with a .css
suffix) or CSS extracts directly.updateMask - Flag that indicates whether the view and/or the business
objects have to be updated to use this new
configuration.
When
IlpStylable.UPDATE_COMPONENT_MASK
is set, the view is reconfigured with the new style
sheets. When
IlpStylable.UPDATE_OBJECTS_MASK
is set, the representation objects that are managed by
this adapter are reconfigured according to the new style
sheets.IlvStylingExceptionIlpStylable.UPDATE_COMPONENT_MASK,
IlpStylable.UPDATE_OBJECTS_MASK,
getStyleSheets()public void setStyleSheets(int index,
String css)
throws IlvStylingException
This method is an alternative to setStyleSheets(java.lang.String[]).
It lets you change one particular style sheet file, instead of setting the whole style sheet array.
setStyleSheets in interface IlvStylableindex - The index of the style sheet to replace.css - The URL, file name of the new style sheet file or CSS extract
directlyIlvStylingExceptionsetStyleSheets(java.lang.String[]),
getStyleSheets(int)public void setStyleSheets(int index,
String css,
int updateMask)
throws IlvStylingException
This method is an alternative to setStyleSheets(java.lang.String[]).
It lets you change one particular style sheet file, instead of setting
the whole style sheet array.
setStyleSheets in interface IlpStylableindex - The index of the style sheet to replace.css - The URL, file name of the new style sheet file or
CSS extract directly.updateMask - Flag that indicates whether the view and/or the
business objects must be updated to use this new
configuration.
When
IlpStylable.UPDATE_COMPONENT_MASK
is set, the view is reconfigured with the new style
sheets. When
IlpStylable.UPDATE_OBJECTS_MASK
is set, the representation objects that are managed by
this adapter are reconfigured according to the new
style sheets.IlvStylingExceptionIlpStylable.UPDATE_COMPONENT_MASK,
IlpStylable.UPDATE_OBJECTS_MASK,
setStyleSheets(java.lang.String[]),
getStyleSheets(int)public String getStyleSheets(int index)
getStyleSheets in interface IlvStylableindex - The position of the cascading style sheet to return.index-th position.setStyleSheets(int, String),
setStyleSheets(String[])public String[] getStyleSheets()
getStyleSheets in interface IlvStylablesetStyleSheets(String[])public void setStyleSheetDebugMask(int mask)
setStyleSheets(java.lang.String[]) to debug
problems during configuration.setStyleSheetDebugMask in interface IlvStylablemask - The debug mask, expressed as an OR combination of the
predefined flags.setStyleSheets(java.lang.String[]),
getStyleSheetDebugMask(),
IlvStylable.APPLIED_RULE_MASK,
IlvStylable.BAD_CLASS_MASK,
IlvStylable.BAD_PROP_MASK,
IlvStylable.CREATED_MASK,
IlvStylable.DECL_MASK,
IlvStylable.DECL_VALUE_MASK,
IlvStylable.FAILED_CONVERSIONS_MASK,
IlvStylable.TIME_REPORT_MASK,
IlvStylable.WARNING_PROP_MASKpublic int getStyleSheetDebugMask()
getStyleSheetDebugMask in interface IlvStylablesetStyleSheetDebugMask(int)public boolean hasStyleSheets()
true if style sheets have been defined for this view.hasStyleSheets in interface ilog.cpl.graphic.css.internal.IlpCSSGraphicViewpublic ilog.cpl.graphic.css.internal.IlpViewCSSContext getViewCSSContext()
getViewCSSContext in interface ilog.cpl.graphic.css.internal.IlpCSSGraphicViewpublic void addPseudoClass(IlpObject bo, String pseudo)
Pseudoclasses are used to modify the appearance of an object depending on state information, such as whether the object is selected, expanded, and so on.
The pseudoclasses expanded, selected, and
focus are automatically used to customize the objects.
Add your own pseudoclasses to create new types of customization
that depend on the graphic view characteristics.
bo - The business object.pseudo - A string that identifies a pseudoclass
to add to the classes already associated with
the data object.public void removePseudoClass(IlpObject bo, String pseudo)
Pseudoclasses are used to modify the appearance of an object depending on some state information, such as whether the object is selected, expanded, and so on.
The pseudoclasses expanded, selected, and
focus are automatically used to customize the objects.
Add your own pseudoclasses to create new types of customization
that depend on the graphic view characteristics.
bo - The business object.pseudo - A string that identifies a pseudoclass
to remove from the classes associated with
the data object.public void addPseudoClass(IlpRepresentationObject ro, String pseudo)
If the given representation object is associated to a business
model then this method is similar to calling addPseudoClass(IlpObject,String).
Pseudoclasses are used to modify the appearance of an object depending on some state information, such as whether the object is selected, expanded, and so on.
The pseudoclasses expanded, selected, and
focus are automatically used to customize the objects.
Add your own pseudoclasses to create new types of customization
that depend on the graphic view characteristics.
ro - The representation object.pseudo - A string that identifies a pseudoclass
to add to the classes already associated with the data object.addPseudoClass(IlpObject,String)public void removePseudoClass(IlpRepresentationObject ro, String pseudo)
If the given representation object is associated to a business
model then this method is similar to calling removePseudoClass(IlpObject,String).
Pseudoclasses are used to modify the appearance of an object depending on some state information, such as whether the object is selected, expanded, and so on.
The pseudoclasses expanded, selected, and
focus are automatically used to customize the objects.
Add your own pseudoclasses to create new types of customization
that depend on the graphic view characteristics.
ro - The representation object.pseudo - A string that identifies a pseudoclass
to move from the classes associated with the data object.removePseudoClass(IlpObject,String)public List<String> getPseudoClasses(IlpRepresentationObject ro, IlpAttribute a)
getPseudoClasses in interface ilog.cpl.graphic.css.internal.IlpCSSGraphicViewpublic void setCellRenderer(TreeCellRenderer x)
TreeCellRenderer that will be used
to draw each cell.setCellRenderer in class JTreex - the TreeCellRenderer that is to render each cellprotected void processMouseEvent(MouseEvent e)
MouseListener objects.processMouseEvent in class JComponente - The mouse eventprotected void processKeyEvent(KeyEvent e)
KeyListener objects.processKeyEvent in class JComponente - The key eventpublic void makeVisible(TreePath path)
makeVisible in class JTreepath - the TreePath to make visiblepublic void setSelectionInterval(int index0,
int index1)
setSelectionInterval in class JTreeindex0 - an integer specifying a display row, where 0 is the
first row in the displayindex1 - an integer specifying a second display row© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.