public class Grid
extends org.eclipse.swt.widgets.Canvas
The item children that may be added to instances of this class must be of
type GridItem
.
Modifier and Type | Class and Description |
---|---|
static class |
Grid.GridVisibleRange
Object holding the visible range
|
Modifier and Type | Field and Description |
---|---|
(package private) int |
bottomIndex
Index of last visible item.
|
(package private) int |
endColumnIndex
Index of the the last visible column.
|
(package private) boolean |
hasDifferingHeights
True if there is at least one
GridItem with an individual
height. |
(package private) boolean |
hoveringOnColumnResizer
True if mouse is hover on a column boundary and can resize the column.
|
(package private) int |
startColumnIndex
Index of the first visible column.
|
(package private) int |
topIndex
Index of first visible item.
|
Constructor and Description |
---|
Grid(org.eclipse.swt.widgets.Composite parent,
int style)
Grid with generic DataVisualizer
|
Grid(DataVisualizer dataVisualizer,
org.eclipse.swt.widgets.Composite parent,
int style)
Constructs a new instance of this class given its parent and a style value
describing its behavior and appearance.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(int eventType,
org.eclipse.swt.widgets.Listener listener) |
void |
addMouseListener(org.eclipse.swt.events.MouseListener sourceListener) |
void |
addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Adds the listener to the collection of listeners who will be notified when
the receiver's selection changes, by sending it one of the messages defined
in the
SelectionListener interface. |
void |
addTreeListener(org.eclipse.swt.events.TreeListener listener)
Adds the listener to the collection of listeners who will be notified when
the receiver's items changes, by sending it one of the messages defined in
the
TreeListener interface. |
void |
clear(int[] indices,
boolean allChildren)
Clears the items at the given zero-relative indices in the receiver.
|
void |
clear(int index,
boolean allChildren)
Clears the item at the given zero-relative index in the receiver.
|
void |
clear(int start,
int end,
boolean allChildren)
Clears the items in the receiver which are between the given zero-relative
start and end indices (inclusive).
|
void |
clearAll(boolean allChildren)
Clears all the items in the receiver.
|
void |
clearItems()
Clear simply all GridItems
|
org.eclipse.swt.graphics.Point |
computeSize(int wHint,
int hHint,
boolean changed) |
void |
deselect(int index)
Deselects the item at the given zero-relative index in the receiver.
|
void |
deselect(int[] indices)
Deselects the items at the given zero-relative indices in the receiver.
|
void |
deselect(int start,
int end)
Deselects the items at the given zero-relative indices in the receiver.
|
void |
deselectAll()
Deselects all selected items in the receiver.
|
void |
deselectAllCells()
Deselects all selected cells in the receiver.
|
void |
deselectCell(org.eclipse.swt.graphics.Point cell)
Deselects the given cell in the receiver.
|
void |
deselectCells(org.eclipse.swt.graphics.Point[] cells)
Deselects the given cells.
|
void |
disableDefaultKeyListener()
Disable default key listener
|
void |
disposeAllItems()
All items needs to call the disposeOnly method
|
void |
enableDefaultKeyListener()
Enable default key listener
|
(package private) void |
fireColumnsMoved() |
org.eclipse.swt.graphics.Color |
getBackground() |
(package private) int |
getBottomIndex()
Returns the zero-relative index of the item which is currently at the bottom
of the receiver.
|
IRenderer |
getBottomLeftRenderer()
Gets the bottom left renderer.
|
org.eclipse.swt.graphics.Point |
getCell(org.eclipse.swt.graphics.Point point)
Returns the cell at the given point in the receiver or null if no such cell
exists.
|
org.eclipse.swt.graphics.Color |
getCellHeaderSelectionBackground()
Returns the background color of column and row headers when a cell in the row
or header is selected.
|
org.eclipse.swt.graphics.Point[] |
getCellSelection()
Returns an array of cells that are currently selected in the receiver.
|
int |
getCellSelectionCount()
Returns the number of selected cells contained in the receiver.
|
boolean |
getCellSelectionEnabled()
Returns true if the cells are selectable in the reciever.
|
GridColumn |
getColumn(int index)
Returns the column at the given, zero-relative index in the receiver.
|
GridColumn |
getColumn(org.eclipse.swt.graphics.Point point)
Returns the column at the given point in the receiver or null if no such
column exists.
|
int |
getColumnCount()
Returns the number of columns contained in the receiver.
|
GridColumnGroup |
getColumnGroup(int index)
Returns the column group at the given, zero-relative index in the receiver.
|
int |
getColumnGroupCount()
Returns the number of column groups contained in the receiver.
|
GridColumnGroup[] |
getColumnGroups()
Returns an array of
GridColumnGroup s which are the column groups in
the receiver. |
int[] |
getColumnOrder()
Returns an array of zero-relative integers that map the creation order of the
receiver's items to the order in which they are currently being displayed.
|
GridColumn[] |
getColumns()
Returns an array of
GridColumn s which are the columns in the
receiver. |
boolean |
getColumnScrolling()
Returns true if the table is set to horizontally scroll column-by-column
rather than pixel-by-pixel.
|
(package private) GridColumn[] |
getColumnsInOrder()
Returns an array of the columns in their display order.
|
DataVisualizer |
getDataVisualizer() |
GridCellRenderer |
getEmptyCellRenderer()
Returns the empty cell renderer.
|
IRenderer |
getEmptyColumnFooterRenderer()
Returns the empty column footer renderer.
|
IRenderer |
getEmptyColumnHeaderRenderer()
Returns the empty column header renderer.
|
IRenderer |
getEmptyRowHeaderRenderer()
Returns the empty row header renderer.
|
(package private) int |
getEndColumnIndex() |
org.eclipse.swt.graphics.Point |
getFocusCell()
Returns the current cell in focus.
|
(package private) GridColumn |
getFocusColumn() |
GridItem |
getFocusItem()
Returns the current item in focus.
|
IRenderer |
getFocusRenderer()
Gets the focus renderer.
|
org.eclipse.swt.graphics.Font |
getFont()
Cached default font of Control.getFont
|
int |
getFooterHeight()
Returns the height of the column footers.
|
boolean |
getFooterVisible()
Returns
true if the receiver's footer is visible, and false
otherwise |
(package private) int |
getGridHeight()
Returns the height of the plain grid in pixels.
|
int |
getGroupHeaderHeight()
Returns the height of the column group headers.
|
int |
getHeaderHeight()
Returns the height of the column headers.
|
boolean |
getHeaderVisible()
Returns
true if the receiver's header is visible, and false
otherwise. |
protected IScrollBarProxy |
getHorizontalScrollBarProxy()
Returns the externally managed horizontal scrollbar.
|
int |
getIndexOfItem(GridItem item) |
GridItem |
getItem(int index)
Returns the item at the given, zero-relative index in the receiver.
|
GridItem |
getItem(org.eclipse.swt.graphics.Point point)
Returns the item at the given point in the receiver or null if no such item
exists.
|
int |
getItemCount()
Returns the number of items contained in the receiver.
|
int |
getItemHeaderWidth()
Returns the row header width or 0 if row headers are not visible.
|
int |
getItemHeight()
Returns the default height of the items in this
Grid . |
GridItem[] |
getItems()
Returns a (possibly empty) array of
GridItem s which are the items in
the receiver. |
org.eclipse.swt.graphics.Color |
getLineColor()
Returns the line color.
|
boolean |
getLinesVisible()
Returns true if the lines are visible.
|
GridColumn |
getNextVisibleColumn(GridColumn column)
Returns the next visible column in the table.
|
GridItem |
getNextVisibleItem(GridItem item)
Returns the next visible item in the table.
|
(package private) org.eclipse.swt.graphics.Point |
getOrigin(GridColumn column,
GridItem item)
Returns the intersection of the given column and given item.
|
GridColumn |
getPreviousVisibleColumn(GridColumn column)
Returns the previous visible column in the table.
|
GridItem |
getPreviousVisibleItem(GridItem item)
Returns the previous visible item in the table.
|
GridItem |
getRootItem(int index)
TODO: asl;fj
|
int |
getRootItemCount()
Returns the number of root items contained in the receiver.
|
GridItem[] |
getRootItems()
Returns a (possibly empty) array of
GridItem s which are the root
items in the receiver. |
IRenderer |
getRowHeaderRenderer()
Gets the row header renderer.
|
int |
getRowHeaderWidth()
Returns the width of the row headers.
|
boolean |
getRowsResizeable()
Returns true if the rows are resizable.
|
GridItem[] |
getSelection()
Returns a array of
GridItem s that are currently selected in the
receiver. |
int |
getSelectionCount()
Returns the number of selected items contained in the receiver.
|
boolean |
getSelectionEnabled()
Returns
true if selection is enabled, false otherwise. |
int |
getSelectionIndex()
Returns the zero-relative index of the item which is currently selected in
the receiver, or -1 if no item is selected.
|
int[] |
getSelectionIndices()
Returns the zero-relative indices of the items which are currently selected
in the receiver.
|
(package private) int |
getStartColumnIndex() |
java.lang.String |
getToolTipText()
Returns the receiver's tool tip text, or null if it has not been set.
|
int |
getTopIndex()
Returns the zero-relative index of the item which is currently at the top of
the receiver.
|
IRenderer |
getTopLeftRenderer()
Gets the top left renderer.
|
boolean |
getTreeLinesVisible()
Returns true if the tree lines are visible.
|
protected IScrollBarProxy |
getVerticalScrollBarProxy()
Returns the externally managed vertical scrollbar.
|
(package private) GridColumn |
getVisibleColumn_DegradeLeft(GridItem item,
GridColumn col)
Returns the first visible column that is not spanned by any other column that
is either the given column or any of the columns displaying to the left of
the given column.
|
(package private) GridColumn |
getVisibleColumn_DegradeRight(GridItem item,
GridColumn col)
Returns the first visible column that is not spanned by any other column that
is either the given column or any of the columns displaying to the right of
the given column.
|
(package private) int |
getVisibleGridHeight()
Returns the height of the on-screen area that is available for showing the
grid's rows, i.e.
|
(package private) int |
getVisibleGridWidth()
Returns the height of the screen area that is available for showing the grid
columns
|
Grid.GridVisibleRange |
getVisibleRange()
Query the grid for all currently visible rows and columns
|
(package private) void |
handlePacked(GridColumn column) |
protected void |
hideToolTip()
Hides the inplace tooltip.
|
(package private) void |
imageSetOnItem(int column,
GridItem item)
Updates the row height when the first image is set on an item.
|
int |
indexOf(GridColumn column)
Searches the receiver's list starting at the first column (index 0) until a
column is found that is equal to the argument, and returns the index of that
column.
|
int |
indexOf(GridItem item)
Searches the receiver's list starting at the first item (index 0) until an
item is found that is equal to the argument, and returns the index of that
item.
|
boolean |
isAutoHeight()
Returns the value of the auto-height feature, which resizes row heights and
column header heights based on word-wrapped content.
|
boolean |
isAutoWidth()
Returns the value of the auto-height feature, which resizes row header width
based on content.
|
boolean |
isCellDragSelectionEnabled() |
boolean |
isCellSelected(org.eclipse.swt.graphics.Point cell)
Returns true if the given cell is selected.
|
boolean |
isCellSelectionEnabled() |
(package private) boolean |
isDisposing() |
boolean |
isFocusOnGrid() |
(package private) boolean |
isInDragScrollArea(org.eclipse.swt.graphics.Point point)
A helper method for
GridDropTargetEffect.dragOver(DropTargetEvent) . |
boolean |
isMoveOnTab() |
boolean |
isRowHeaderVisible()
Returns
true if the receiver's row header is visible, and
false otherwise. |
boolean |
isSelected(GridItem item)
Returns true if the given item is selected.
|
boolean |
isSelected(int index)
Returns
true if the item is selected, and false otherwise. |
(package private) boolean |
isShown(GridItem item)
Returns true if 'item' is currently being completely shown in this
Grid 's visible on-screen area. |
boolean |
isVisibleLinesColumnPack()
If
true , column pack is based only with the visible lines (from
topIndex to bottomIndex). |
boolean |
isWordWrapHeader()
Returns the value of the row header word-wrap feature, which word-wraps the
content of row headers.
|
(package private) int |
newColumn(GridColumn column,
int index)
Inserts a new column into the table.
|
(package private) void |
newColumnGroup(GridColumnGroup group)
Creates the given column group at the given index.
|
(package private) int |
newItem(GridItem item,
int index,
boolean root)
Creates the new item at the given index.
|
(package private) void |
newRootItem(GridItem item,
int index) |
protected void |
onKeyDown(org.eclipse.swt.widgets.Event e)
Key down event handler.
|
void |
recalculateHeader()
Recalculate the height of the header
|
(package private) void |
recalculateRowHeaderHeight(GridItem item,
int oldHeight,
int newHeight) |
(package private) void |
recalculateRowHeaderWidth(GridItem item,
int oldWidth,
int newWidth) |
void |
refreshData()
|
protected void |
refreshHoverState()
Refreshes the hover* variables according to the mouse location and current
state of the table.
|
void |
remove(int index)
Removes the item from the receiver at the given zero-relative index.
|
void |
remove(int[] indices)
Removes the items from the receiver's list at the given zero-relative
indices.
|
void |
remove(int start,
int end)
Removes the items from the receiver which are between the given zero-relative
start and end indices (inclusive).
|
void |
removeAll()
Deprecated.
|
(package private) void |
removeColumn(GridColumn column)
Removes the given column from the table.
|
(package private) void |
removeColumnGroup(GridColumnGroup group)
Removes the given column group from the table.
|
(package private) void |
removeItem(GridItem item)
Removes the given item from the table.
|
(package private) void |
removeRootItem(GridItem item) |
void |
removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
Removes the listener from the collection of listeners who will be notified
when the receiver's selection changes.
|
void |
removeTreeListener(org.eclipse.swt.events.TreeListener listener)
Removes the listener from the collection of listeners who will be notified
when the receiver's items changes.
|
void |
select(int index)
Selects the item at the given zero-relative index in the receiver.
|
void |
select(int[] indices)
Selects the items at the given zero-relative indices in the receiver.
|
void |
select(int start,
int end)
Selects the items in the range specified by the given zero-relative indices
in the receiver.
|
void |
selectAll()
Selects all of the items in the receiver.
|
void |
selectAllCells()
Selects all cells in the receiver.
|
void |
selectCell(org.eclipse.swt.graphics.Point cell)
Selects the given cell.
|
void |
selectCells(org.eclipse.swt.graphics.Point[] cells)
Selects the given cells.
|
void |
selectColumn(int col)
Selects all cells in the given column in the receiver.
|
void |
selectColumnGroup(GridColumnGroup colGroup)
Selects all cells in the given column group in the receiver.
|
void |
selectColumnGroup(int colGroup)
Selects all cells in the given column group in the receiver.
|
void |
setAutoHeight(boolean enabled)
Sets the value of the auto-height feature.
|
void |
setAutoWidth(boolean enabled)
Sets the value of the auto-width feature.
|
void |
setBackground(org.eclipse.swt.graphics.Color color) |
void |
setBottomLeftRenderer(IRenderer bottomLeftRenderer)
Sets the bottom left renderer.
|
void |
setCellDragSelectionEnabled(boolean cellDragSelection)
Sets whether cells are selectable in the receiver by dragging the mouse
cursor.
|
void |
setCellHeaderSelectionBackground(org.eclipse.swt.graphics.Color cellSelectionBackground)
Sets the background color of column and row headers displayed when a cell in
the row or header is selected.
|
void |
setCellSelection(org.eclipse.swt.graphics.Point cell)
Selects the selection to the given cell.
|
void |
setCellSelection(org.eclipse.swt.graphics.Point[] cells)
Selects the selection to the given set of cell.
|
void |
setCellSelectionEnabled(boolean cellSelection)
Sets whether cells are selectable in the receiver.
|
void |
setColumnOrder(int[] order)
Sets the order that the items in the receiver should be displayed in to the
given argument which is described in terms of the zero-relative ordering of
when the items were added.
|
void |
setColumnScrolling(boolean columnScrolling)
Sets the table scrolling method to either scroll column-by-column (true) or
pixel-by-pixel (false).
|
void |
setEmptyCellRenderer(GridCellRenderer emptyCellRenderer)
Sets the empty cell renderer.
|
void |
setEmptyColumnFooterRenderer(IRenderer emptyColumnFooterRenderer)
Sets the empty column footer renderer.
|
void |
setEmptyColumnHeaderRenderer(IRenderer emptyColumnHeaderRenderer)
Sets the empty column header renderer.
|
void |
setEmptyRowHeaderRenderer(IRenderer emptyRowHeaderRenderer)
Sets the empty row header renderer.
|
void |
setFocusColumn(GridColumn column)
Sets the focused item to the given column.
|
void |
setFocusItem(GridItem item)
Sets the focused item to the given item.
|
void |
setFocusRenderer(IRenderer focusRenderer)
Sets the focus renderer.
|
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setFooterVisible(boolean show)
Marks the receiver's footer as visible if the argument is
true , and
marks it invisible otherwise. |
void |
setForeground(org.eclipse.swt.graphics.Color color) |
(package private) void |
setHasSpanning(boolean hasSpanning) |
void |
setHeaderVisible(boolean show)
Marks the receiver's header as visible if the argument is
true , and
marks it invisible otherwise. |
protected void |
setHorizontalScrollBarProxy(IScrollBarProxy scroll)
Sets the external horizontal scrollbar.
|
(package private) void |
setInsertMark(GridItem item,
GridColumn column,
boolean before)
Display a mark indicating the point at which an item will be inserted.
|
void |
setItemCount(int count)
Sets the number of items contained in the receiver.
|
void |
setItemHeaderWidth(int width)
Sets the row header width to the specified value.
|
void |
setItemHeight(int height)
Sets the default height for this
Grid 's items. |
void |
setLineColor(org.eclipse.swt.graphics.Color lineColor)
Sets the line color.
|
void |
setLinesVisible(boolean linesVisible)
Sets the line visibility.
|
protected void |
setlVerticalScrollBarProxy(IScrollBarProxy scroll)
Sets the external vertical scrollbar.
|
void |
setMoveOnTab(boolean moveOnTab)
This param allows user to change the current selection by pressing TAB and
SHIFT-TAB
|
void |
setRowHeaderRenderer(IRenderer rowHeaderRenderer)
Sets the row header renderer.
|
void |
setRowHeaderVisible(boolean show)
Marks the receiver's row header as visible if the argument is
true ,
and marks it invisible otherwise. |
void |
setRowHeaderVisible(boolean show,
int minWidth)
Marks the receiver's row header as visible if the argument is
true ,
and marks it invisible otherwise. |
void |
setRowsResizeable(boolean rowsResizeable)
Sets the rows resizeable state of this
Grid . |
protected void |
setScrollValuesObsolete()
Marks the scroll values obsolete so they will be recalculated.
|
void |
setSelection(GridItem[] _items)
Sets the receiver's selection to be the given array of items.
|
void |
setSelection(int index)
Selects the item at the given zero-relative index in the receiver.
|
void |
setSelection(int[] indices)
Selects the items at the given zero-relative indices in the receiver.
|
void |
setSelection(int start,
int end)
Selects the items in the range specified by the given zero-relative indices
in the receiver.
|
void |
setSelectionEnabled(boolean selectionEnabled)
Enables selection highlighting if the argument is
true . |
void |
setSelectionType(GridSelectionType selectionType)
Change selection type (single or multi)
|
(package private) void |
setSizeOnEveryItemImageChange(boolean sizeOnEveryItemImageChange) |
void |
setToolTipText(java.lang.String string)
Sets the receiver's tool tip text to the argument, which may be null
indicating that no tool tip text should be shown.
|
void |
setTopIndex(int index)
Sets the zero-relative index of the item which is currently at the top of the
receiver.
|
void |
setTopLeftRenderer(IRenderer topLeftRenderer)
Sets the top left renderer.
|
void |
setTreeLinesVisible(boolean treeLinesVisible)
Sets the tree line visibility.
|
void |
setVisibleLinesColumnPack(boolean visibleLinesBasedColumnPack)
Set optimizedColumnPack to
true for column pack based only with
the visible lines. |
void |
setWordWrapHeader(boolean enabled)
Sets the value of the word-wrap feature for row headers.
|
void |
showColumn(GridColumn col)
Shows the column.
|
void |
showItem(GridItem item)
Shows the item.
|
void |
showSelection()
Shows the selection.
|
protected void |
showToolTip(GridItem item,
GridColumn column,
GridColumnGroup group,
org.eclipse.swt.graphics.Point location)
Shows the inplace tooltip for the given item and column.
|
(package private) void |
updateColumnFocus() |
(package private) void |
updateColumnSelection() |
protected void |
updateToolTipText(java.lang.String text)
Sets the tooltip for the whole Grid to the given text.
|
(package private) void |
updateVisibleItems(int amount)
Updates the cached number of visible items by the given amount.
|
drawBackground, getCaret, getIME, scroll, setCaret, setIME
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
addDisposeListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
boolean hoveringOnColumnResizer
boolean hasDifferingHeights
GridItem
with an individual
height. This value is only set to true in
GridItem#setHeight(int,boolean)
and it is never reset to false.int topIndex
bottomIndex
int bottomIndex
Note that the item with this index is often only partly visible; maybe only a single line of pixels is visible. In extreme cases, bottomIndex may be the same as topIndex.
topIndex
int startColumnIndex
int endColumnIndex
public Grid(org.eclipse.swt.widgets.Composite parent, int style)
parent
- componentstyle
- grid stylepublic Grid(DataVisualizer dataVisualizer, org.eclipse.swt.widgets.Composite parent, int style)
dataVisualizer
- manage all data of grid and its itemsparent
- a composite control which will be the parent of the new instance
(cannot be null)style
- the style of control to constructjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SWT.SINGLE
,
SWT.MULTI
public DataVisualizer getDataVisualizer()
DataVisualizer
public void clearItems()
public org.eclipse.swt.graphics.Color getBackground()
getBackground
in class org.eclipse.swt.widgets.Control
public void setBackground(org.eclipse.swt.graphics.Color color)
setBackground
in class org.eclipse.swt.widgets.Control
public org.eclipse.swt.graphics.Color getCellHeaderSelectionBackground()
org.eclipse.swt.SWTException
- public void setCellHeaderSelectionBackground(org.eclipse.swt.graphics.Color cellSelectionBackground)
cellSelectionBackground
- color to set.org.eclipse.swt.SWTException
- public void addSelectionListener(org.eclipse.swt.events.SelectionListener listener)
SelectionListener
interface.
Cell selection events may have Event.detail = SWT.DRAG
when the
user is drag selecting multiple cells. A follow up selection event will be
generated when the drag is complete.
listener
- the listener which should be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void addTreeListener(org.eclipse.swt.events.TreeListener listener)
TreeListener
interface.listener
- the listener which should be notifiedjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- TreeListener
,
removeTreeListener(org.eclipse.swt.events.TreeListener)
,
TreeEvent
public org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
computeSize
in class org.eclipse.swt.widgets.Control
public void deselect(int index)
If cell selection is enabled, all cells in the specified item are deselected.
index
- the index of the item to deselectorg.eclipse.swt.SWTException
- public void deselect(int start, int end)
If cell selection is enabled, all cells in the given range are deselected.
start
- the start index of the items to deselectend
- the end index of the items to deselectorg.eclipse.swt.SWTException
- public void deselect(int[] indices)
If cell selection is enabled, all cells in the given items are deselected.
indices
- the array of indices for the items to deselectjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void deselectAll()
org.eclipse.swt.SWTException
- public GridColumn getColumn(int index)
GridColumn
s were
created by the programmer, this method will throw ERROR_INVALID_RANGE
despite the fact that a single column of data may be visible in the table.
This occurs when the programmer uses the table like a list, adding items but
never creating a column.index
- the index of the column to returnjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public GridColumn getColumn(org.eclipse.swt.graphics.Point point)
point
- the point used to locate the columnjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public int getColumnCount()
GridColumn
s were created by the programmer, this value is zero,
despite the fact that visually, one column of items may be visible. This
occurs when the programmer uses the table like a list, adding items but never
creating a column.org.eclipse.swt.SWTException
- public int[] getColumnOrder()
Specifically, the indices of the returned array represent the current visual order of the items, and the contents of the array represent the creation order of the items.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- public int getColumnGroupCount()
org.eclipse.swt.SWTException
- public GridColumnGroup[] getColumnGroups()
GridColumnGroup
s which are the column groups in
the receiver.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- public GridColumnGroup getColumnGroup(int index)
index
- the index of the column group to returnjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setColumnOrder(int[] order)
order
- the new order to display the itemsorg.eclipse.swt.SWTException
- java.lang.IllegalArgumentException
- public GridColumn[] getColumns()
GridColumn
s which are the columns in the
receiver. If no GridColumn
s were created by the programmer, the array
is empty, despite the fact that visually, one column of items may be visible.
This occurs when the programmer uses the table like a list, adding items but
never creating a column.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- public GridCellRenderer getEmptyCellRenderer()
org.eclipse.swt.SWTException
- public IRenderer getEmptyColumnHeaderRenderer()
org.eclipse.swt.SWTException
- public IRenderer getEmptyColumnFooterRenderer()
org.eclipse.swt.SWTException
- public IRenderer getEmptyRowHeaderRenderer()
org.eclipse.swt.SWTException
- protected IScrollBarProxy getHorizontalScrollBarProxy()
org.eclipse.swt.SWTException
- setHorizontalScrollBarProxy(IScrollBarProxy)
protected IScrollBarProxy getVerticalScrollBarProxy()
org.eclipse.swt.SWTException
- setlVerticalScrollBarProxy(IScrollBarProxy)
public IRenderer getFocusRenderer()
org.eclipse.swt.SWTException
- public int getHeaderHeight()
org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Font getFont()
getFont
in class org.eclipse.swt.widgets.Control
Control.getFont()
public int getFooterHeight()
org.eclipse.swt.SWTException
- public int getGroupHeaderHeight()
org.eclipse.swt.SWTException
- public boolean getHeaderVisible()
true
if the receiver's header is visible, and false
otherwise.org.eclipse.swt.SWTException
- public boolean getFooterVisible()
true
if the receiver's footer is visible, and false
otherwiseorg.eclipse.swt.SWTException
- public GridItem getItem(int index)
index
- the index of the item to returnjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public GridItem getItem(org.eclipse.swt.graphics.Point point)
point
- the point used to locate the itemjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public int getItemCount()
org.eclipse.swt.SWTException
- public int getItemHeight()
Grid
. See
setItemHeight(int)
for details.
IMPORTANT: The Grid's items need not all have the height returned by this
method, because an item's height may have been changed by calling
GridItem.setHeight(int)
.
org.eclipse.swt.SWTException
- setItemHeight(int)
public void setItemHeight(int height)
Grid
's items. When this method
is called, all existing items are resized to the specified height and items
created afterwards will be initially sized to this height.
As long as no default height was set by the client through this method, the
preferred height of the first item in this Grid
is used as a
default for all items (and is returned by getItemHeight()
).
height
- default height in pixelsjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- GridItem.getHeight()
,
GridItem.setHeight(int)
public boolean getRowsResizeable()
org.eclipse.swt.SWTException
- setRowsResizeable(boolean)
public void setRowsResizeable(boolean rowsResizeable)
Grid
. The default is
'false'.
If a row in a Grid
is resizeable, then the user can
interactively change its height by dragging the border of the row header.
Note that for rows to be resizable the row headers must be visible.
rowsResizeable
- true if this Grid
's rows should be resizableorg.eclipse.swt.SWTException
- setRowHeaderVisible(boolean)
public GridItem[] getItems()
GridItem
s which are the items in
the receiver.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- public int getIndexOfItem(GridItem item)
item
- public org.eclipse.swt.graphics.Color getLineColor()
org.eclipse.swt.SWTException
- public boolean getLinesVisible()
org.eclipse.swt.SWTException
- public boolean getTreeLinesVisible()
org.eclipse.swt.SWTException
- public GridItem getNextVisibleItem(GridItem item)
item
- itemorg.eclipse.swt.SWTException
- public GridItem getPreviousVisibleItem(GridItem item)
item
- item or nullorg.eclipse.swt.SWTException
- public GridColumn getPreviousVisibleColumn(GridColumn column)
column
- columnorg.eclipse.swt.SWTException
- public GridColumn getNextVisibleColumn(GridColumn column)
column
- columnorg.eclipse.swt.SWTException
- public int getRootItemCount()
org.eclipse.swt.SWTException
- public GridItem[] getRootItems()
GridItem
s which are the root
items in the receiver.
Note: This is not the actual structure used by the receiver to maintain its list of items, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- public GridItem getRootItem(int index)
index
- public IRenderer getRowHeaderRenderer()
org.eclipse.swt.SWTException
- public GridItem[] getSelection()
GridItem
s that are currently selected in the
receiver. The order of the items is unspecified. An empty array indicates
that no items are selected.
Note: This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
If cell selection is enabled, any items which contain at least one selected cell are returned.
org.eclipse.swt.SWTException
- public int getSelectionCount()
org.eclipse.swt.SWTException
- public int getCellSelectionCount()
org.eclipse.swt.SWTException
- public int getSelectionIndex()
org.eclipse.swt.SWTException
- public int[] getSelectionIndices()
Note: This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
If cell selection is enabled, returns the indices of any items which contain at least one selected cell.
org.eclipse.swt.SWTException
- public int getTopIndex()
org.eclipse.swt.SWTException
- int getBottomIndex()
Note that the item with this index is often only partly visible; maybe only a
single line of pixels is visible. Use isShown(GridItem)
to find out.
In extreme cases, getBottomIndex() may return the same value as
getTopIndex()
.
org.eclipse.swt.SWTException
- int getGridHeight()
This includes all rows for visible items (i.e. items that return true on
GridItem.isVisible()
; not only those currently visible on screen)
and the 1 pixel separator between rows.
This does not include the height of the column headers.
int getVisibleGridHeight()
int getVisibleGridWidth()
public IRenderer getTopLeftRenderer()
org.eclipse.swt.SWTException
- public IRenderer getBottomLeftRenderer()
org.eclipse.swt.SWTException
- public int indexOf(GridColumn column)
column
- the search columnjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public int indexOf(GridItem item)
item
- the search itemjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public boolean isRowHeaderVisible()
true
if the receiver's row header is visible, and
false
otherwise.
org.eclipse.swt.SWTException
- public boolean isSelected(int index)
true
if the item is selected, and false
otherwise.
Indices out of range are ignored. If cell selection is enabled, returns true
if the item at the given index contains at least one selected cell.index
- the index of the itemorg.eclipse.swt.SWTException
- public boolean isSelected(GridItem item)
item
- itemjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public boolean isCellSelected(org.eclipse.swt.graphics.Point cell)
cell
- celljava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void remove(int index)
index
- the index for the itemjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void remove(int start, int end)
start
- the start of the rangeend
- the end of the rangejava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void remove(int[] indices)
indices
- the array of indices of the itemsjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- @Deprecated public void removeAll()
org.eclipse.swt.SWTException
- Grid
disposeAllItems and clearItems.. Is fasterpublic void disposeAllItems()
public void removeSelectionListener(org.eclipse.swt.events.SelectionListener listener)
listener
- the listener which should no longer be notifiedorg.eclipse.swt.SWTException
- SelectionListener
,
addSelectionListener(SelectionListener)
public void removeTreeListener(org.eclipse.swt.events.TreeListener listener)
listener
- the listener which should no longer be notifiedorg.eclipse.swt.SWTException
- TreeListener
,
addTreeListener(TreeListener)
public void select(int index)
If cell selection is enabled, selects all cells at the given index.
index
- the index of the item to selectorg.eclipse.swt.SWTException
- public void select(int start, int end)
If an item in the given range is not selected, it is selected. If an item in the given range was already selected, it remains selected. Indices that are out of range are ignored and no items will be selected if start is greater than end. If the receiver is single-select and there is more than one item in the given range, then all indices are ignored.
If cell selection is enabled, all cells within the given range are selected.
start
- the start of the rangeend
- the end of the rangeorg.eclipse.swt.SWTException
- setSelection(int,int)
public void select(int[] indices)
If the item at a given index is not selected, it is selected. If the item at a given index was already selected, it remains selected. Indices that are out of range and duplicate indices are ignored. If the receiver is single-select and multiple indices are specified, then all indices are ignored.
If cell selection is enabled, all cells within the given indices are selected.
indices
- the array of indices for the items to selectjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- setSelection(int[])
public void selectAll()
If the receiver is single-select, do nothing. If cell selection is enabled, all cells are selected.
org.eclipse.swt.SWTException
- public void setEmptyCellRenderer(GridCellRenderer emptyCellRenderer)
emptyCellRenderer
- The emptyCellRenderer to set.org.eclipse.swt.SWTException
- public void setEmptyColumnHeaderRenderer(IRenderer emptyColumnHeaderRenderer)
emptyColumnHeaderRenderer
- The emptyColumnHeaderRenderer to set.org.eclipse.swt.SWTException
- public void setEmptyColumnFooterRenderer(IRenderer emptyColumnFooterRenderer)
emptyColumnFooterRenderer
- The emptyColumnFooterRenderer to set.org.eclipse.swt.SWTException
- public void setEmptyRowHeaderRenderer(IRenderer emptyRowHeaderRenderer)
emptyRowHeaderRenderer
- The emptyRowHeaderRenderer to set.org.eclipse.swt.SWTException
- protected void setHorizontalScrollBarProxy(IScrollBarProxy scroll)
Using this feature, a ScrollBar could be instantiated outside the table, wrapped in IScrollBar and thus be 'connected' to the table.
scroll
- The horizontal scrollbar to set.org.eclipse.swt.SWTException
- protected void setlVerticalScrollBarProxy(IScrollBarProxy scroll)
Using this feature, a ScrollBar could be instantiated outside the table, wrapped in IScrollBar and thus be 'connected' to the table.
scroll
- The vertical scrollbar to set.org.eclipse.swt.SWTException
- public void setFocusRenderer(IRenderer focusRenderer)
focusRenderer
- The focusRenderer to set.org.eclipse.swt.SWTException
- public void setHeaderVisible(boolean show)
true
, and
marks it invisible otherwise.show
- the new visibility stateorg.eclipse.swt.SWTException
- public void setFooterVisible(boolean show)
true
, and
marks it invisible otherwise.show
- the new visibility stateorg.eclipse.swt.SWTException
- public void setLineColor(org.eclipse.swt.graphics.Color lineColor)
lineColor
- The lineColor to set.org.eclipse.swt.SWTException
- public void setLinesVisible(boolean linesVisible)
linesVisible
- Te linesVisible to set.org.eclipse.swt.SWTException
- public void setTreeLinesVisible(boolean treeLinesVisible)
treeLinesVisible
- org.eclipse.swt.SWTException
- public void setRowHeaderRenderer(IRenderer rowHeaderRenderer)
rowHeaderRenderer
- The rowHeaderRenderer to set.org.eclipse.swt.SWTException
- public void setRowHeaderVisible(boolean show)
true
,
and marks it invisible otherwise. When row headers are visible, horizontal
scrolling is always done by column rather than by pixel.show
- the new visibility stateorg.eclipse.swt.SWTException
- public void setRowHeaderVisible(boolean show, int minWidth)
true
,
and marks it invisible otherwise. When row headers are visible, horizontal
scrolling is always done by column rather than by pixel.show
- the new visibility stateminWidth
- the minimun width of the row columnorg.eclipse.swt.SWTException
- public void setSelection(int index)
If cell selection is enabled, all cells within the item at the given index are selected.
index
- the index of the item to selectorg.eclipse.swt.SWTException
- public void setSelection(int start, int end)
Indices that are out of range are ignored and no items will be selected if start is greater than end. If the receiver is single-select and there is more than one item in the given range, then all indices are ignored.
If cell selection is enabled, all cells within the given range are selected.
start
- the start index of the items to selectend
- the end index of the items to selectorg.eclipse.swt.SWTException
- deselectAll()
,
select(int,int)
public boolean isVisibleLinesColumnPack()
true
, column pack is based only with the visible lines (from
topIndex to bottomIndex). false
pack is in default mode.public void setVisibleLinesColumnPack(boolean visibleLinesBasedColumnPack)
true
for column pack based only with
the visible lines.visibleLinesBasedColumnPack
- public void setSelection(int[] indices)
Indices that are out of range and duplicate indices are ignored. If the receiver is single-select and multiple indices are specified, then all indices are ignored.
If cell selection is enabled, all cells within the given indices are selected.
indices
- the indices of the items to selectjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- deselectAll()
,
select(int[])
public void setSelection(GridItem[] _items)
Items that are not in the receiver are ignored. If the receiver is single-select and multiple items are specified, then all items are ignored. If cell selection is enabled, all cells within the given items are selected.
_items
- the array of itemsjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- deselectAll()
,
select(int[])
,
setSelection(int[])
public void setTopIndex(int index)
index
- the index of the top itemorg.eclipse.swt.SWTException
- public void setTopLeftRenderer(IRenderer topLeftRenderer)
topLeftRenderer
- The topLeftRenderer to set.org.eclipse.swt.SWTException
- public void setBottomLeftRenderer(IRenderer bottomLeftRenderer)
bottomLeftRenderer
- The topLeftRenderer to set.org.eclipse.swt.SWTException
- public void showColumn(GridColumn col)
col
- the column to be shownorg.eclipse.swt.SWTException
- boolean isShown(GridItem item)
Grid
's visible on-screen area.
Here, "completely" only refers to the item's height, not its width. This means this method returns true also if some cells are horizontally scrolled away.
item
- org.eclipse.swt.SWTException
- public void showItem(GridItem item)
item
- the item to be shownorg.eclipse.swt.SWTException
- public void showSelection()
org.eclipse.swt.SWTException
- public void setSelectionEnabled(boolean selectionEnabled)
true
.selectionEnabled
- the selection enabled stateorg.eclipse.swt.SWTException
- public boolean getSelectionEnabled()
true
if selection is enabled, false otherwise.org.eclipse.swt.SWTException
- void fireColumnsMoved()
void handlePacked(GridColumn column)
public org.eclipse.swt.graphics.Point getCell(org.eclipse.swt.graphics.Point point)
point
- the point used to locate the itemjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- void updateColumnSelection()
public void disableDefaultKeyListener()
public void enableDefaultKeyListener()
protected void refreshHoverState()
protected void onKeyDown(org.eclipse.swt.widgets.Event e)
e
- eventorg.eclipse.swt.graphics.Point getOrigin(GridColumn column, GridItem item)
column
- columnitem
- itemprotected void updateToolTipText(java.lang.String text)
text
- protected void setScrollValuesObsolete()
int newColumn(GridColumn column, int index)
column
- new columnindex
- index to insert new columnvoid removeColumn(GridColumn column)
column
- column to removevoid newRootItem(GridItem item, int index)
void removeRootItem(GridItem item)
int newItem(GridItem item, int index, boolean root)
item
- new itemindex
- index to insert the item atvoid removeItem(GridItem item)
item
- item to removevoid newColumnGroup(GridColumnGroup group)
GridColumnGroup
's constructor.group
- group to add.void removeColumnGroup(GridColumnGroup group)
GridColumnGroup
's dispose method.group
- group to remove.void updateVisibleItems(int amount)
amount
- amount to update cached totalpublic GridItem getFocusItem()
null
.org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Point getFocusCell()
null
. x represents the column and y the row
the cell is inorg.eclipse.swt.SWTException
- public void setFocusItem(GridItem item)
item
- item to focus.java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setFocusColumn(GridColumn column)
column
- column to focus.java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- GridColumn[] getColumnsInOrder()
public boolean getColumnScrolling()
org.eclipse.swt.SWTException
- public void setColumnScrolling(boolean columnScrolling)
columnScrolling
- true to horizontally scroll by column, false to scroll by pixelorg.eclipse.swt.SWTException
- GridColumn getVisibleColumn_DegradeLeft(GridItem item, GridColumn col)
item
- col
- GridColumn getVisibleColumn_DegradeRight(GridItem item, GridColumn col)
item
- col
- public boolean getCellSelectionEnabled()
org.eclipse.swt.SWTException
- public void setCellSelectionEnabled(boolean cellSelection)
cellSelection
- the cellSelection to setorg.eclipse.swt.SWTException
- public boolean isCellSelectionEnabled()
true
if cell selection is enabledpublic void setCellDragSelectionEnabled(boolean cellDragSelection)
cellDragSelection
- the cellDragSelection to setorg.eclipse.swt.SWTException
- public boolean isCellDragSelectionEnabled()
true
if cell drag selection is enabledpublic void deselectCell(org.eclipse.swt.graphics.Point cell)
cell
- cell to deselect.java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void deselectCells(org.eclipse.swt.graphics.Point[] cells)
cells
- the cells to deselect.java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void deselectAllCells()
org.eclipse.swt.SWTException
- public void selectCell(org.eclipse.swt.graphics.Point cell)
cell
- point whose x values is a column index and y value is an item
indexjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void selectCells(org.eclipse.swt.graphics.Point[] cells)
cells
- an arry of points whose x value is a column index and y value is
an item indexjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void selectAllCells()
org.eclipse.swt.SWTException
- public void selectColumn(int col)
col
- org.eclipse.swt.SWTException
- public void selectColumnGroup(int colGroup)
colGroup
- the column grouporg.eclipse.swt.SWTException
- public void selectColumnGroup(GridColumnGroup colGroup)
colGroup
- the column grouporg.eclipse.swt.SWTException
- public void setCellSelection(org.eclipse.swt.graphics.Point cell)
cell
- point whose x values is a column index and y value is an item
indexjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public void setCellSelection(org.eclipse.swt.graphics.Point[] cells)
cells
- point array whose x values is a column index and y value is an
item indexjava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- public org.eclipse.swt.graphics.Point[] getCellSelection()
Note: This is not the actual structure used by the receiver to maintain its selection, so modifying the array will not affect the receiver.
org.eclipse.swt.SWTException
- GridColumn getFocusColumn()
void updateColumnFocus()
protected void showToolTip(GridItem item, GridColumn column, GridColumnGroup group, org.eclipse.swt.graphics.Point location)
This method may be overriden to provide their own custom tooltips.
item
- the item currently hovered over or null.column
- the column currently hovered over or null.group
- the group currently hovered over or null.location
- the x,y origin of the text in the hovered object.protected void hideToolTip()
This method must be overriden when showToolTip is overriden. Subclasses must call super when overriding this method.
void recalculateRowHeaderHeight(GridItem item, int oldHeight, int newHeight)
void recalculateRowHeaderWidth(GridItem item, int oldWidth, int newWidth)
public void setFont(org.eclipse.swt.graphics.Font font)
setFont
in class org.eclipse.swt.widgets.Canvas
public int getItemHeaderWidth()
org.eclipse.swt.SWTException
- public void setItemHeaderWidth(int width)
width
- the width of the row headergetItemHeaderWidth()
,
setAutoWidth(boolean)
public void setItemCount(int count)
count
- the number of itemsorg.eclipse.swt.SWTException
- boolean isDisposing()
void setHasSpanning(boolean hasSpanning)
hasSpanning
- the hasSpanning to setpublic java.lang.String getToolTipText()
getToolTipText
in class org.eclipse.swt.widgets.Control
org.eclipse.swt.SWTException
- public void setToolTipText(java.lang.String string)
setToolTipText
in class org.eclipse.swt.widgets.Control
string
- the new tool tip text (or null)org.eclipse.swt.SWTException
- void imageSetOnItem(int column, GridItem item)
column
- the column the image is changeitem
- item which images has just been set on.void setInsertMark(GridItem item, GridColumn column, boolean before)
DND.FEEDBACK_INSERT_BEFORE
or DND.FEEDBACK_INSERT_AFTER
should be set in DropTargetEvent.feedback
from within a
DropTargetListener
.item
- the insert item. Null will clear the insertion mark.column
- the column of the cell. Null will make the insertion mark span all
columns.before
- true places the insert mark above 'item'. false places the insert
mark below 'item'.java.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- boolean isInDragScrollArea(org.eclipse.swt.graphics.Point point)
GridDropTargetEffect.dragOver(DropTargetEvent)
.point
- public void clear(int index, boolean allChildren)
SWT.VIRTUAL
style, these attributes
are requested again as needed.index
- the index of the item to clearallChildren
- true
if all child items of the indexed item should be
cleared recursively, and false
otherwisejava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SWT.VIRTUAL
,
SWT.SetData
public void clear(int start, int end, boolean allChildren)
SWT.VIRTUAL
style, these attributes are requested again as
needed.start
- the start index of the item to clearend
- the end index of the item to clearallChildren
- true
if all child items of the range of items should
be cleared recursively, and false
otherwisejava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SWT.VIRTUAL
,
SWT.SetData
public void clear(int[] indices, boolean allChildren)
SWT.VIRTUAL
style, these
attributes are requested again as needed.indices
- the array of indices of the itemsallChildren
- true
if all child items of the indexed items should
be cleared recursively, and false
otherwisejava.lang.IllegalArgumentException
- org.eclipse.swt.SWTException
- SWT.VIRTUAL
,
SWT.SetData
public void clearAll(boolean allChildren)
SWT.VIRTUAL
style, these attributes are requested again as
needed.allChildren
- true
if all child items of each item should be
cleared recursively, and false
otherwiseorg.eclipse.swt.SWTException
- SWT.VIRTUAL
,
SWT.SetData
public void recalculateHeader()
public Grid.GridVisibleRange getVisibleRange()
This support is provisional and may change
int getStartColumnIndex()
int getEndColumnIndex()
void setSizeOnEveryItemImageChange(boolean sizeOnEveryItemImageChange)
public int getRowHeaderWidth()
org.eclipse.swt.SWTException
- public void setAutoHeight(boolean enabled)
enabled
- Set to true to enable this feature, false (default) otherwise.public boolean isAutoHeight()
setAutoHeight(boolean)
public void setAutoWidth(boolean enabled)
enabled
- Set to true to enable this feature, false (default) otherwise.isAutoWidth()
public boolean isAutoWidth()
setAutoWidth(boolean)
public void setWordWrapHeader(boolean enabled)
enabled
- Set to true to enable this feature, false (default) otherwise.isWordWrapHeader()
public void setForeground(org.eclipse.swt.graphics.Color color)
setForeground
in class org.eclipse.swt.widgets.Control
Control.setForeground(org.eclipse.swt.graphics.Color)
public boolean isWordWrapHeader()
setWordWrapHeader(boolean)
public void refreshData()
public boolean isMoveOnTab()
true
if the mouse navigation is enabled on tab/shift tabpublic void setMoveOnTab(boolean moveOnTab)
moveOnTab
- if true
, navigation with tab key is enabled.public boolean isFocusOnGrid()
public void setSelectionType(GridSelectionType selectionType)
selectionType
- the new selection typepublic void addMouseListener(org.eclipse.swt.events.MouseListener sourceListener)
addMouseListener
in class org.eclipse.swt.widgets.Control
Control.addMouseListener(org.eclipse.swt.events.MouseListener)
public void addListener(int eventType, org.eclipse.swt.widgets.Listener listener)
addListener
in class org.eclipse.swt.widgets.Widget
Widget.addListener(int,
org.eclipse.swt.widgets.Listener)