Class TableExItem


  • public class TableExItem
    extends org.eclipse.swt.widgets.Item
    Строка таблицы TableEx
    • 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 checkboxes
      void 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-а, из которых состоит данная строка TableEx
      org.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 enable
      boolean isCheckBoxSelected​(int columnIndex)
      Checkbox for column is selected
      boolean isCheckBoxVisible​(int columnIndex)
      Checkbox for column visible
      boolean 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
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, toString
    • Constructor Detail

      • TableExItem

        public TableExItem​(TableEx parent,
                           int style,
                           ICheckBoxLabelProvider checkLabelProvider,
                           ICheckBoxListener checkBoxListener)
        Constructor
        Parameters:
        parent - parent table, can't be null
        style - swt style
        checkLabelProvider - label provider for checkboxes, can be null
        checkBoxListener - 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 null
        style - swt style
        index - item index
        checkLabelProvider - label provider for checkboxes, can be null
        checkBoxListener - 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 null
        style - swt style
        checkLabelProvider - label provider for checkboxes, can be null
        checkBoxListener - 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 null
        style - swt style
        index - item index
        checkLabelProvider - label provider for checkboxes, can be null
        checkBoxListener - 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 class org.eclipse.swt.widgets.Widget
      • getText

        public String getText()
        Overrides:
        getText in class org.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 class org.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