Class 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 - наше сокращение строк, цвет, дерево и т.п.)
    • 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
      • Methods inherited from interface org.eclipse.nebula.widgets.grid.IRenderer

        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 class org.eclipse.nebula.widgets.grid.GridCellRenderer
      • setCheck

        public void setCheck​(boolean check)
        Overrides:
        setCheck in class org.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 class org.eclipse.nebula.widgets.grid.GridCellRenderer
      • setEdited

        public void setEdited​(boolean edited,
                              TableExItem item)
        Установить признак редактирования
        Parameters:
        edited -
        item -