Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.swt.graphics
Class Resource


java.lang.Object
  extended by 
org.eclipse.swt.graphics.Resource
Direct Known Subclasses:
Color, Cursor, Font, GC, Image, Path, Pattern, Region, TextLayout, Transform

public abstract class Resource
extends Object

This class is the abstract superclass of all graphics resource objects. Resources created by the application must be disposed.

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.

Since:
3.1
See Also:
dispose(), isDisposed(), Sample code and further information

Constructor Summary
Resource ()
           
 
Method Summary
 void dispose ()
          Disposes of the operating system resources associated with this resource.
  Device getDevice ()
          Returns the Device where this resource was created.
abstract  boolean isDisposed ()
          Returns true if the resource has been disposed, and false otherwise.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Resource

public Resource()
Method Detail

dispose

public void dispose()
Disposes of the operating system resources associated with this resource. Applications must dispose of all resources which they allocate.


getDevice

public 
Device getDevice()
Returns the Device where this resource was created.

Returns:
Device the device of the receiver
Since:
3.2

isDisposed

public abstract boolean isDisposed()
Returns 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 using the resource.

Returns:
true when the resource is disposed and false otherwise

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire