Modifier and Type | Field and Description |
---|---|
(package private) CellBackgroundProvider |
bodyBackgroundProvider |
static int |
BORDER_OVERLAP
Constant cell spacing value indicating that the borders of adjacent cells
should overlap so the appear continuous.
|
(package private) Border |
cellBorder |
(package private) org.eclipse.swt.graphics.Rectangle |
cellPadding |
(package private) org.eclipse.swt.graphics.Point |
cellSpacing |
(package private) DefaultCellBackgroundProvider |
defaultBodyBackgroundProvider |
(package private) DefaultCellBackgroundProvider |
defaultFooterBackgroundProvider |
(package private) DefaultCellBackgroundProvider |
defaultHeaderBackgroundProvider |
(package private) CellBackgroundProvider |
footerBackgroundProvider |
(package private) int |
footerGap |
(package private) CellBackgroundProvider |
headerBackgroundProvider |
(package private) int |
headerGap |
Constructor and Description |
---|
DefaultGridLook()
Constructs a DefaultGridLook with no border, no cell spacing, and no
background colors.
|
DefaultGridLook(int horizontalSpacing,
int verticalSpacing)
Constructs a DefaultGridLook with the given cell spacing, and no border
or background colors.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
org.eclipse.swt.graphics.RGB |
getBodyBackground()
Returns the body background color.
|
CellBackgroundProvider |
getBodyBackgroundProvider()
Returns the body background color provider.
|
Border |
getCellBorder()
Returns the cell border.
|
org.eclipse.swt.graphics.Rectangle |
getCellPadding()
Returns a rectangle whose public fields denote the left (x), top (y),
right (width) and bottom (height) cell padding, expressed in points.
|
org.eclipse.swt.graphics.Point |
getCellSpacing()
Returns the border spacing, in points, between adjacent grid cells.
|
org.eclipse.swt.graphics.RGB |
getFooterBackground()
Returns the footer background color.
|
CellBackgroundProvider |
getFooterBackgroundProvider()
Returns the footer background color provider.
|
int |
getFooterGap()
Returns the vertical gap between the body and footer cells.
|
org.eclipse.swt.graphics.RGB |
getHeaderBackground()
Returns the header background color.
|
CellBackgroundProvider |
getHeaderBackgroundProvider()
Returns the header background color provider.
|
int |
getHeaderGap()
Returns the vertical gap between the header and body cells.
|
GridLookPainter |
getPainter(org.eclipse.swt.graphics.Device device,
org.eclipse.swt.graphics.GC gc)
Returns a GridLookPainter for painting the GridLook.
|
int |
hashCode() |
void |
setBodyBackground(org.eclipse.swt.graphics.RGB bodyBackground)
Sets the body background color.
|
void |
setBodyBackgroundProvider(CellBackgroundProvider bodyBackgroundProvider)
Sets the body background color provider.
|
void |
setCellBorder(Border border)
Sets the cell border.
|
void |
setCellPadding(int horizontalPadding,
int verticalPadding)
Sets the cell padding to the given horizontal and vertical values.
|
void |
setCellPadding(int left,
int top,
int right,
int bottom)
Sets the cell padding to the specified values.
|
void |
setCellPadding(org.eclipse.swt.graphics.Rectangle cellPadding)
Sets the cell padding to the values in the public fields of the argument.
|
void |
setCellSpacing(int horizontal,
int vertical)
Sets the border spacing, in points, between adjacent grid cells.
|
void |
setCellSpacing(org.eclipse.swt.graphics.Point cellSpacing)
Sets the border spacing, in points, between adjacent grid cells.
|
void |
setFooterBackground(org.eclipse.swt.graphics.RGB footerBackground)
Sets the footer background color.
|
void |
setFooterBackgroundProvider(CellBackgroundProvider footerBackgroundProvider)
Sets the footer background color provider.
|
void |
setFooterGap(int footerGap)
Sets the vertical gap between the header and body cells.
|
void |
setHeaderBackground(org.eclipse.swt.graphics.RGB headerBackground)
Sets the header background color.
|
void |
setHeaderBackgroundProvider(CellBackgroundProvider headerBackgroundProvider)
Sets the header background color provider.
|
void |
setHeaderGap(int headerGap)
Sets the vertical gap between the header and body cells.
|
public static final int BORDER_OVERLAP
org.eclipse.swt.graphics.Point cellSpacing
org.eclipse.swt.graphics.Rectangle cellPadding
int headerGap
int footerGap
Border cellBorder
DefaultCellBackgroundProvider defaultBodyBackgroundProvider
DefaultCellBackgroundProvider defaultHeaderBackgroundProvider
DefaultCellBackgroundProvider defaultFooterBackgroundProvider
CellBackgroundProvider bodyBackgroundProvider
CellBackgroundProvider headerBackgroundProvider
CellBackgroundProvider footerBackgroundProvider
public DefaultGridLook()
public DefaultGridLook(int horizontalSpacing, int verticalSpacing)
horizontalSpacing
- the horizontal cell spacing.verticalSpacing
- the vertical cell spacing.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public Border getCellBorder()
public void setCellBorder(Border border)
border
- the cell border.public org.eclipse.swt.graphics.Point getCellSpacing()
public void setCellSpacing(org.eclipse.swt.graphics.Point cellSpacing)
BORDER_OVERLAP
causes the borders to overlap, making the
border appear continuous throughout the grid. A value of 0 or more causes
the cell borders to be spaced that many points apart. 72 points = 1".cellSpacing
- a point whose x and y elements indicate the horizontal and
vertical spacing between grid cells.public void setCellSpacing(int horizontal, int vertical)
BORDER_OVERLAP
causes the borders to overlap, making the
border appear continuous throughout the grid. A value of 0 or more causes
the cell borders to be spaced that many points apart. 72 points = 1".horizontal
- the horizontal cell spacing.vertical
- the vertical cell spacing.public org.eclipse.swt.graphics.Rectangle getCellPadding()
public void setCellPadding(org.eclipse.swt.graphics.Rectangle cellPadding)
cellPadding
- the new cell padding.public void setCellPadding(int horizontalPadding, int verticalPadding)
horizontalPadding
- the amount of padding to add to the left and right of each
cell, in points.verticalPadding
- the amount padding to add to the top and bottom each cell, in
points.public void setCellPadding(int left, int top, int right, int bottom)
left
- the left cell padding, in points.top
- the top cell padding, in points.right
- the right cell padding, in points.bottom
- the bottom cell padding, in points.public org.eclipse.swt.graphics.RGB getHeaderBackground()
public void setHeaderBackground(org.eclipse.swt.graphics.RGB headerBackground)
headerBackground
- the new background color. If null, the body background color
will be used.public CellBackgroundProvider getHeaderBackgroundProvider()
public void setHeaderBackgroundProvider(CellBackgroundProvider headerBackgroundProvider)
headerBackgroundProvider
- the new background color provider.public int getHeaderGap()
public void setHeaderGap(int headerGap)
BORDER_OVERLAP
causes the borders to overlap, making the border
appear continuous in the transition from the header cells to the body
cells.headerGap
- the new header gap.public org.eclipse.swt.graphics.RGB getBodyBackground()
public void setBodyBackground(org.eclipse.swt.graphics.RGB bodyBackground)
bodyBackground
- the new background color.public CellBackgroundProvider getBodyBackgroundProvider()
public void setBodyBackgroundProvider(CellBackgroundProvider bodyBackgroundProvider)
bodyBackgroundProvider
- the new background color provider.public int getFooterGap()
public void setFooterGap(int footerGap)
BORDER_OVERLAP
causes the borders to overlap, making the border
appear continuous in the transition from the body cells to the footer
cells.footerGap
- public org.eclipse.swt.graphics.RGB getFooterBackground()
public void setFooterBackground(org.eclipse.swt.graphics.RGB footerBackground)
footerBackground
- the new background color. If null, the body background color
will be used.public CellBackgroundProvider getFooterBackgroundProvider()
public void setFooterBackgroundProvider(CellBackgroundProvider footerBackgroundProvider)
footerBackgroundProvider
- the new background color provider.public GridLookPainter getPainter(org.eclipse.swt.graphics.Device device, org.eclipse.swt.graphics.GC gc)
GridLook
getPainter
in interface GridLook
device
- the device to paint on.gc
- the graphics context for painting.