public abstract class Resource
extends java.lang.Object
IMPORTANT: This class is intended to be subclassed only within the SWT implementation. However, it has not been marked final to allow those outside of the SWT development team to implement patched versions of the class in order to get around specific limitations in advance of when those limitations can be addressed by the team. Any class built using subclassing to access the internals of this class will likely fail to compile or run between releases and may be strongly platform specific. Subclassing should not be attempted without an intimate and detailed understanding of the workings of the hierarchy. No support is provided for user-written classes which are implemented as subclasses of this class.
dispose()
,
isDisposed()
,
Sample code and further informationModifier and Type | Field and Description |
---|---|
(package private) Device |
device
the device where this resource was created
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
destroy() |
void |
dispose()
Disposes of the operating system resources associated with
this resource.
|
Device |
getDevice()
Returns the
Device where this resource was
created. |
(package private) void |
init() |
abstract boolean |
isDisposed()
Returns
true if the resource has been disposed,
and false otherwise. |
Device device
public Resource()
Resource(Device device)
void destroy()
public void dispose()
public Device getDevice()
Device
where this resource was
created.Device
the device of the receivervoid init()
public abstract boolean isDisposed()
true
if the resource has been disposed,
and false
otherwise.
This method gets the dispose state for the resource.
When a resource has been disposed, it is an error to
invoke any other method (except dispose()
) using the resource.
true
when the resource is disposed and false
otherwise