Class TableExCellRenderer
- java.lang.Object
-
- org.eclipse.nebula.widgets.grid.AbstractRenderer
-
- org.eclipse.nebula.widgets.grid.AbstractInternalWidget
-
- org.eclipse.nebula.widgets.grid.GridCellRenderer
-
- com._1c.g5.v8.dt.common.ui.widgets.tableex.TableExCellRenderer
-
- All Implemented Interfaces:
org.eclipse.nebula.widgets.grid.IInternalWidget
,org.eclipse.nebula.widgets.grid.IRenderer
public class TableExCellRenderer extends org.eclipse.nebula.widgets.grid.GridCellRenderer
Отрисовщик ячейки таблицы TableEx (доработан GridCellRenderer - наше сокращение строк, цвет, дерево и т.п.)
-
-
Field Summary
Fields Modifier and Type Field Description static int
MARGIN_BOTTOM
static int
MARGIN_INSIDE
static int
MARGIN_LEFT
static int
MARGIN_RIGHT
static int
MARGIN_TOP
static int
TEXT_MARGIN_BOTTOM
static int
TEXT_MARGIN_TOP
static int
TREE_INDENT
-
Constructor Summary
Constructors Constructor Description TableExCellRenderer(TableEx table)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.swt.graphics.Point
computeSize(org.eclipse.swt.graphics.GC gc, int wHint, int hHint, Object value)
org.eclipse.swt.graphics.Rectangle
getTextBounds(org.eclipse.nebula.widgets.grid.GridItem item, boolean preferred)
boolean
notify(int event, org.eclipse.swt.graphics.Point point, Object value)
void
paint(org.eclipse.swt.graphics.GC gc, Object value)
void
setBackground(org.eclipse.swt.graphics.Color color, boolean gradient)
Установить фоновый цветvoid
setCheck(boolean check)
void
setEdited(boolean edited, TableExItem item)
Установить признак редактированияvoid
setLinesColor(org.eclipse.swt.graphics.Color color)
Установить цвет линий границ ячейкиvoid
setTree(boolean tree)
-
Methods inherited from class org.eclipse.nebula.widgets.grid.GridCellRenderer
getAlignment, getColumn, getRow, isCellFocus, isCellSelected, isCheck, isColumnHover, isDragging, isRowFocus, isRowHover, isTree, isWordWrap, setAlignment, setCellFocus, setCellSelected, setColumn, setColumnHover, setDragging, setRow, setRowFocus, setRowHover, setWordWrap
-
Methods inherited from class org.eclipse.nebula.widgets.grid.AbstractInternalWidget
getHoverDetail, setHoverDetail
-
Methods inherited from class org.eclipse.nebula.widgets.grid.AbstractRenderer
getBounds, getDisplay, getSize, isExpanded, isFocus, isHover, isMouseDown, isSelected, setBounds, setBounds, setDisplay, setExpanded, setFocus, setHover, setLocation, setLocation, setMouseDown, setSelected, setSize, setSize
-
-
-
-
Field Detail
-
TREE_INDENT
public static int TREE_INDENT
-
TEXT_MARGIN_TOP
public static int TEXT_MARGIN_TOP
-
TEXT_MARGIN_BOTTOM
public static int TEXT_MARGIN_BOTTOM
-
MARGIN_TOP
public static int MARGIN_TOP
-
MARGIN_RIGHT
public static int MARGIN_RIGHT
-
MARGIN_BOTTOM
public static int MARGIN_BOTTOM
-
MARGIN_LEFT
public static int MARGIN_LEFT
-
MARGIN_INSIDE
public static int MARGIN_INSIDE
-
-
Constructor Detail
-
TableExCellRenderer
public TableExCellRenderer(TableEx table)
- Parameters:
table
- родительская таблица
-
-
Method Detail
-
setBackground
public void setBackground(org.eclipse.swt.graphics.Color color, boolean gradient)
Установить фоновый цвет- Parameters:
color
- цветgradient
- использовать градиент
-
setLinesColor
public void setLinesColor(org.eclipse.swt.graphics.Color color)
Установить цвет линий границ ячейки- Parameters:
color
- цвет
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, Object value)
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, int wHint, int hHint, Object value)
-
notify
public boolean notify(int event, org.eclipse.swt.graphics.Point point, Object value)
-
setTree
public void setTree(boolean tree)
- Overrides:
setTree
in classorg.eclipse.nebula.widgets.grid.GridCellRenderer
-
setCheck
public void setCheck(boolean check)
- Overrides:
setCheck
in classorg.eclipse.nebula.widgets.grid.GridCellRenderer
-
getTextBounds
public org.eclipse.swt.graphics.Rectangle getTextBounds(org.eclipse.nebula.widgets.grid.GridItem item, boolean preferred)
- Overrides:
getTextBounds
in classorg.eclipse.nebula.widgets.grid.GridCellRenderer
-
setEdited
public void setEdited(boolean edited, TableExItem item)
Установить признак редактирования- Parameters:
edited
-item
-
-
-