|
||||||||||
| 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.IlpTable
public class IlpTable
The table component that serves as an aggregation of MVC components for a table.
It does not have independent functionality, but it is convenient to use. It creates and connects all MVC components needed to display a table.
By default the table component creates an instance of
IlpDefaultListModel to fill an
IlpTableListModel object that is used as the table
model for the table view.
The table component can be customized using cascading style sheets. The
CSS must be loaded in the component through the method
setStyleSheets(java.lang.String[]).
| 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 | |
|---|---|
IlpTable()
Table Component constructor. |
|
IlpTable(IlpContext context)
Table Component constructor. |
|
IlpTable(IlpContext context,
IlpTableModel model,
IlpTableView view,
IlpTableController controller)
Table Component constructor. |
|
| Method Summary | |
|---|---|
void |
addAttribute(IlpAttribute attribute)
Adds a custom attribute to the table view as a new column. |
void |
addPseudoClass(IlpObject bo,
IlpAttribute a,
String pseudo)
Adds a pseudoclass to the specified business object and attribute. |
void |
addSelectionObject(IlpObject object)
Adds the given IlpObject to the selection. |
void |
clearSelection()
Clears the selection. |
protected IlpTableController |
createDefaultController()
Returns the default controller, which is an IlpTableController
object. |
protected IlpTableModel |
createDefaultModel()
Returns the default model object, which is an instance of IlpTableListModel. |
protected IlpTableView |
createDefaultView()
Returns the default view, which is an instance of IlpTableView. |
void |
dispose()
Cleans up the table, disconnects the component from the data source and drops references to objects to help 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. |
IlpClass |
getAcceptedClass()
Returns the class of object the component accepts from the data source. |
String |
getAcceptedClassName()
Returns the name of the class of object the component accepts from the data source. |
IlpListAdapter |
getAdapter()
Returns the adapter connected to the table model or creates a new one. |
IlpTableResizeMode |
getAutoResizeMode()
Retrieves the autoresize mode of the table view. |
IlpAttribute |
getColumn(int columnIndex)
Returns the IlpAttribute corresponding to the
specified column index in the given table. |
IlpAttribute |
getColumn(String attributeName)
Returns the attribute whose name is attributeName or
null if this attribute is not managed by the table model. |
int |
getColumnIndex(IlpAttribute attribute)
Returns the column index of the specified attribute. |
IlpContext |
getContext()
Returns the IlpContext used by this component. |
IlpTableController |
getController()
Returns the controller associated with the Table component. |
IlpDataSource |
getDataSource()
Retrieves the current data source. |
IlpTableCellRenderer |
getDefaultRenderer()
Retrieves the renderer used for the cells. |
IlpViewInteractor |
getDefaultViewInteractor()
Returns the default view interactor. |
IlpFilter |
getFilter()
Returns the filter used to filter business objects. |
int |
getFixedColumnCount()
Retrieves the number of fixed columns in the table. |
IlpDefaultTableHeaderInteractor |
getHeaderInteractor()
Returns the interactor used to manage events that occur in the table header. |
IlpTableHeaderRenderer |
getHeaderRenderer()
Retrieves the renderer used for the header. |
JScrollBar |
getHorizontalScrollBar()
Returns the horizontal scroll bar that controls the viewport's horizontal view position. |
IlpDefaultListModel |
getListModel()
Returns the IlpDefaultListModel object which should be used to fill
the table model with representation objects. |
IlpTableModel |
getModel()
Returns the model associated with the Table component. |
IlpProject |
getProject()
Returns the component project configuration. |
IlpObject |
getRow(int rowIndex)
Returns the IlpObject corresponding to the specified
row index in the given table. |
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. |
IlpTableSelectionMode |
getSelectionMode()
Returns the selection mode of the table view. |
IlpTableSelectionModel |
getSelectionModel()
Returns the selection model used by the table view to handle the selection. |
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(java.lang.String[])
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. |
TableColumn |
getTableColumn(IlpAttribute attribute)
Returns the TableColumn used to display the given attribute. |
JScrollBar |
getVerticalScrollBar()
Returns the vertical scroll bar that controls the viewport's horizontal view position. |
IlpTableView |
getView()
Returns the view associated with the Table component. |
IlpViewInteractor |
getViewInteractor()
Retrieves the current view interactor from the controller. |
boolean |
isColumnFixed(IlpAttribute attribute)
Specifies whether the specified column is fixed. |
boolean |
isColumnVisible(IlpAttribute attribute)
Specifies whether the specified column is visible. |
boolean |
isObjectSelected(IlpObject object)
Returns true if the given IlpObject
is selected. |
boolean |
isReorderingAllowed()
Returns true if the user can rearrange column order by
dragging their headers. |
void |
refilter()
Reapplies the current filter to the adapter objects. |
void |
removeAttribute(IlpAttribute attribute)
Removes a custom attribute from the table view. |
void |
removePseudoClass(IlpObject bo,
IlpAttribute a,
String pseudo)
Removes a pseudoclass from the specified business object and attribute. |
void |
removeSelectionObject(IlpObject object)
Removes the given IlpObject from the selection. |
IlpCellCoordinates |
searchValue(String value,
IlpCellCoordinates startingCell,
boolean scanRowByRow,
boolean caseMatching)
Searches for the specified string in the values displayed by the table. |
void |
selectAll()
Selects all the cells visible in the table view. |
void |
setAcceptedClass(IlpClass acceptedClass)
Sets the class of object the component will accept from the data source. |
void |
setAcceptedClassName(String name)
Sets the class of object the component will accept from the data source. |
void |
setAdapter(IlpListAdapter adpt)
Sets a new data source adapter. |
void |
setAutoResizeMode(IlpTableResizeMode mode)
Sets the autoresize mode of the Table View. |
void |
setColumnIndex(IlpAttribute attribute,
int index)
Moves the column of the specified attribute to the specified index. |
void |
setColumnVisible(IlpAttribute attribute,
boolean visible)
Sets whether the specified column should be visible. |
void |
setController(IlpTableController controller)
Sets the controller associated with the Table component. |
void |
setDataSource(IlpDataSource dataSource)
Sets the data source that will be connected to the table model by means of an IlpListAdapter object. |
void |
setDataSource(IlpDataSource dataSource,
IlpClass acceptedClass)
Sets the data source that will be connected to the table model by means of an IlpListAdapter object. |
void |
setDefaultRenderer(IlpTableCellRenderer defaultRenderer)
Sets the renderer used for the cells. |
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 |
setFixedColumnCount(int nbColsToFix)
Sets the number of fixed columns in the table. |
void |
setHeaderInteractor(IlpDefaultTableHeaderInteractor headerInteractor)
Sets the interactor used to manage events that occur in the table header. |
void |
setHeaderRenderer(IlpTableHeaderRenderer headerRenderer)
Sets the header renderer used by the table. |
void |
setModel(IlpTableModel model)
Sets the model to use with the Table component and connects it to the current table view (if not null). |
void |
setProject(IlpProject proj)
Sets the project configuration, containing data source information and style sheets. |
void |
setProject(URL projectURL)
Sets a Table component project configuration. |
void |
setReorderingAllowed(boolean reorderingAllowed)
Specifies whether the user can reorder columns in the table by dragging their headers. |
void |
setSelectedObject(IlpObject object)
Sets the selected IlpObject. |
void |
setSelectedObjects(Collection objects)
Sets the set of selected IlpObjects. |
void |
setSelectionMode(IlpTableSelectionMode selectionMode)
Sets the selection mode of the table view. |
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 |
setView(IlpTableView view)
Sets the view associated with the Table component and connects it to the current table model (if not null). |
void |
setViewInteractor(IlpViewInteractor interactor)
Sets the interactor associated with the view. |
| 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 IlpTable()
Creates a Table component with default MVC components which are instances of:
Creates also an IlpDefaultListModel object which should be used
to fill the table model in the default case.
The Table component is initialized using the default context.
IlpSystem.GetDefaultContext()public IlpTable(IlpContext context)
Creates a Table component with default MVC components, which are instances of:
Creates also an IlpDefaultListModel object, which should be used
to fill the table model in the default case.
context - The context used by the table.IlpSystem.GetDefaultContext()
public IlpTable(IlpContext context,
IlpTableModel model,
IlpTableView view,
IlpTableController controller)
Creates a Table component with given MVC components.
context - The context used by the table.
If null, the default context is used.model - The model to be used; if
null, an IlpTableListModel is created.view - The view to be used; if null, an
IlpTableView is created.controller - The controller to be used; if
null, an