public class FlexDataGrid extends FlexListBase
Modifier | Constructor and Description |
---|---|
protected |
FlexDataGrid(JtfObjectHandle handle,
Desktop desktop)
使用 JtfObjectHandle 创建新 FlexDataGrid。
|
Modifier and Type | Method and Description |
---|---|
void |
columnStretch(int columnIndex,
double localX)
用户更改列宽时发送,表示此列中显示的数据数量可能已更改。
|
void |
edit(String itemRenderer,
int rowIndex,
int columnIndex)
定义 itemEditBegin 事件的事件对象的类型属性值,表示已经准备好编辑项目。
|
List<Color> |
getHeaderColors()
获取 用于绘制标题背景渐变的两种颜色的数组。
|
String |
getHeaderStyleName()
获取 用于控制列标题外观其他方面的 CSS 样式声明的名称。
|
Color |
getHorizontalGridLineColor()
获取 水平网格线的颜色。
|
double |
getMinColumnWidth()
获取 最小列宽(像素)。
|
Color |
getVerticalGridLineColor()
获取 垂直网格线的颜色。
|
void |
headerClick(int columnIndex)
用户松开列标题上的鼠标按钮时发送,以请求控件基于列的内容对网格内容进行排序。
|
void |
headerShift(int newIndex,
int oldIndex)
用户将列拖至新位置后松开列标题上的鼠标按钮时发送,此时将转换列为新索引。
|
void |
headerShift(int newIndex,
int oldIndex,
FlexTriggerEvent triggerEvent)
用户将列拖至新位置后松开列标题上的鼠标按钮时发送,此时将转换列为新索引。
|
boolean |
isEditable()
获取 用户是否可以编辑数据提供程序中的项目。
|
boolean |
isHorizontalGridLines()
获取 是否显示行之间的水平网格线。
|
boolean |
isResizableColumns()
获取 用户是否可以更改列的大小。
|
boolean |
isSortableColumns()
获取 用户是否可通过单击列标题单元格对数据提供程序项目进行排序。
|
boolean |
isVerticalGridLines()
获取 是否显示列之间的垂直网格线。
|
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 FlexDataGrid(JtfObjectHandle handle, Desktop desktop)
handle
- 可确定 FlexDataGrid 的句柄desktop
- 此对象所在的桌面public void columnStretch(int columnIndex, double localX)
如果 horizontalScrollPolicy 为"关",其他列将缩小或扩展以补偿列的大小调整,而且它们还会发送此事件。
columnIndex
- DataGrid 对象的列数组中项目列的零基索引localX
- 鼠标的 x 位置public void edit(String itemRenderer, int rowIndex, int columnIndex)
itemRenderer
- 可编辑的项目的项目呈现器rowIndex
- 数据提供程序中项目的零基索引columnIndex
- DataGrid 对象的列
数组中项目列的零基索引public void headerClick(int columnIndex)
仅在列可排序且数据提供程序支持排序时发送。
columnIndex
- DataGrid 对象的列数组中项目列的零基索引public void headerShift(int newIndex, int oldIndex)
newIndex
- 更改后标题的零基索引oldIndex
- 更改前标题的零基索引public void headerShift(int newIndex, int oldIndex, FlexTriggerEvent triggerEvent)
newIndex
- 更改后标题的零基索引oldIndex
- 更改前标题的零基索引triggerEvent
- 触发了操作的事件,例如鼠标或键盘事件public boolean isEditable()
如果为 true,则控件中的项目呈现器可编辑。用户可单击项目呈现器以打开编辑器。
您可使用 DataGridColumn.editable 属性或通过处理 itemEditBeginning 和 itemEditBegin 事件关闭对 DataGrid 控件各列的编辑
默认值为 false。
public List<Color> getHeaderColors()
第一种颜色是顶层颜色。第二种颜色是底色。默认值为 [0xFFFFFF, 0xE6E6E6]。
public String getHeaderStyleName()
dataGridStyles
。public Color getHorizontalGridLineColor()
public boolean isHorizontalGridLines()
如果为 true,则数据网格显示水平网格线。如果为 false,则数据网格隐藏水平网格线。默认值为 false。
public double getMinColumnWidth()
public boolean isResizableColumns()
如果为 true,则用户可通过拖动标题单元格之间的网格线来拉伸或缩小 DataGrid 控件的列。如果为 false,单个行的可调整大小属性也须设为 false,以防止用户调整特定列的大小。
默认值为 true。
public boolean isSortableColumns()
如果为 true,用户可通过单击列标题单元格对数据提供程序项目进行排序。则列的 DataGridColumn.dataField 属性或 DataGridColumn.sortCompareFunction 属性将用作排序字段。如果多次单击列,则以升序和降序的顺序进行交替排序。如果为 true,则通过设置列的可排序属性为 false,各列还可以对单击标题的操作不作响应。
当用户松开标题单元格上的鼠标按钮时,如果此属性和列的可排序属性都为 true,则 DataGrid 控件会发送 headerRelease 事件。如果无任何处理程序针对此事件调用 preventDefault() 方法,则 DataGrid 使用列的 DataGridColumn.dataField 或 DataGridColumn.sortCompareFunction 属性进行排序。
默认值为 true。
public Color getVerticalGridLineColor()
public boolean isVerticalGridLines()
如果为 true,则数据网格显示垂直网格线。如果为 false,则数据网格隐藏垂直网格线。默认值为 true。
Copyright 2009-2012 Micro Focus. All Rights Reserved.