Class TableExItem
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Item
-
- com._1c.g5.v8.dt.common.ui.widgets.tableex.TableExItem
-
public class TableExItem extends org.eclipse.swt.widgets.Item
Строка таблицы TableEx
-
-
Constructor Summary
Constructors Constructor Description TableExItem(TableExItem parent, int style, int index, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
ConstructorTableExItem(TableExItem parent, int style, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
ConstructorTableExItem(TableEx parent, int style, int index, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
ConstructorTableExItem(TableEx parent, int style, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCellEditor(int colIndex, TableExEditor editor)
Установить редактор ячейкиvoid
clear()
Очистить ячейкуvoid
dispose()
void
fireCheckEvent(int column)
Notify listeners of checkboxesvoid
fireEvent(int eventId)
Сгенерировать событиеvoid
fireSelectionEvent(org.eclipse.swt.graphics.Point p)
Сгенерировать событие выделенияint
getAlignment(int columnIndex)
Получить выравниваниеorg.eclipse.swt.graphics.Color
getBackground(int columnIndex)
Получить цвет фонаorg.eclipse.swt.graphics.Rectangle
getBounds(int colIndex)
Получить границы ячейкиint
getDataColumn(int colIndex)
Получить колонку грида данныхorg.eclipse.nebula.widgets.grid.GridItem
getDataItem(int colIndex)
Получить строку грида данныхTableExEditor
getEditor(int colIndex)
Получить редактор колонкиorg.eclipse.swt.graphics.Font
getFont(int columnIndex)
Получить шрифтorg.eclipse.swt.graphics.Color
getForeground(int columnIndex)
Получить цвет текстаList<org.eclipse.nebula.widgets.grid.GridItem>
getGridItems()
Получить строки Grid-а, из которых состоит данная строка TableExorg.eclipse.swt.graphics.Image
getImage(int columnIndex)
Получить изображение ячейкиint
getIndex()
Получить индекс ячейкиint
getItemCount()
Получить число дочерних строкTableExItem[]
getItems()
Получить дочерние строкиint
getLevel()
Получить уровень в иерархииTableEx
getParent()
Получить таблицуTableExItem
getParentItem()
Получить родительскую строкуString
getText()
String
getText(int columnIndex)
Получить текст ячейкиboolean
hasChildren()
Получить признак того, что строка имеет дочерниеint
indexOf(TableExItem item)
Получить индекс дочерней строкиboolean
isCheckBoxEnable(int columnIndex)
Checkbox for column enableboolean
isCheckBoxSelected(int columnIndex)
Checkbox for column is selectedboolean
isCheckBoxVisible(int columnIndex)
Checkbox for column visibleboolean
isExpanded()
Получить признак развернутости строкиboolean
isVisible()
Получить видимость строкиvoid
setAlignment(int columnIndex, int alignment)
Установить выравниваниеvoid
setBackground(int columnIndex, org.eclipse.swt.graphics.Color color)
Установить цвет фонаvoid
setData(Object data)
void
setExpanded(boolean expanded)
Раскрыть/свернутьvoid
setFont(int columnIndex, org.eclipse.swt.graphics.Font font)
Установить шрифтvoid
setForeground(int colIndex, org.eclipse.swt.graphics.Color color)
Установить цвет шрифта ячейкиvoid
setImage(int colIndex, org.eclipse.swt.graphics.Image image)
Установить изображение ячейкиvoid
setText(int colIndex, String text)
Установить текст ячейкиvoid
setVisible(boolean visible)
Установить видимость строкиvoid
update()
Update item-
Methods inherited from class org.eclipse.swt.widgets.Item
checkSubclass, getImage, setImage, setText
-
-
-
-
Constructor Detail
-
TableExItem
public TableExItem(TableEx parent, int style, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
Constructor- Parameters:
parent
- parent table, can't be nullstyle
- swt stylecheckLabelProvider
- label provider for checkboxes, can be nullcheckBoxListener
- listener for checkboxes, can be null
-
TableExItem
public TableExItem(TableEx parent, int style, int index, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
Constructor- Parameters:
parent
- parent table, can't be nullstyle
- swt styleindex
- item indexcheckLabelProvider
- label provider for checkboxes, can be nullcheckBoxListener
- listener for checkboxes, can be null
-
TableExItem
public TableExItem(TableExItem parent, int style, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
Constructor- Parameters:
parent
- parent item, can't be nullstyle
- swt stylecheckLabelProvider
- label provider for checkboxes, can be nullcheckBoxListener
- listener for checkboxes, can be null
-
TableExItem
public TableExItem(TableExItem parent, int style, int index, ICheckBoxLabelProvider checkLabelProvider, ICheckBoxListener checkBoxListener)
Constructor- Parameters:
parent
- parent item, can't be nullstyle
- swt styleindex
- item indexcheckLabelProvider
- label provider for checkboxes, can be nullcheckBoxListener
- listener for checkboxes, can be null
-
-
Method Detail
-
getLevel
public int getLevel()
Получить уровень в иерархии- Returns:
- уровень
-
isVisible
public boolean isVisible()
Получить видимость строки- Returns:
- видимость
-
setVisible
public void setVisible(boolean visible)
Установить видимость строки- Parameters:
visible
- видимость
-
isExpanded
public boolean isExpanded()
Получить признак развернутости строки- Returns:
- строка развернута
-
setImage
public void setImage(int colIndex, org.eclipse.swt.graphics.Image image)
Установить изображение ячейки- Parameters:
colIndex
- индекс колонкиimage
- изображение
-
setText
public void setText(int colIndex, String text)
Установить текст ячейки- Parameters:
colIndex
- индекс колонкиtext
- текст
-
getParent
public TableEx getParent()
Получить таблицу- Returns:
- таблица
-
getImage
public org.eclipse.swt.graphics.Image getImage(int columnIndex)
Получить изображение ячейки- Parameters:
columnIndex
- индекс колонки- Returns:
- изображение
-
getText
public String getText(int columnIndex)
Получить текст ячейки- Parameters:
columnIndex
- индекс колонки- Returns:
- текст
-
setForeground
public void setForeground(int colIndex, org.eclipse.swt.graphics.Color color)
Установить цвет шрифта ячейки- Parameters:
colIndex
- индекс колонкиcolor
- цвет
-
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds(int colIndex)
Получить границы ячейки- Parameters:
colIndex
- индекс колонки- Returns:
- границы
-
dispose
public void dispose()
- Overrides:
dispose
in classorg.eclipse.swt.widgets.Widget
-
getText
public String getText()
- Overrides:
getText
in classorg.eclipse.swt.widgets.Item
-
getIndex
public int getIndex()
Получить индекс ячейки- Returns:
- индекс
-
addCellEditor
public void addCellEditor(int colIndex, TableExEditor editor)
Установить редактор ячейки- Parameters:
colIndex
- колонкаeditor
- редактор
-
clear
public void clear()
Очистить ячейку
-
getDataItem
public org.eclipse.nebula.widgets.grid.GridItem getDataItem(int colIndex)
Получить строку грида данных- Parameters:
colIndex
- индекс колонки- Returns:
- строка
-
getDataColumn
public int getDataColumn(int colIndex)
Получить колонку грида данных- Parameters:
colIndex
- индекс колонки- Returns:
- колонка
-
getItems
public TableExItem[] getItems()
Получить дочерние строки- Returns:
- дочерние строки
-
getParentItem
public TableExItem getParentItem()
Получить родительскую строку- Returns:
- строка
-
setExpanded
public void setExpanded(boolean expanded)
Раскрыть/свернуть- Parameters:
expanded
- раскрыть
-
getItemCount
public int getItemCount()
Получить число дочерних строк- Returns:
- число дочерних строк
-
hasChildren
public boolean hasChildren()
Получить признак того, что строка имеет дочерние- Returns:
- признак
-
fireEvent
public void fireEvent(int eventId)
Сгенерировать событие- Parameters:
eventId
- событие
-
fireSelectionEvent
public void fireSelectionEvent(org.eclipse.swt.graphics.Point p)
Сгенерировать событие выделения- Parameters:
p
- координаты
-
fireCheckEvent
public void fireCheckEvent(int column)
Notify listeners of checkboxes- Parameters:
column
- index of column
-
getGridItems
public List<org.eclipse.nebula.widgets.grid.GridItem> getGridItems()
Получить строки Grid-а, из которых состоит данная строка TableEx- Returns:
- строки Grid-а
-
indexOf
public int indexOf(TableExItem item)
Получить индекс дочерней строки- Parameters:
item
- строка- Returns:
- индекс
-
setBackground
public void setBackground(int columnIndex, org.eclipse.swt.graphics.Color color)
Установить цвет фона- Parameters:
columnIndex
- колонкаcolor
- цвет
-
getBackground
public org.eclipse.swt.graphics.Color getBackground(int columnIndex)
Получить цвет фона- Parameters:
columnIndex
- колонка- Returns:
- цвет
-
getForeground
public org.eclipse.swt.graphics.Color getForeground(int columnIndex)
Получить цвет текста- Parameters:
columnIndex
- колонка- Returns:
- цвет
-
getFont
public org.eclipse.swt.graphics.Font getFont(int columnIndex)
Получить шрифт- Parameters:
columnIndex
- колонка- Returns:
- шрифт
-
setFont
public void setFont(int columnIndex, org.eclipse.swt.graphics.Font font)
Установить шрифт- Parameters:
columnIndex
- колонкаfont
- шрифт
-
getEditor
public TableExEditor getEditor(int colIndex)
Получить редактор колонки- Parameters:
colIndex
- индекс колонки- Returns:
- редактор
-
isCheckBoxVisible
public boolean isCheckBoxVisible(int columnIndex)
Checkbox for column visible- Parameters:
column
- table column, can't be null- Returns:
- true if checkbox exists and visible, false otherwise
-
isCheckBoxEnable
public boolean isCheckBoxEnable(int columnIndex)
Checkbox for column enable- Parameters:
column
- table column, can't be null- Returns:
- true if checkbox exists and enable, false otherwise
-
isCheckBoxSelected
public boolean isCheckBoxSelected(int columnIndex)
Checkbox for column is selected- Parameters:
column
- table column, can't be null- Returns:
- true if checkbox exists and selected, false otherwise
-
setData
public void setData(Object data)
- Overrides:
setData
in classorg.eclipse.swt.widgets.Widget
-
getAlignment
public int getAlignment(int columnIndex)
Получить выравнивание- Parameters:
columnIndex
- колонка- Returns:
- выравнивание
-
setAlignment
public void setAlignment(int columnIndex, int alignment)
Установить выравнивание- Parameters:
columnIndex
- колонкаalignment
- выравнивание
-
update
public void update()
Update item
-
-