|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--i3mclient.i3m.ResourceManager
Manage all object, which needed to disposed.
Field Summary | |
static int |
COLOR
Identifies a color resource |
static int |
CURSOR
Identifies a cursor resource |
static int |
FONT
Identifies a font resource |
static int |
GC
Identifies a gc resource |
static int |
IMAGE
Identifies an image resource |
Constructor Summary | |
ResourceManager()
Constructor. |
Method Summary | |
Color |
addColor(Object group,
Color object)
Add a color resource to a group. |
Cursor |
addCursor(Object group,
Cursor object)
Add a cursor resource to a group. |
Font |
addFont(Object group,
Font object)
Add a font resource to a group. |
GC |
addGC(Object group,
GC object)
Add a gc resource to a group. |
Image |
addImage(Object group,
Image object)
Add a image resource to a group. |
Object |
addResource(int type,
Object group,
Object object)
Add a resource to a group. |
void |
disposeAll()
Dispose all resources of all groups. |
void |
disposeGroup(Object group)
Dispose all resources of a group. |
static ResourceManager |
getInstance()
Returns an instance of this class (singleton construction) |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int IMAGE
public static final int CURSOR
public static final int COLOR
public static final int FONT
public static final int GC
Constructor Detail |
public ResourceManager()
Method Detail |
public static ResourceManager getInstance()
public Object addResource(int type, Object group, Object object)
type
- The type of the new resourcegroup
- In which group should the resource insertedobject
- The resource
addColor(Object,Color)
,
addCursor(Object,Cursor)
,
addFont(Object,Font)
,
addGC(Object,GC)
,
addImage(Object,Image)
public Image addImage(Object group, Image object)
group
- In which group should the resource insertedobject
- The resource
public Cursor addCursor(Object group, Cursor object)
group
- In which group should the resource insertedobject
- The resource
public Color addColor(Object group, Color object)
group
- In which group should the resource insertedobject
- The resource
public Font addFont(Object group, Font object)
group
- In which group should the resource insertedobject
- The resource
public GC addGC(Object group, GC object)
group
- In which group should the resource insertedobject
- The resource
public void disposeGroup(Object group)
group
- All resources of the group will be disposedpublic void disposeAll()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |