|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.swt.custom.CTabFolderRenderer
public class CTabFolderRenderer
Instances of this class provide all of the measuring and drawing functionality
required by CTabFolder
. This class can be subclassed in order to
customize the look of a CTabFolder.
Field Summary | |
---|---|
static int |
MINIMUM_SIZE
|
protected CTabFolder |
parent
|
static int |
PART_BACKGROUND
|
static int |
PART_BODY
|
static int |
PART_BORDER
|
static int |
PART_CHEVRON_BUTTON
|
static int |
PART_CLOSE_BUTTON
|
static int |
PART_HEADER
|
static int |
PART_MAX_BUTTON
|
static int |
PART_MIN_BUTTON
|
Constructor Summary | |
---|---|
protected |
CTabFolderRenderer(CTabFolder parent)
Constructs a new instance of this class given its parent. |
Method Summary | |
---|---|
protected Point |
computeSize(int part,
int state,
GC gc,
int wHint,
int hHint)
Returns the preferred size of a part. |
protected Rectangle |
computeTrim(int part,
int state,
int x,
int y,
int width,
int height)
Given a desired client area for the part (as described by the arguments), returns the bounding rectangle which would be required to produce that client area. |
protected void |
dispose()
Dispose of any operating system resources associated with the renderer. |
protected void |
draw(int part,
int state,
Rectangle bounds,
GC gc)
Draw a specified part of the CTabFolder using the provided bounds and GC . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CTabFolder parent
public static final int PART_BODY
public static final int PART_HEADER
public static final int PART_BORDER
public static final int PART_BACKGROUND
public static final int PART_MAX_BUTTON
public static final int PART_MIN_BUTTON
public static final int PART_CHEVRON_BUTTON
public static final int PART_CLOSE_BUTTON
public static final int MINIMUM_SIZE
Constructor Detail |
---|
protected CTabFolderRenderer(CTabFolder parent)
parent
- CTabFolder
IllegalArgumentException
- Widget.getStyle()
Method Detail |
---|
protected Point computeSize(int part, int state, GC gc, int wHint, int hHint)
The preferred size of a part is the size that it would
best be displayed at. The width hint and height hint arguments
allow the caller to ask a control questions such as "Given a particular
width, how high does the part need to be to show all of the contents?"
To indicate that the caller does not wish to constrain a particular
dimension, the constant SWT.DEFAULT
is passed for the hint.
The part
value indicated what component the preferred size is
to be calculated for. Valid values are any of the part constants:
The state
parameter may be one of the following:
part
- a part constantstate
- current stategc
- the gc to use for measuringwHint
- the width hint (can be SWT.DEFAULT
)hHint
- the height hint (can be SWT.DEFAULT
)
protected Rectangle computeTrim(int part, int state, int x, int y, int width, int height)
In other words, it returns a rectangle such that, if the part's bounds were set to that rectangle, the area of the part which is capable of displaying data (that is, not covered by the "trimmings") would be the rectangle described by the arguments (relative to the receiver's parent).
part
- one of the part constantsstate
- the state of the partx
- the desired x coordinate of the client areay
- the desired y coordinate of the client areawidth
- the desired width of the client areaheight
- the desired height of the client area
valid part and state values
protected void dispose()
protected void draw(int part, int state, Rectangle bounds, GC gc)
part
of the CTabFolder using the provided bounds
and GC
.
The valid CTabFolder part
constants are:
The state
parameter may be a combination of:
part
- part to drawstate
- state of the partbounds
- the bounds of the partgc
- the gc to draw the part on
|
Eclipse Platform Release 3.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.