pl.netanel.swt.matrix
Class Grouping.CellPainter

java.lang.Object
  extended by pl.netanel.swt.matrix.Painter<X,Y>
      extended by pl.netanel.swt.matrix.reloaded.CellImageButtonPainter<java.lang.Integer,java.lang.Integer>
          extended by pl.netanel.swt.matrix.Grouping.CellPainter
Enclosing class:
Grouping

public class Grouping.CellPainter
extends CellImageButtonPainter<java.lang.Integer,java.lang.Integer>


Field Summary
 
Fields inherited from class pl.netanel.swt.matrix.Painter
availableTextArea, collapsedImage, expanded, expandedImage, extent, frozenX, frozenY, gc, hasChildren, image, imagesAfter, imagesBefore, isSelected, NAME_BACKGORUND, NAME_CELLS, NAME_DRAG_ITEM_X, NAME_DRAG_ITEM_Y, NAME_EMBEDDED_CONTROLS, NAME_EMULATED_CONTROLS, NAME_FOCUS_CELL, NAME_FREEZE_HEAD_LINE_X, NAME_FREEZE_HEAD_LINE_Y, NAME_FREEZE_TAIL_LINE_X, NAME_FREEZE_TAIL_LINE_Y, NAME_FROZEN_HEAD_HEAD, NAME_FROZEN_HEAD_NONE, NAME_FROZEN_HEAD_TAIL, NAME_FROZEN_NONE_HEAD, NAME_FROZEN_NONE_NONE, NAME_FROZEN_NONE_TAIL, NAME_FROZEN_TAIL_HEAD, NAME_FROZEN_TAIL_NONE, NAME_FROZEN_TAIL_TAIL, NAME_LINES_X, NAME_LINES_Y, nodeImageSize, SCOPE_CELLS, SCOPE_CELLS_ITEM_X, SCOPE_CELLS_ITEM_Y, SCOPE_CELLS_X, SCOPE_CELLS_Y, SCOPE_ENTIRE, SCOPE_LINES_X, SCOPE_LINES_Y, selectionHighlight, style, text, textLayout
 
Constructor Summary
Grouping.CellPainter()
           
 
Method Summary
 java.lang.Boolean getToggleState(java.lang.Integer indexX, java.lang.Integer indexY)
          Returns a three state toggle status of the given cell with the following consequences: null - no image displayed true - trueImage displayed false - falseImage displayed
protected  boolean init()
          Allows graphic optimization by performing operation that can be taken out of the cell painting loop.
 void setup(java.lang.Integer indexX, java.lang.Integer indexY)
          Configures the painter properties according to the given indexes.
 void setupSpatial(java.lang.Integer indexX, java.lang.Integer indexY)
          Overrides the default method setting the image related to toggle state.
 
Methods inherited from class pl.netanel.swt.matrix.reloaded.CellImageButtonPainter
isOverImage, setToggleImages
 
Methods inherited from class pl.netanel.swt.matrix.Painter
align, clean, clipText, computeSize, computeTextSize, dispose, getData, getImageAt, getName, getScope, getZone, hasTreeLinesVisible, isEnabled, isTreeEnabled, paint, setData, setEnabled, setNodeImages, setTreeLinesVisible, setTreeVisible, trackPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Grouping.CellPainter

public Grouping.CellPainter()
Method Detail

init

protected boolean init()
Description copied from class: Painter
Allows graphic optimization by performing operation that can be taken out of the cell painting loop.

If this method returns false the Painter.paint(int, int, int, int) and Painter.clean() methods will not be executed.

Overrides:
init in class Painter<java.lang.Integer,java.lang.Integer>
Returns:
true if the initialization succeeded or false otherwise.
See Also:
clean()

getToggleState

public java.lang.Boolean getToggleState(java.lang.Integer indexX,
                                        java.lang.Integer indexY)
Description copied from class: CellImageButtonPainter
Returns a three state toggle status of the given cell with the following consequences:
  • null - no image displayed
  • true - trueImage displayed
  • false - falseImage displayed

    Overrides:
    getToggleState in class CellImageButtonPainter<java.lang.Integer,java.lang.Integer>
    Returns:

  • setupSpatial

    public void setupSpatial(java.lang.Integer indexX,
                             java.lang.Integer indexY)
    Description copied from class: CellImageButtonPainter
    Overrides the default method setting the image related to toggle state.

    Overrides:
    setupSpatial in class CellImageButtonPainter<java.lang.Integer,java.lang.Integer>
    Parameters:
    indexX - cell index on the horizontal axis
    indexY - cell index on the vertical axis

    setup

    public void setup(java.lang.Integer indexX,
                      java.lang.Integer indexY)
    Description copied from class: Painter
    Configures the painter properties according to the given indexes.

    Default implementation invokes Painter.setupSpatial(Number, Number) and determines if the cell is selected, therefore when overridden should call super.setup.

    Overrides:
    setup in class Painter<java.lang.Integer,java.lang.Integer>
    Parameters:
    indexX - cell index on the horizontal axis
    indexY - cell index on the vertical axis


    Copyright © 2011 netanel.pl. All Rights Reserved.