| net.refractions.udig.ui.DecoratorOverlayIcon
DecoratorOverlayIcon | public class DecoratorOverlayIcon extends CompositeImageDescriptor (Code) | | 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
}
);
|
Constructor Summary | |
public | DecoratorOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray) OverlayIcon constructor defaults to size of base image.
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...
| public | DecoratorOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray, Point sizeValue) OverlayIcon constructor allowing explicit size.
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...
|
Method Summary | |
protected void | drawCompositeImage(int width, int height) | protected void | drawOverlays(ImageDescriptor[] overlaysArray) Draw the overlays for the reciever. | public boolean | equals(Object o) Note this can only be equal to another DecoratorOverlayIcon. | protected Point | getSize() | public int | hashCode() Hascode for a base with no overlays will be the same as for a base. |
BOTTOM_LEFT | final public static int BOTTOM_LEFT(Code) | | |
BOTTOM_RIGHT | final public static int BOTTOM_RIGHT(Code) | | |
DEFAULT_SIZE | final static Point DEFAULT_SIZE(Code) | | |
TOP_LEFT | final public static int TOP_LEFT(Code) | | |
TOP_RIGHT | final public static int TOP_RIGHT(Code) | | |
UNDERLAY | final public static int UNDERLAY(Code) | | |
DecoratorOverlayIcon | public DecoratorOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray)(Code) | | OverlayIcon constructor defaults to size of base image.
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
}
);
Parameters: base - the base image Parameters: overlays - the overlay images |
DecoratorOverlayIcon | public DecoratorOverlayIcon(Image baseImage, ImageDescriptor[] overlaysArray, Point sizeValue)(Code) | | OverlayIcon constructor allowing explicit size.
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)
);
Parameters: base - the base image Parameters: overlays - the overlay images Parameters: size - the size, 22x16 if null |
drawCompositeImage | protected void drawCompositeImage(int width, int height)(Code) | | |
drawOverlays | protected void drawOverlays(ImageDescriptor[] overlaysArray)(Code) | | Draw the overlays for the reciever.
|
equals | public boolean equals(Object o)(Code) | | Note this can only be equal to another DecoratorOverlayIcon.
|
getSize | protected Point getSize()(Code) | | |
hashCode | public int hashCode()(Code) | | Hascode for a base with no overlays will be the same as for a base.
|
|
|