pl.netanel.swt.matrix
Class Grouping.SeparatorPainter

java.lang.Object
  extended by pl.netanel.swt.matrix.Painter<java.lang.Integer,java.lang.Integer>
      extended by pl.netanel.swt.matrix.Grouping.SeparatorPainter
Enclosing class:
Grouping

public class Grouping.SeparatorPainter
extends Painter<java.lang.Integer,java.lang.Integer>


Field Summary
protected  int axisDirection
           
protected  Color background
           
protected  Rectangle clipping
           
protected  int contentSize
           
protected  int lineWidth
           
protected  Grouping.Node node
           
 
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.SeparatorPainter(int axisDirection)
           
 
Method Summary
 void clean()
          Restores the default GC settings modified by modified by in Painter.init() or Painter.paint(int, int, int, int).
protected  boolean init()
          Allows graphic optimization by performing operation that can be taken out of the cell painting loop.
protected  void paint(int x, int y, int width, int height)
          Draws on the canvas within the given boundaries according to the given indexes.
 void setup(java.lang.Integer indexX, java.lang.Integer indexY)
          Configures the painter properties according to the given indexes.
 
Methods inherited from class pl.netanel.swt.matrix.Painter
align, clipText, computeSize, computeTextSize, dispose, getData, getImageAt, getName, getScope, getZone, hasTreeLinesVisible, isEnabled, isTreeEnabled, setData, setEnabled, setNodeImages, setTreeLinesVisible, setTreeVisible, setupSpatial, trackPosition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

background

protected Color background

lineWidth

protected int lineWidth

axisDirection

protected final int axisDirection

node

protected Grouping.Node node

contentSize

protected int contentSize

clipping

protected Rectangle clipping
Constructor Detail

Grouping.SeparatorPainter

public Grouping.SeparatorPainter(int axisDirection)
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()

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

paint

protected void paint(int x,
                     int y,
                     int width,
                     int height)
Description copied from class: Painter
Draws on the canvas within the given boundaries according to the given indexes.

Overrides:
paint in class Painter<java.lang.Integer,java.lang.Integer>
Parameters:
x - the x coordinate of the painting boundaries
y - the y coordinate of the painting boundaries
width - the width of the painting boundaries
height - the height of the painting boundaries

clean

public void clean()
Description copied from class: Painter
Restores the default GC settings modified by modified by in Painter.init() or Painter.paint(int, int, int, int).

Overrides:
clean in class Painter<java.lang.Integer,java.lang.Integer>
See Also:
init()


Copyright © 2011 netanel.pl. All Rights Reserved.