public class FlexAdvancedDataGrid extends FlexListBase
除可显示多列数据外,AdvancedDataGrid 控件与 List 控件无差异,所以它适合显示具有多种属性的对象。
Modifier | Constructor and Description |
---|---|
protected |
FlexAdvancedDataGrid(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 FlexAdvancedDataGrid。
|
Modifier and Type | Method and Description |
---|---|
void |
close(String itemRenderer)
关闭或折叠 AdvancedDataGrid 分支。
|
void |
close(String itemRenderer,
FlexTriggerEvent triggerEvent)
关闭或折叠 AdvancedDataGrid 分支。
|
void |
columnGroupedADGHeaderShift(int movingColumnIndex,
int newColumnIndex,
int oldColumnIndex)
用户将列拖至新位置后松开列标题上的鼠标按钮时发送,此时将转换列为新索引。
|
void |
columnGroupedADGHeaderShift(int movingColumnIndex,
int newColumnIndex,
int oldColumnIndex,
FlexTriggerEvent triggerEvent)
用户将列拖至新位置后松开列标题上的鼠标按钮时发送,此时将转换列为新索引。
|
void |
columnStretch(int columnIndex,
double localX)
用户更改列宽时发送,表示此列中显示的数据数量可能已更改。
|
String |
getCellData(int rowIndex,
int columnIndex)
返回网格中单元格的数据。
|
String |
getCellData(int rowIndex,
int columnIndex,
boolean restoreOriginalPosition)
返回网格中单元格的数据。
|
List<Color> |
getDepthColors()
获取 用于 AdvancedDataGrid 控件导航树每个层级下的行的颜色数组,以降序排列。
|
List<Color> |
getDisabledColor()
获取 如果已禁用,则为组件中的文本颜色。
|
int |
getGroupedItemChildrenCount(int rowIndex)
返回组中第一个项目的子级数量。
|
int |
getGroupedItemChildrenCount(int rowIndex,
boolean restoreOriginalPosition)
返回组中第一个项目的子级数量。
|
List<Color> |
getHeaderColors()
获取 用于绘制标题背景渐变的两种颜色的数组。
|
double |
getHeaderHeight()
获取 列的标题单元格的高度(像素)。
|
Color |
getHorizontalGridLineColor()
获取 水平网格线的颜色。
|
int |
getIndentation()
获取 导航树每个节点的缩进(像素)。
|
double |
getMinColumnWidth()
获取 最小列宽(像素)。
|
int |
getOpenDuration()
获取 导航树的打开或关闭转换的长度(毫秒)。
|
int |
getPaddingBottom()
获取 行底部与行中呈现器底部之间的像素数量。
|
int |
getPaddingLeft()
获取 控件左边框与其内容区域左边框之间的像素数量。
|
int |
getPaddingRight()
获取 控件右边框与其内容区域右边框之间的像素数量。
|
int |
getPaddingTop()
获取 行顶部与行中呈现器顶部之间的像素数量。
|
String |
getRowData(int rowIndex)
返回数据提供程序中项目的行数据。
|
String |
getRowData(int rowIndex,
boolean restoreOriginalPosition)
返回数据提供程序中项目的行数据。
|
String |
getSelectedCells()
获取 作为行和列索引的单元格位置的数组。
|
String |
getSelectionMode()
获取 控件的选择模式。
|
Color |
getVerticalGridLineColor()
获取 垂直网格线的颜色。
|
void |
headerClick(int columnIndex)
用户松开列标题上的鼠标按钮时发送,以请求控件基于列的内容对网格内容进行排序。
|
void |
headerClick(int columnIndex,
String dataField)
用户松开列标题上的鼠标按钮时发送,以请求控件基于列的内容对网格内容进行排序。
|
void |
headerClick(int columnIndex,
String dataField,
ModifierKey keyModifier)
用户松开列标题上的鼠标按钮时发送,以请求控件基于列的内容对网格内容进行排序。
|
void |
headerShift(int newIndex,
int oldIndex)
用户将列拖至新位置后松开列标题上的鼠标按钮时发送,此时将转换列为新索引。
|
void |
headerShift(int newIndex,
int oldIndex,
FlexTriggerEvent triggerEvent)
用户将列拖至新位置后松开列标题上的鼠标按钮时发送,此时将转换列为新索引。
|
boolean |
isAllowDragSelection()
获取 拖动选择是否已启用。
|
boolean |
isDisplayItemsExpanded()
获取 是否展开导航树以显示所有项目。
|
boolean |
isEditable()
获取 用户是否可以编辑数据提供程序中的项目。
|
boolean |
isGroupedItem(int rowIndex)
返回指定了项目是否为组的成员的值。
|
boolean |
isGroupedItem(int rowIndex,
boolean restoreOriginalPosition)
返回指定了项目是否为组的成员的值。
|
boolean |
isResizableColumns()
获取 用户是否可以更改列的大小。
|
void |
open(String itemRenderer)
打开或展开 AdvancedDataGrid 分支。
|
void |
open(String itemRenderer,
FlexTriggerEvent triggerEvent)
打开或展开 AdvancedDataGrid 分支。
|
deselect, deselect, deselect, doubleSelect, dragCancel, dragCancel, dragDrop, dragDrop, dragDrop, dragStart, dragStart, getAlternatingItemColors, getBackgroundDisabledColor, getColumnCount, getColumnNames, getColumnWidth, getDataTipField, getFirstVisibleRow, getFocusAlpha, getIconField, getLabelField, getLastVisibleRow, getLockedColumnCount, getLockedRowCount, getNumColumns, getNumRows, getRollOverColor, getRowCount, getRowHeight, getSelectedIndex, getSelectedIndices, getSelectedItem, getSelectedItems, getSelectionColor, getSelectionDisabledColor, getTextRollOverColor, getTextSelectedColor, getValues, getVerticalAlign, isAllowMultipleSelection, isSelectable, isShowDataTips, isUseRollOver, isVariableRowHeight, isWordWrap, multiSelect, multiSelect, multiSelect, scroll, scrollToIndex, select, select, select, selectIndex, selectIndex, selectIndex, type, type
mouseScroll, mouseScroll
changeFocus, changeFocus, changeFocus, getAutomationClassName, getAutomationIndex, getAutomationName, getClassName, getCurrentState, getErrorColor, getErrorString, getId, getNumAutomationChildren, getPercentHeight, getPercentWidth, getScaleX, getScaleY, getThemeColor, getToolTip, isEnabled, isFocusEnabled, isUseHandCursor, move, move, move, setFocus
click, click, click, click, doubleClick, doubleClick, doubleClick, doubleClick, getAlpha, getHeight, getStyle, getTabIndex, getWidth, getX, getY, isMouseEnabled, isTabChildren, isTabEnabled, isVisible, mouseMove, mouseMove, nativeToString, pressKeys, pressKeys, pressMouse, pressMouse, pressMouse, pressMouse, releaseKeys, releaseKeys, releaseMouse, releaseMouse, releaseMouse, releaseMouse, typeKeys, typeKeys, typeKeys, typePasswordKeys, typePasswordKeys, typePasswordKeys
captureBitmap, captureBitmap, exists, exists, generateLocator, getChildren, getDynamicMethodList, getParent, getPropertyList, getRect, getRect, getText, getValue, highlightObject, highlightObject, highlightObject, invokeMethods, textCapture, textCapture, textClick, textClick, textClick, textClick, textClick, textClick, textExists, textExists, textExists, textExists, textExists, textRectangle, textRectangle, textRectangle, textRectangle, textRectangle, waitForChildDisappearance, waitForChildDisappearance, waitForDisappearance, waitForDisappearance, waitForObject, waitForObject, waitForProperty, waitForProperty
equals, exists, find, find, findAll, findAll, getCustomTypeName, getDesktop, getHandle, getLocator, getProperty, getTypeName, hashCode, imageClick, imageClick, imageClick, imageClick, imageClick, imageClick, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageClickFile, imageExists, imageExists, imageExists, imageExistsFile, imageExistsFile, imageExistsFile, imageRectangle, imageRectangle, imageRectangle, imageRectangleFile, imageRectangleFile, imageRectangleFile, invoke, preventFinalLocator, setProperty, toString
protected FlexAdvancedDataGrid(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 FlexAdvancedDataGrid 的句柄desktop
- 此对象所在的桌面public void close(String itemRenderer)
itemRenderer
- 关闭的节点的 ListItemRendererpublic void close(String itemRenderer, FlexTriggerEvent triggerEvent)
itemRenderer
- 关闭的节点的 ListItemRenderertriggerEvent
- 如果节点为响应用户操作而关闭,则将其识别为键盘操作或鼠标操作public void columnGroupedADGHeaderShift(int movingColumnIndex, int newColumnIndex, int oldColumnIndex)
movingColumnIndex
- 可选择的项目的数据提供程序索引newColumnIndex
- 更改后的零基索引oldColumnIndex
- 更改前的零基索引public void columnGroupedADGHeaderShift(int movingColumnIndex, int newColumnIndex, int oldColumnIndex, FlexTriggerEvent triggerEvent)
movingColumnIndex
- 可选择的项目的数据提供程序索引newColumnIndex
- 更改后的零基索引oldColumnIndex
- 更改前的零基索引triggerEvent
- 触发了选择操作的事件,例如鼠标或键盘事件public void columnStretch(int columnIndex, double localX)
columnIndex
- DataGrid 对象的列数组中项目列的零基索引localX
- 鼠标的 x 位置public String getCellData(int rowIndex, int columnIndex)
rowIndex
- 返回指定行的零基索引columnIndex
- 返回指定列的零基索引public String getCellData(int rowIndex, int columnIndex, boolean restoreOriginalPosition)
rowIndex
- 返回指定行的零基索引columnIndex
- 返回指定列的零基索引restoreOriginalPosition
- 返回网格中的单元格至其之前位置public int getGroupedItemChildrenCount(int rowIndex)
rowIndex
- 返回指定行的零基索引public int getGroupedItemChildrenCount(int rowIndex, boolean restoreOriginalPosition)
rowIndex
- 返回指定行的零基索引restoreOriginalPosition
- 返回组中第一个项目的子级至其之前位置public String getRowData(int rowIndex)
rowIndex
- 返回数据提供程序中项目的零基索引public String getRowData(int rowIndex, boolean restoreOriginalPosition)
rowIndex
- 返回数据提供程序中项目的零基索引restoreOriginalPosition
- 返回网格中的行至其之前位置public void headerClick(int columnIndex)
columnIndex
- DataGrid 对象的列数组中项目列的零基索引public void headerClick(int columnIndex, String dataField)
columnIndex
- DataGrid 对象的列数组中项目列的零基索引dataField
- 列关联数据中的属性或字段的名称public void headerClick(int columnIndex, String dataField, ModifierKey keyModifier)
columnIndex
- DataGrid 对象的列数组中项目列的零基索引dataField
- 列关联数据中的属性或字段的名称keyModifier
- 可使用的键修饰符(例如 Ctrl 键)public void headerShift(int newIndex, int oldIndex)
newIndex
- 更改后标题的零基索引oldIndex
- 更改前标题的零基索引public void headerShift(int newIndex, int oldIndex, FlexTriggerEvent triggerEvent)
newIndex
- 更改后标题的零基索引oldIndex
- 更改前标题的零基索引triggerEvent
- 触发此事件的事件public boolean isGroupedItem(int rowIndex)
rowIndex
- 所选项目的行索引public boolean isGroupedItem(int rowIndex, boolean restoreOriginalPosition)
rowIndex
- 所选项目的行索引restoreOriginalPosition
- 返回组的项目至其之前位置public void open(String itemRenderer)
itemRenderer
- 打开的项目(节点)的 ListItemRendererpublic void open(String itemRenderer, FlexTriggerEvent triggerEvent)
itemRenderer
- 打开的项目(节点)的 ListItemRenderertriggerEvent
- 如果项目(节点)为响应用户操作而打开,则将其识别为键盘操作或鼠标操作public boolean isAllowDragSelection()
在 ComboBox 下拉菜单中,此功能用于支持当鼠标在下拉按钮上方时按鼠标按钮,然后拖动鼠标至下拉菜单以选择项目。
默认值为 False。
public List<Color> getDepthColors()
public boolean isDisplayItemsExpanded()
如果为 True,则展开导航树以显示所有项目。如果添加了新分支,则显示已展开。默认值为 False。
public boolean isEditable()
如果为 true,则控件中的项目呈现器可编辑。用户可单击项目呈现器以打开编辑器。
您可使用 DataGridColumn.editable 属性或通过处理 itemEditBeginning 和 itemEditBegin 事件关闭对 DataGrid 控件各列的编辑
默认值为 false。
public double getHeaderHeight()
public Color getHorizontalGridLineColor()
public int getIndentation()
public double getMinColumnWidth()
public int getOpenDuration()
public int getPaddingBottom()
public int getPaddingLeft()
public int getPaddingRight()
public int getPaddingTop()
public boolean isResizableColumns()
如果为 true,则用户可通过拖动标题单元格之间的网格线来拉伸或缩小 DataGrid 控件的列。如果为 false,各列的可调整大小属性也须设为 false,以防止用户调整特定列的大小。默认值为 true。
public String getSelectedCells()
更改 selectionMode 属性的值会设置此属性为 null。
public String getSelectionMode()
可能值为:MULTIPLE_CELLS、MULTIPLE_ROWS、NONE、SINGLE_CELL 和 SINGLE_ROW。更改此属性的值会设置 selectedCells 属性为 null。
您必须设置 allowMultipleSelection 属性为 True 以同时选择控件中的多个项目。
有关所选单元格的信息将写入 selectedCells 属性。
默认值为 SINGLE_ROW。
public Color getVerticalGridLineColor()
Copyright 2009-2012 Micro Focus. All Rights Reserved.