|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.JPanel | +--com.sssw.rt.atlas.AtPanel | +--com.sssw.rt.tview.TView | +--com.sssw.rt.form.AgcView
The base class for the Tree Control and SilverStream Java views.
Inner classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Inner classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Fields inherited from class com.sssw.rt.atlas.AtPanel |
BGIMAGE_DRAW_CENTERED,
BGIMAGE_DRAW_NORMAL,
BGIMAGE_DRAW_STRETCH,
BGIMAGE_DRAW_TILED |
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 com.sssw.rt.form.AgiControl |
IMAGE_MODE_CENTERED,
IMAGE_MODE_NORMAL,
IMAGE_MODE_STRETCH,
IMAGE_MODE_TILED |
Constructor Summary | |
AgcView()
AgcView constructor. |
Method Summary | |
void |
clearSelection()
Clears the current selection set. |
void |
collapseNode(AgiRowCursor dc)
Collapse (hides the children of) a specified node. |
void |
expandNode(AgiRowCursor dc)
Expands (shows the children of) a specified node. |
Object |
getColumnValue(String name)
Gets a property from a parent of the row pointed to by the current row cursor. |
String |
getCursorBandName(AgiRowCursor dc)
Returns the name of the band for the row represented by this row cursor |
int |
getMultiSelectType()
Returns the currrent multiselect type. |
AgiRowCursor |
getRootRowCursor()
Gets a data object representing the data in the view. |
AgoRowEnumerator |
getRowSelection()
Gets an enumeration object (AgoRowEnumerator) which encapsulates all the currently selected rows in the view. |
int |
getSelectedColumnIndex()
Returns the index (zero-based) of the column containing the caret. |
AgiRowCursor |
getSelectedRowCursor()
Returns a navigation object (AgiRowCursor) associated with this view. |
AgiRowCursor |
getTopRowCursor()
Gets a navigation object which initially points to the topmost visible row in the view. |
void |
initView(AgiRowCursor rowCursor,
AgoViewFormat viewFormat)
Associates the AgcView object with a navigation object (AgiRowCursor) which will provide the data for the view, and a format object (AgoViewFormat) which describes how the data is to be presented. |
void |
setMultiSelectType(int type)
Enables or disables the ability to select multiple rows simultaneously. |
void |
setSelection(AgiRowCursor dc)
Sets the currently selected row in the view to be the current row in the supplied AgiRowCursor object. |
void |
sort(int column,
boolean descending)
Sorts the view by the specified column. |
void |
sort(String bandname,
int[] cols,
boolean[] desc)
Sorts the view. |
Methods inherited from class com.sssw.rt.tview.TView |
getAgoViewFormat,
getSearchable,
reload,
scrollHome,
setAgoViewFormat,
setSearchable |
Methods inherited from class com.sssw.rt.atlas.AtPanel |
addImpl,
addNotify,
clientPaint,
clientPaint,
deliverMouseEvent,
deliverMouseMoveEvent,
doAtCommand,
drawTiledImage,
enableAtCommands,
getBackgroundImage,
getBackgroundImageMode,
getHelper,
getTransparent,
hide,
hideToolTip,
imageUpdate,
isFocusTraversable,
isOptimizedDrawingEnabled,
ownedImage,
paintBorder,
paintComponent,
paintImmediately,
paintImmediately,
paintNow,
preprocessKeyEvent,
processEvent,
reshape,
setBackgroundImage,
setBackgroundImageMode,
setTransparent,
show,
showToolTip |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext,
getUIClassID,
paramString,
updateUI |
Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
countComponents,
deliverEvent,
doLayout,
findComponentAt,
findComponentAt,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents,
getLayout,
insets,
invalidate,
isAncestorOf,
layout,
list,
list,
locate,
minimumSize,
paintComponents,
preferredSize,
printComponents,
processContainerEvent,
remove,
remove,
removeAll,
removeContainerListener,
setCursor,
setLayout,
validate,
validateTree |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Methods implemented from interface com.sssw.rt.form.AgiControl |
getComponent,
getHelpInfo,
setHelpInfo |
Constructor Detail |
public AgcView()
Method Detail |
public void initView(AgiRowCursor rowCursor, AgoViewFormat viewFormat)
rowCursor
- the navigation object, which must implement the AgiRowCursor interface,
which will provide the data for the view. This may be, for example, an AgcData object, or
a user-written class.viewFormat
- the format object which describes how the view is displayedagcView.initView(myAgcData, viewFmt);
AgiRowCursor
,
AgoViewFormat
public AgiRowCursor getRootRowCursor()
gotoChild()
on the row cursor that this call returns.AgiRowCursor
public AgiRowCursor getSelectedRowCursor()
If there is no currently selected row (this is possible only in a view which supports multi-selection), this method returns null. If an AgiRowCursor is returned, it points to the currently selected row.
AgiRowCursor selectedRow; selectedRow = agcView.getSelectedRowCursor(); if (selectedRow != null) { // do something interesting }
AgiRowCursor
public AgiRowCursor getTopRowCursor()
AgiRowCursor topRow; topRow = agcView.getTopRowCursor();
AgiRowCursor
public AgoRowEnumerator getRowSelection()
AgoRowEnumerator enum = agcView.getRowSelection();
public void setSelection(AgiRowCursor dc)
dc
- an AgiRowCursorThe AgiRowCursor object must have been obtained by calling the getSelectedRowCursor() method on the object. The setSelection() method fires the valueChanged event and sets the event's info argument to AgoValueChangedInfo.SOURCE_PROG
This is an example showing how to select the row following the currently selected row:
AgiRowCursor cursor = agcView.getSelectedRowCursor(); if (cursor != null && cursor.gotoNext()) agcView.setSelection(cursor); // this now pointing to the following row
AgcView.clearSelection()
,
AgiRowCursor
public String getCursorBandName(AgiRowCursor dc)
dc
- an AgiRowCursor which will be used to find the corresopnding band nameAgiRowCursor
public void expandNode(AgiRowCursor dc)
dc
- an AgiRowCursor which specifies the node to expandAgiRowCursor cursor = agcView.getSelectedRowCursor(); agcView.expandNode(cursor);
AgcView.collapseNode(AgiRowCursor)
,
AgiRowCursor
public void collapseNode(AgiRowCursor dc) throws AgoException
dc
- an AgiRowCursor which specifies the node to collapseAgiRowCursor cursor = agcView.getSelectedRowCursor(); try { agcView.collapseNode(cursor); } catch (AgoApiException e) { agDialog.displayError(e); }
AgcView.expandNode(AgiRowCursor)
,
AgiRowCursor
,
AgoApiException
public int getSelectedColumnIndex()
The caret is the cursor (normally a rectangular outline) used to show the row or column on which the user has most recently clicked. This method applies only to views whose columns are marked as selectable or editable. If there isn't a column containing the caret, for any reason, the return value is -1.
int columnIndex; columnIndex = agcView.getSelectedColumnIndex();
public Object getColumnValue(String name)
bandName.propertyName
. The function will
start with the current row and progress to successive parents
until it finds one whose band name matches the first part of the supplied name.
It then extracts the property that matches the second part of the supplied name
from the row it has found. The band name may be the name of the band for the current
row or any of its parents. If the specified band is not found, the function will
return null.name
- a String in the form bandName.propertyName
public void clearSelection()
The selection set is the set of rows currently selected. In multi-select mode, there may be a number of rows selected simultaneously. This method unselects all the selected rows. After this method has been called, no row is selected.
agcView.clearSelection();
AgcView.setSelection(AgiRowCursor)
public void setMultiSelectType(int type)
So for multiselect, set it to ROW_SELECT. For multiselect with no expandable select set it to TView.ROW_SELECT + TView.NO_EXPANDABLE_SELECT.
This example shows how to enable multiple selection:
agcView.setMultiSelectType(1);
This example shows how to disable multiple selection:
agcView.setMultiSelectType(0);
The final example illustrates how to disallow multiple selection of expandable rows (i.e. those which have children), while still allowing multiple selection of rows which have no children:
agcView.setMultiSelectType(5);
AgcView.getMultiSelectType()
,
AgcView.clearSelection()
,
AgcView.setSelection(AgiRowCursor)
public int getMultiSelectType()
int multiselType = agcView.getMultiSelectType();
AgcView.setMultiSelectType(int)
,
AgcView.clearSelection()
,
AgcView.setSelection(AgiRowCursor)
public void sort(int column, boolean descending) throws AgoSecurityException, AgoTransientSystemException, AgoUnrecoverableSystemException
column
- The (0-based) index of the column to sort by.descending
- True if the column should be sorted in descending
order.This method sorts the view at the application level. Use the alternative sort() method in this class to specify that sorting be done in the view's underlying data source.
// this sorts the view in ascending order on the third column agcView.sort(2, false);
public void sort(String bandname, int[] cols, boolean[] desc) throws AgoSecurityException, AgoTransientSystemException, AgoUnrecoverableSystemException
bandname
- The band to sort. If null, sorts the top levelcols
- The indices of the columns to sort (in the band). The
rows are first sorted by cols[0], then subsorted by cols[1], etc.desc
- Descending flags for each columnThis method actually sorts the underlying data source. Use the alternative sort() method in this class to sort the view at the application level by a specified column.
// this sorts the underlying data source in ascending order on the third column // and within that, in descending order on the fourth column, in the band named // 'customer_data' int colnums[] = {2, 3}; boolean direction[] = {false, true}; agcView.sort("customer_data", colnums, direction);
|
SilverStream Application Server 3.5 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |