|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
ilog.cpl.IlpTree
public class IlpTree
The Tree Component, used to represent hierarchical data.
This class is a graphical bean which encapsulates an
IlpTreeModel, an IlpTreeView and
an IlpTreeController.
The tree model can be filled automatically from an
IlpDataSource. The data source content is
translated into tree model objects, following the containment hierarchy.
The IlpTree class provides convenient methods to access
some view, model and controller properties directly.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary |
|---|
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface ilog.cpl.css.IlpStylable |
|---|
UPDATE_ALL_MASK, UPDATE_COMPONENT_MASK, UPDATE_NONE_MASK, UPDATE_OBJECTS_MASK |
| Fields inherited from interface ilog.views.util.styling.IlvStylable |
|---|
APPLIED_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_MASK |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
IlpTree()
Default constructor. |
|
IlpTree(IlpContext context)
Creates a Tree with this context and the default MVC. |
|
IlpTree(IlpContext context,
IlpTreeModel model,
IlpTreeView view,
IlpTreeController controller)
Creates a Tree component with given MVC components. |
|
IlpTree(IlpTreeModel model,
IlpTreeView view,
IlpTreeController controller)
Creates a Tree component with given MVC components. |
|
| Method Summary | |
|---|---|
void |
addPseudoClass(IlpObject bo,
String pseudo)
Adds a pseudoclass to the specified business object. |
void |
addSelectionObject(IlpObject object)
Adds the given IlpObject to the selection. |
void |
clearSelection()
Clears the selection. |
protected IlpAbstractTreeAdapter |
createDefaultAdapter()
Create a tree adapter for the given adapter mode. |
protected IlpTreeController |
createDefaultController()
Creates the default controller, which is an IlpTreeController object. |
protected IlpTreeModel |
createDefaultModel()
Creates the default model, which is an IlpTreeModel object. |
protected IlpTreeView |
createDefaultView()
Creates the default view, which is an IlpTreeView object. |
void |
dispose()
Cleans up the tree, disconnects the component from the data source and drops references to objects to help the garbage collection. |
void |
doLayout()
Lays out the components. |
boolean |
ensureVisible(IlpObject object)
Scrolls the view in such a way that a given object becomes visible. |
boolean |
ensureVisible(IlpRepresentationObject object)
Scrolls the view in such a way that a given representation object becomes visible. |
IlpAbstractTreeAdapter |
getAdapter()
Returns the adapter connected to the tree or creates a new one. |
TreeCellRenderer |
getCellRenderer()
Retrieves the current tree cell renderer from the view. |
IlpContext |
getContext()
Returns the context. |
IlpTreeController |
getController()
Returns the current controller. |
IlpDataSource |
getDataSource()
Retrieves the current data source. |
IlpViewInteractor |
getDefaultViewInteractor()
Returns the default view interactor. |
IlpFilter |
getFilter()
Returns the filter used to filter business objects. |
JScrollBar |
getHorizontalScrollBar()
Returns the horizontal scroll bar that controls the viewport's horizontal view position. |
int |
getHorizontalScrollBarPolicy()
Returns the horizontal scroll bar policy value. |
IlpTreeModel |
getModel()
Returns the current model. |
IlpProject |
getProject()
Returns the component project configuration. |
JScrollPane |
getScrollView()
Returns the scrollable view of this component. |
IlpObject |
getSelectedObject()
Returns the first selected IlpObject
from the collection of selected objects. |
Collection |
getSelectedObjects()
Returns the set of selected IlpObjects. |
TreeSelectionModel |
getSelectionModel()
Retrieves the current selection model from the component. |
Comparator |
getSortComparator()
Retrieves the comparator used to sort the nodes. |
IlpStyle |
getStyle()
Deprecated. The Style API has been replaced by the Cascading Style Sheet mechanism. |
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 cascaded style sheets. |
String |
getStyleSheets(int index)
Returns one of the cascading style sheets. |
JScrollBar |
getVerticalScrollBar()
Returns the vertical scroll bar that controls the viewport's horizontal view position. |
int |
getVerticalScrollBarPolicy()
Returns the vertical scroll bar policy value. |
IlpTreeView |
getView()
Returns the current view. |
IlpViewInteractor |
getViewInteractor()
Retrieves the current view interactor from the controller. |
boolean |
isObjectSelected(IlpObject object)
Returns true if the given IlpObject
is selected, false otherwise. |
void |
refilter()
Reapplies the current filter to the adapter objects. |
void |
removePseudoClass(IlpObject bo,
String pseudo)
Removes a pseudoclass from the specified business object. |
void |
removeSelectionObject(IlpObject object)
Removes the given IlpObject from the selection. |
void |
setAdapter(IlpAbstractTreeAdapter adapter)
Sets a new data source adapter. |
void |
setCellRenderer(TreeCellRenderer renderer)
Sets a new tree cell renderer on the view. |
void |
setController(IlpTreeController controller)
Sets the controller. |
void |
setDataSource(IlpDataSource dataSource)
Sets a new data source. |
void |
setDefaultViewInteractor(IlpViewInteractor interactor)
Sets the default view interactor. |
void |
setEnabled(boolean enabled)
Sets whether or not this component is enabled. |
void |
setFilter(IlpFilter filter)
Sets the filter. |
void |
setHorizontalScrollBarPolicy(int policy)
Determines when the horizontal scrollbar appears. |
void |
setModel(IlpTreeModel model)
Sets the model. |
void |
setProject(IlpProject proj)
Sets the project configuration, containing data source information and style sheets. |
void |
setProject(URL projectURL)
Sets a Tree component project configuration. |
void |
setSelectedObject(IlpObject object)
Sets the selected IlpObject. |
void |
setSelectedObjects(Collection objects)
Sets the set of selected IlpObjects. |
void |
setSelectionLookAndFeel(int selectionLookAndFeel)
Sets the way the selection is rendered to/manipulated by the end-user. |
void |
setSelectionModel(TreeSelectionModel selectionModel)
Sets a new selection model on the component. |
void |
setSortComparator(Comparator comparator)
Sets the comparator used to sort the nodes. |
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. |
void |
setVerticalScrollBarPolicy(int policy)
Determines when the vertical scrollbar appears. |
void |
setView(IlpTreeView view)
Sets the view, which gets connected to the model and controller. |
void |
setViewInteractor(IlpViewInteractor interactor)
Sets the interactor associated with the view. |
void |
sort()
Sorts the model according to the current sort comparator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ilog.views.util.styling.IlvStylable |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public IlpTree()
IlpTree component in the default context.
A default model, view and controller will be created and used.
IlpSystem.GetDefaultContext()
public IlpTree(IlpContext context,
IlpTreeModel model,
IlpTreeView view,
IlpTreeController controller)
context - The context used by the tree.model - The model to be used; if null,
createDefaultModel() is called.view - The view to be used; if null,
createDefaultView() is called.controller - The controller to be used; if null,
createDefaultController() is called.
public IlpTree(IlpTreeModel model,
IlpTreeView view,
IlpTreeController controller)
model - The model to be used; if null,
createDefaultModel() is called.view - The view to be used; if null,
createDefaultView() is called.controller - The controller to be used; if null,
createDefaultController() is called.
The Tree component is initialized using the default context.
IlpSystem.GetDefaultContext()public IlpTree(IlpContext context)
| Method Detail |
|---|
public void dispose()
Note: After calling this function, this tree is no longer functional.
public IlpContext getContext()
getContext in interface IlpGraphicComponentpublic IlpTreeView getView()
public void setView(IlpTreeView view)
view - The new view. When this parameter is null, a default view is
created using createDefaultView().public IlpTreeModel getModel()
public void setModel(IlpTreeModel model)
model - The new model. If this parameter is null, a default model is
created using <createDefaultModel().public IlpTreeController getController()
public void setController(IlpTreeController controller)
controller - The new controller. If this parameter is null, a
default controller is created using createDefaultController().public IlpGraphicViewStyleManager getStyleManager()
setStyleSheets
or getStyleSheets instead.
public IlpStyle getStyle()
null if the tree view has no graphic view
style manager. (This should not occur.)
public IlpObject getSelectedObject()
IlpObject
from the collection of selected objects.
Returns null if there is no selected object.
getSelectedObject in interface IlpObjectSelectionModelpublic Collection getSelectedObjects()
IlpObjects.
Returns an empty set if there is no selected object.
getSelectedObjects in interface IlpObjectSelectionModelIlpObjects.public boolean isObjectSelected(IlpObject object)
true if the given IlpObject
is selected, false otherwise.
isObjectSelected in interface IlpObjectSelectionModelobject - The object which may be selected.public void addSelectionObject(IlpObject object)
IlpObject to the selection.
This has no effect if the given object is null.
addSelectionObject in interface IlpObjectSelectionModelobject - The object that will be added to the selection.public void removeSelectionObject(IlpObject object)
IlpObject from the selection.
This has no effect if the given object is null.
removeSelectionObject in interface IlpObjectSelectionModelobject - The object that will be removed from the selection.public void setSelectedObject(IlpObject object)
IlpObject.
This has no effect if the given object is already selected.
setSelectedObject in interface IlpObjectSelectionModelobject - The object that will become the selection.public void setSelectedObjects(Collection objects)
IlpObjects.
setSelectedObjects in interface IlpObjectSelectionModelobjects - The collection of objects that will become the selection.public void clearSelection()
clearSelection in interface IlpObjectSelectionModelpublic void setSelectionModel(TreeSelectionModel selectionModel)
selectionModel - The new selection model.pub