public class Grid extends BaseGridComponent
| 限定符和类型 | 字段和说明 |
|---|---|
protected java.awt.Component |
editorComponent |
static int |
MULTIPLE_PAGINATE_LINE |
static int |
NO_PAGINATE_LINE
If editing, the
Component that is handling the editing. |
static int |
SINGLE_HORIZONTAL_PAGINATE_LINE |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| 构造器和说明 |
|---|
Grid(int resolution) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
ajustEditorComponentBounds()
peter:重新调整editorComponent的宽度和高度,几乎是界面有变化就调整.
|
java.awt.Rectangle |
caculateIntersectsUnion(ElementCase report,
java.awt.Rectangle oldRectangle)
计算oldRectangle,因为CellElement的合并会变成多大的区域.
|
void |
cancelEditing()
取消编辑状态
|
void |
doMousePress(double evtX,
double evtY)
鼠标点击事件
|
CellEditor |
getCellEditor()
Gets the cell editor.
|
CellEditor |
getCellEditor(int column,
int row)
Returns an appropriate editor for the cell specified by
column and row. |
CellEditor |
getDefaultCellEditor()
Gets the cell editor to be edit Object class.
|
CellEditor |
getDefaultCellEditor(java.lang.Class objectClass)
Gets the editor to be edit the class.
|
FloatEditor |
getDefaultFloatEditor()
Gets the float editor to be edit Object class.
|
FloatEditor |
getDefaultFloatEditor(java.lang.Class objectClass)
Gets the float editor to be edit the class.
|
java.awt.Rectangle |
getDragRectangle() |
int |
getDragType() |
FloatElement |
getDrawingFloatElement() |
java.lang.String |
getEditingCellElement() |
int |
getEditingColumn()
Gets the index of the column that contains the cell currently being
edited.
|
int |
getEditingRow()
Gets the index of the row that contains the cell currently being edited.
|
java.awt.Component |
getEditorComponent()
Gets the component that is handling the editing session.
|
FloatEditor |
getFloatEditor()
Gets the float editor.
|
java.awt.Color |
getGridLineColor()
Gets grid line color.
|
GridMouseAdapter |
getGridMouseAdapter() |
int |
getHorizontalBeginValue()
denny: add the get and set method of horizontalBeginValue
|
int |
getHorizontalExtent() |
java.awt.Color |
getHorizontalFrozenLineColor()
Gets horizontal frozen line color.
|
int |
getHorizontalValue() |
int |
getPaginateLineShowType() |
java.awt.Color |
getPaginationLineColor()
Gets pagination line color.
|
int |
getResolution() |
java.awt.Color |
getSelectedBackground()
Gets the selected background.
|
java.awt.Color |
getSelectedBorderLineColor()
Gets the selected border line color.
|
java.awt.Point |
getToolTipLocation(java.awt.event.MouseEvent event) |
int |
getVerticalBeginValue()
// denny: add the get and set method of verticalBeginValue
|
int |
getVerticalExtent() |
java.awt.Color |
getVerticalFrozenLineColor()
Gets vertical frozen line color.
|
int |
getVerticalValue() |
boolean |
isCellEditing()
当前编辑对象是否为单元格
|
boolean |
isEditable()
组件是否可以被编辑
|
boolean |
isEditing()
是否处于编辑状态
|
boolean |
isFloatEditing()
当前是否在编辑悬浮元素
|
boolean |
IsNotShowingTableSelectPane()
是否处于智能选择单元格阶段
|
boolean |
isShowGridLine()
是否显示格子线
|
boolean |
isShowHorizontalFrozenLine()
是否显示水平冻结线
|
boolean |
isShowVerticalFrozenLine()
是否显示垂直冻结线
|
void |
removeCellEditor()
移除单元格组件
|
void |
removeEditor()
移除选中组件
|
void |
removeFloatEditor()
移除悬浮元素组件
|
void |
setCellEditor(CellEditor anEditor)
Sets the
cellEditor variable. |
void |
setDefaultCellEditor(CellEditor editor)
Sets the cell editor to be edit the Object class.
|
void |
setDefaultCellEditor(java.lang.Class objectClass,
CellEditor editor)
Sets the editor to be edit the class.
|
void |
setDefaultFloatEditor(java.lang.Class objectClass,
FloatEditor floatEditor)
Sets the float editor to be edit the class.
|
void |
setDefaultFloatEditor(FloatEditor editor)
Sets the float editor to be edit the Object class.
|
void |
setDragRectangle(java.awt.Rectangle dragRectangle) |
void |
setDragType(int dragType) |
void |
setDrawingFloatElement(FloatElement drawingFloatElement) |
void |
setEditable(boolean editable)
Sets whether to editable.
|
void |
setEditingColumn(int editingColumn)
Sets the
editingColumn variable. |
void |
setEditingRow(int editingColumn)
Sets the
editingRow variable. |
void |
setFloatEditor(FloatEditor anEditor)
Sets the
FloatEditor variable. |
void |
setGridLineColor(java.awt.Color gridLineColor)
Sets grid line color.
|
void |
setHorizontalBeginValue(int horizontalBeginValue) |
void |
setHorizontalExtent(int horizontalExtent) |
void |
setHorizontalFrozenLineColor(java.awt.Color horizontalFrozenLineColor)
Sets horizontal frozen line color.
|
void |
setHorizontalValue(int horizontalValue) |
void |
setNotShowingTableSelectPane(boolean f) |
void |
setPaginateLineShowType(int paginateLineShowType) |
void |
setPaginationLineColor(java.awt.Color paginationLineColor)
Sets pagination line color.
|
void |
setResolution(int resolution) |
void |
setSelectedBackground(java.awt.Color selectedBackground)
Sets the selected background.
|
void |
setSelectedBorderLineColor(java.awt.Color selectedBorderLineColor)
Sets the selected border line color.
|
void |
setShowGridLine(boolean isShowGridLine)
Sets whether to show grid line.
|
void |
setShowHorizontalFrozenLine(boolean showHorizontalFrozenLine)
Sets to show horizontal frozen line.
|
void |
setShowVerticalFrozenLine(boolean showVerticalFrozenLine)
Sets to show vertical frozen line.
|
void |
setTooltipLocation(double x,
double y) |
void |
setVerticalBeinValue(int verticalBeginValue) |
void |
setVerticalExtent(int verticalExtent) |
void |
setVerticalFrozenLineColor(java.awt.Color verticalFrozenLineColor)
Sets vertical frozen line color.
|
void |
setVerticalValue(int verticalValue) |
boolean |
startCellEditingAt_DEC(int column,
int row,
java.lang.Class cellTypeClass,
boolean byKeyEvent)
开始单元格编辑
|
void |
startEditing()
开始单元格编辑
|
protected void |
startEditing(boolean byKeyEvent)
开始单元格编辑
|
void |
stopEditing()
停止编辑状态
|
void |
updateUI()
应用界面设置
|
getElementCasePane, setElementCasePaneaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCyclepublic static final int NO_PAGINATE_LINE
Component that is handling the editing.public static final int MULTIPLE_PAGINATE_LINE
public static final int SINGLE_HORIZONTAL_PAGINATE_LINE
protected transient java.awt.Component editorComponent
public void setResolution(int resolution)
public int getResolution()
public void updateUI()
updateUI 在类中 javax.swing.JComponentpublic boolean isShowGridLine()
public void setShowGridLine(boolean isShowGridLine)
isShowGridLine - whether to show grid line.public GridMouseAdapter getGridMouseAdapter()
public java.awt.Color getGridLineColor()
public void setGridLineColor(java.awt.Color gridLineColor)
gridLineColor - the new color of line.public java.awt.Color getPaginationLineColor()
public void setPaginationLineColor(java.awt.Color paginationLineColor)
paginationLineColor - the new color of pagination line.public boolean isShowVerticalFrozenLine()
public void setShowVerticalFrozenLine(boolean showVerticalFrozenLine)
public java.awt.Color getVerticalFrozenLineColor()
public void setVerticalFrozenLineColor(java.awt.Color verticalFrozenLineColor)
verticalFrozenLineColor - the new color of vertical frozen line.public boolean isShowHorizontalFrozenLine()
public void setShowHorizontalFrozenLine(boolean showHorizontalFrozenLine)
public java.awt.Color getHorizontalFrozenLineColor()
public void setHorizontalFrozenLineColor(java.awt.Color horizontalFrozenLineColor)
horizontalFrozenLineColor - the new color of horizontal frozen line.public java.awt.Color getSelectedBackground()
public void setSelectedBackground(java.awt.Color selectedBackground)
selectedBackground - the new selected background.public java.awt.Color getSelectedBorderLineColor()
public void setSelectedBorderLineColor(java.awt.Color selectedBorderLineColor)
selectedBorderLineColor - the new color of selected border line.public boolean isEditable()
public void setEditable(boolean editable)
public FloatElement getDrawingFloatElement()
public void setDrawingFloatElement(FloatElement drawingFloatElement)
drawingFloatElement - public int getVerticalValue()
public void setVerticalValue(int verticalValue)
verticalValue - public int getVerticalExtent()
public void setVerticalExtent(int verticalExtent)
verticalExtent - public int getVerticalBeginValue()
public void setVerticalBeinValue(int verticalBeginValue)
verticalBeginValue - public int getHorizontalExtent()
public void setHorizontalExtent(int horizontalExtent)
horizontalExtent - public int getHorizontalValue()
public void setHorizontalValue(int horizontalValue)
horizontalValue - public int getHorizontalBeginValue()
public void setHorizontalBeginValue(int horizontalBeginValue)
horizontalBeginValue - public boolean isEditing()
public boolean isCellEditing()
public void setNotShowingTableSelectPane(boolean f)
f - public boolean IsNotShowingTableSelectPane()
public boolean isFloatEditing()
public CellEditor getCellEditor(int column, int row)
column and row.column - the column of the cell to edit, where 0 is the first column;row - the row of the cell to edit, where 0 is the first rownull return the default
editor for this type of cellCellEditorpublic java.awt.Component getEditorComponent()
public int getEditingColumn()
public void setEditingColumn(int editingColumn)
editingColumn variable.editingColumn - the column of the cell to be editedpublic int getEditingRow()
public void setEditingRow(int editingColumn)
editingRow variable.editingColumn - the row of the cell to be editedpublic CellEditor getCellEditor()
CellEditor that does the editingpublic FloatEditor getFloatEditor()
FloatEditor that does the editingpublic void setCellEditor(CellEditor anEditor)
cellEditor variable.anEditor - the CellEditor that does the editingpublic void setFloatEditor(FloatEditor anEditor)
FloatEditor variable.anEditor - the FloatEditor that does the editingpublic CellEditor getDefaultCellEditor()
setDefaultCellEditor(com.fr.design.cell.editor.CellEditor),
Elem.getValue()public FloatEditor getDefaultFloatEditor()
setDefaultFloatEditor(com.fr.design.cell.editor.FloatEditor),
FloatElement.getValue()public void setDefaultCellEditor(CellEditor editor)
editor - default cell editor to be used for Object ClassgetDefaultCellEditor()public void setDefaultFloatEditor(FloatEditor editor)
editor - default float editor to be used for Object ClassgetDefaultFloatEditor()public CellEditor getDefaultCellEditor(java.lang.Class objectClass)
Grid installs
entries for Object, Number,
Boolean,and all values that supported by CellElement.objectClass - return the default cell editor for this ClasssetDefaultCellEditor(com.fr.design.cell.editor.CellEditor),
Elem.getValue()public FloatEditor getDefaultFloatEditor(java.lang.Class objectClass)
Grid
installs entries for Object, Number,
Boolean,and all values that supported by FloatElement.objectClass - return the default float editor for this ClasssetDefaultFloatEditor(com.fr.design.cell.editor.FloatEditor),
FloatElement.getValue()public void setDefaultCellEditor(java.lang.Class objectClass,
CellEditor editor)
Grid installs
entries for Object, Number,
Boolean,and all values that supported by CellElement.objectClass - set the default cell editor for this Classeditor - default cell editor to be used for this ClassgetDefaultCellEditor(),
Elem.getValue()public void setDefaultFloatEditor(java.lang.Class objectClass,
FloatEditor floatEditor)
Grid
installs entries for Object, Number,
Boolean,and all values that supported by CellElement.objectClass - set the default float editor for this ClassfloatEditor - default float editor to be used for this ClassgetDefaultFloatEditor(),
FloatElement.getValue()public void startEditing()
protected void startEditing(boolean byKeyEvent)
byKeyEvent - 是否为键盘触发public boolean startCellEditingAt_DEC(int column,
int row,
java.lang.Class cellTypeClass,
boolean byKeyEvent)
column - 列row - 行cellTypeClass - 单元格类型byKeyEvent - 是否为键盘触发public void stopEditing()
public java.lang.String getEditingCellElement()
public void cancelEditing()
public void removeEditor()
public void removeCellEditor()
public void removeFloatEditor()
public void doMousePress(double evtX,
double evtY)
evtX - x坐标evtY - y坐标public java.awt.Rectangle caculateIntersectsUnion(ElementCase report, java.awt.Rectangle oldRectangle)
report - 当前格子报表oldRectangle - 之前的选中区域public java.awt.Point getToolTipLocation(java.awt.event.MouseEvent event)
getToolTipLocation 在类中 javax.swing.JComponentevent - public void ajustEditorComponentBounds()
public void setDragType(int dragType)
dragType - public int getDragType()
public void setDragRectangle(java.awt.Rectangle dragRectangle)
dragRectangle - public java.awt.Rectangle getDragRectangle()
public void setTooltipLocation(double x,
double y)
x - y - public int getPaginateLineShowType()
public void setPaginateLineShowType(int paginateLineShowType)