public interface IDecoration
ILightweightLabelDecorator
.Modifier and Type | Field and Description |
---|---|
static int |
BOTTOM_LEFT
Constant for the bottom left quadrant.
|
static int |
BOTTOM_RIGHT
Constant for the bottom right quadrant.
|
static String |
ENABLE_REPLACE
Constant that is used as the property key on an
IDecorationContext . |
static int |
REPLACE
Constant for replacing the original image.
|
static int |
TOP_LEFT
Constants for placement of image decorations.
|
static int |
TOP_RIGHT
Constant for the top right quadrant.
|
static int |
UNDERLAY
Constant for the underlay.
|
Modifier and Type | Method and Description |
---|---|
void |
addOverlay(ImageDescriptor overlay)
Adds an overlay to the element's image.
|
void |
addOverlay(ImageDescriptor overlay,
int quadrant)
Adds an overlay to the element's image.
|
void |
addPrefix(String prefix)
Adds a prefix to the element's label.
|
void |
addSuffix(String suffix)
Adds a suffix to the element's label.
|
IDecorationContext |
getDecorationContext()
Return the decoration context in which this decoration
will be applied.
|
void |
setBackgroundColor(Color color)
Set the background color for this decoration.
|
void |
setFont(Font font)
Set the font for this decoration.
|
void |
setForegroundColor(Color color)
Set the foreground color for this decoration.
|
static final int TOP_LEFT
static final int TOP_RIGHT
static final int BOTTOM_LEFT
static final int BOTTOM_RIGHT
static final int UNDERLAY
static final int REPLACE
ENABLE_REPLACE
has to
be set to Boolean.TRUE
in the IDecorationContext
(opt-in
model). If replacement behavior is enabled, the resulting decorated image
will be constructed by first painting the underlay, then the replacement
image, and then the regular quadrant images.static final String ENABLE_REPLACE
IDecorationContext
. To enable image replacement, set to
Boolean.TRUE
.IDecorationContext
,
Constant Field Valuesvoid addPrefix(String prefix)
prefix
- the prefixvoid addSuffix(String suffix)
suffix
- the suffixvoid addOverlay(ImageDescriptor overlay)
overlay
- the overlay image descriptorvoid addOverlay(ImageDescriptor overlay, int quadrant)
overlay
- the overlay image descriptorquadrant
- The constant for the quadrant to draw the image on.void setForegroundColor(Color color)
color
- the color to be set for the foregroundvoid setBackgroundColor(Color color)
color
- the color to be set for the backgroundvoid setFont(Font font)
font
- the font to use in this decorationIDecorationContext getDecorationContext()
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.