|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object CompositeImageDescriptor net.refractions.udig.ui.DecoratorOverlayIcon
public class DecoratorOverlayIcon
An DecoratorOverlayIcon consists of a main icon and several adornments.
Eclipse has many implementations of this class - all of them are internal. This one is based on org.eclipse.ui.internal.decorators.DecoratorOverlayIcon and has the advantage of having an equals and hashcode impemenation. This allows the use of the resulting ImageDescriptors to be cached using weak references.
Overlays are of course 7x8 icons with a white keyline around them.
Example use:
new DecoratorOverlayIcon(base,
new ImageDescriptor[][]={
null, // TOP_LEFT unsure if we will use this
modified, // TOP_RIGHT indicate content modified (w/ *)
status, // BOTTOM_LEFT called the auxiliary overlay warn, error, success
cached, // BOTTOM_RIGHT not yet defined, recommened cache status...
null, // UNDERLAY not sure if we will use this
}
);
Field Summary | |
---|---|
static int |
BOTTOM_LEFT
|
static int |
BOTTOM_RIGHT
|
static int |
TOP_LEFT
|
static int |
TOP_RIGHT
|
static int |
UNDERLAY
|
Constructor Summary | |
---|---|
DecoratorOverlayIcon(Image baseImage,
ImageDescriptor[] overlaysArray)
OverlayIcon constructor defaults to size of base image. |
|
DecoratorOverlayIcon(Image baseImage,
ImageDescriptor[] overlaysArray,
Point sizeValue)
OverlayIcon constructor allowing explicit size. |
Method Summary | |
---|---|
protected void |
drawCompositeImage(int width,
int height)
|
protected void |
drawOverlays(ImageDescriptor[] overlaysArray)
Draw the overlays for the reciever. |
boolean |
equals(java.lang.Object o)
Note this can only be equal to another DecoratorOverlayIcon. |
protected Point |
getSize()
|
int |
hashCode()
Hascode for a base with no overlays will be the same as for a base. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TOP_LEFT
public static final int TOP_RIGHT
public static final int BOTTOM_LEFT
public static final int BOTTOM_RIGHT
public static final int UNDERLAY
Constructor Detail |
---|
public DecoratorOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray)
Overlays are of course 7x8 icons with a white keyline around them.
Example use:
new DecoratorOverlayIcon(base,
new ImageDescriptor[][]={
null, // TOP_LEFT unsure if we will use this
modified, // TOP_RIGHT indicate content modified (w/ *)
status, // BOTTOM_LEFT called the auxiliary overlay warn, error, success
cached, // BOTTOM_RIGHT not yet defined, recommened cache status...
null, // UNDERLAY not sure if we will use this
}
);
base
- the base imageoverlays
- the overlay imagespublic DecoratorOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray, Point sizeValue)
Overlays are of course 7x8 icons with a white keyline around them.
Example use:
new DecoratorOverlayIcon(base,
new ImageDescriptor[][]={
null, // TOP_LEFT unsure if we will use this
modified, // TOP_RIGHT indicate content modified (w/ *)
status, // BOTTOM_LEFT called the auxiliary overlay warn, error, success
cached, // BOTTOM_RIGHT not yet defined, recommened cache status...
null, // UNDERLAY not sure if we will use this
},
new Point(22,16)
);
base
- the base imageoverlays
- the overlay imagessize
- the size, 22x16 if nullMethod Detail |
---|
protected void drawOverlays(ImageDescriptor[] overlaysArray)
public boolean equals(java.lang.Object o)
public int hashCode()
protected void drawCompositeImage(int width, int height)
protected Point getSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |