pl.netanel.swt.matrix
Class Style

java.lang.Object
  extended by pl.netanel.swt.matrix.Style

public class Style
extends java.lang.Object

Graphical style properties used by painters.


Field Summary
 Color background
          Background color.
 Font font
          Font for the text.
 Color foreground
          Foreground color.
 boolean hasLineBreaks
          Indicates text in the cells can have hard line breaks.
 boolean hasWordWraping
          Word wrapping for text in cells.
 int imageAlignX
          Horizontal image alignment.
 int imageAlignY
          Vertical image alignment.
 int imageMarginBottom
          Bottom image margin.
 int imageMarginLeft
          Left image margin.
 int imageMarginRight
          Right image margin.
 int imageMarginTop
          Top image margin.
 int imageMarginX
          Horizontal image margin.
 int imageMarginY
          Vertical image margin.
 Color selectionBackground
          Background color of selected cells.
 Color selectionForeground
          Foreground color of selected cells.
 int textAlignX
          Horizontal text alignment.
 int textAlignY
          Vertical text alignment.
 int textMarginBottom
          Bottom text margin.
 int textMarginLeft
          Left text margin.
 int textMarginRight
          Right text margin.
 int textMarginTop
          Top text margin.
 int textMarginX
          Horizontal text margin.
 int textMarginY
          Vertical text margin.
 
Constructor Summary
Style()
           
 
Method Summary
static Style createBodyCellStyle()
          Creates a default style for the cells of the body zone.
static Style createBodyLineStyle()
          Creates a default style for the lines of the body zone.
static Style createHeaderCellStyle()
          Creates a default style for the cells of the header type of zones.
static Style createHeaderLineStyle()
          Creates a default style for the lines of the header type of zones.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

foreground

public Color foreground
Foreground color.


background

public Color background
Background color.


selectionForeground

public Color selectionForeground
Foreground color of selected cells.


selectionBackground

public Color selectionBackground
Background color of selected cells.


textAlignX

public int textAlignX
Horizontal text alignment. One of the following constants defined in class SWT: SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.BEGINING, SWT.END.


textAlignY

public int textAlignY
Vertical text alignment. One of the following constants defined in class SWT: SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.BEGINING, SWT.END.


imageAlignX

public int imageAlignX
Horizontal image alignment. One of the following constants defined in class SWT: SWT.LEFT, SWT.RIGHT, SWT.CENTER, SWT.BEGINING, SWT.END.


imageAlignY

public int imageAlignY
Vertical image alignment. One of the following constants defined in class SWT: SWT.TOP, SWT.BOTTOM, SWT.CENTER, SWT.BEGINING, SWT.END.


textMarginX

public int textMarginX
Horizontal text margin. It is measured from the cell boundaries (which don't include dividing lines).


textMarginY

public int textMarginY
Vertical text margin. It is measured from the cell boundaries (which don't include dividing lines).


textMarginLeft

public int textMarginLeft
Left text margin. It is measured from the cell boundaries (which don't include dividing lines).


textMarginRight

public int textMarginRight
Right text margin. It is measured from the cell boundaries (which don't include dividing lines).


textMarginTop

public int textMarginTop
Top text margin. It is measured from the cell boundaries (which don't include dividing lines).


textMarginBottom

public int textMarginBottom
Bottom text margin. It is measured from the cell boundaries (which don't include dividing lines).


imageMarginX

public int imageMarginX
Horizontal image margin. It is measured from the cell boundaries (which don't include dividing lines).


imageMarginY

public int imageMarginY
Vertical image margin. It is measured from the cell boundaries (which don't include dividing lines).


imageMarginLeft

public int imageMarginLeft
Left image margin. It is measured from the cell boundaries (which don't include dividing lines).


imageMarginRight

public int imageMarginRight
Right image margin. It is measured from the cell boundaries (which don't include dividing lines).


imageMarginTop

public int imageMarginTop
Top image margin. It is measured from the cell boundaries (which don't include dividing lines).


imageMarginBottom

public int imageMarginBottom
Bottom image margin. It is measured from the cell boundaries (which don't include dividing lines).


font

public Font font
Font for the text.


hasWordWraping

public boolean hasWordWraping
Word wrapping for text in cells.


hasLineBreaks

public boolean hasLineBreaks
Indicates text in the cells can have hard line breaks.

Constructor Detail

Style

public Style()
Method Detail

createBodyCellStyle

public static Style createBodyCellStyle()
Creates a default style for the cells of the body zone.

Returns:
a new instance of this class

createBodyLineStyle

public static Style createBodyLineStyle()
Creates a default style for the lines of the body zone.

Returns:
a new instance of this class

createHeaderCellStyle

public static Style createHeaderCellStyle()
Creates a default style for the cells of the header type of zones.

Returns:
a new instance of this class

createHeaderLineStyle

public static Style createHeaderLineStyle()
Creates a default style for the lines of the header type of zones.

Returns:
a new instance of this class


Copyright © 2011 netanel.pl. All Rights Reserved.