Application code must explicitly invoke the Pattern.dispose()
method to release the operating system resources managed by each instance
when those instances are no longer required.
This class requires the operating system's advanced graphics subsystem which may not be available on some platforms.
| Modifier and Type | Field and Description |
|---|---|
| public long | handle
the OS resource for the Pattern (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. |
| pack-priv long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Pattern(Device
the device on which to allocate the pattern device, float the x coordinate of the starting corner of the gradient x1, float the y coordinate of the starting corner of the gradient y1, float the x coordinate of the ending corner of the gradient x2, float the y coordinate of the ending corner of the gradient y2, Color the starting color of the gradient color1, Color the ending color of the gradient color2)Constructs a new Pattern that represents a linear, two color gradient. |
| public | Pattern(Device
the device on which to allocate the pattern device, float the x coordinate of the starting corner of the gradient x1, float the y coordinate of the starting corner of the gradient y1, float the x coordinate of the ending corner of the gradient x2, float the y coordinate of the ending corner of the gradient y2, Color the starting color of the gradient color1, int the starting alpha value of the gradient alpha1, Color the ending color of the gradient color2, int the ending alpha value of the gradient alpha2)Constructs a new Pattern that represents a linear, two color gradient. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public boolean | Returns: true when the Pattern is disposed, and false otherwiseImplements abstract org. true if the Pattern has been disposed,
and false otherwise.
|
| public String | Returns: a string representation of the receiverOverrides java. |
| handle | back to summary |
|---|---|
| public long handle the OS resource for the Pattern (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. It is marked public only so that it can be shared within the packages provided by SWT. It is not available on all platforms and should never be accessed from application code. | |
| surface | back to summary |
|---|---|
| pack-priv long surface | |
| Pattern | back to summary |
|---|---|
| public Pattern(Device device, Image image) Constructs a new Pattern given an image. Drawing with the resulting pattern will cause the image to be tiled over the resulting area. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the pattern when it is no longer required.
| |
| Pattern | back to summary |
|---|---|
| public Pattern(Device device, float x1, float y1, float x2, float y2, Color color1, Color color2) Constructs a new Pattern that represents a linear, two color gradient. Drawing with the pattern will cause the resulting area to be tiled with the gradient specified by the arguments. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the pattern when it is no longer required.
| |
| Pattern | back to summary |
|---|---|
| public Pattern(Device device, float x1, float y1, float x2, float y2, Color color1, int alpha1, Color color2, int alpha2) Constructs a new Pattern that represents a linear, two color gradient. Drawing with the pattern will cause the resulting area to be tiled with the gradient specified by the arguments. This operation requires the operating system's advanced graphics subsystem which may not be available on some platforms. You must dispose the pattern when it is no longer required.
| |
| destroy | back to summary |
|---|---|
| pack-priv void destroy() Overrides org.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements abstract org. Returns
This method gets the dispose state for the Pattern.
When a Pattern has been disposed, it is an error to
invoke any other method (except
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string containing a concise, human-readable description of the receiver. | |