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.jface.viewers
Interface IDecoration


public interface IDecoration

Defines the result of decorating an element. This interface is not meant to be implemented and will be provided to instances of ILightweightLabelDecorator.

Restriction:
This interface is not intended to be implemented by clients.

Field Summary
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.
 
Method Summary
 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.
 

Field Detail

TOP_LEFT

static final int TOP_LEFT
Constants for placement of image decorations.

See Also:
Constant Field Values

TOP_RIGHT

static final int TOP_RIGHT
Constant for the top right quadrant.

See Also:
Constant Field Values

BOTTOM_LEFT

static final int BOTTOM_LEFT
Constant for the bottom left quadrant.

See Also:
Constant Field Values

BOTTOM_RIGHT

static final int BOTTOM_RIGHT
Constant for the bottom right quadrant.

See Also:
Constant Field Values

UNDERLAY

static final int UNDERLAY
Constant for the underlay.

See Also:
Constant Field Values

REPLACE

static final int REPLACE
Constant for replacing the original image. Note that for this to have an effect on the resulting decorated image, 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.

Since:
3.4
See Also:
Constant Field Values

ENABLE_REPLACE

static final 
String ENABLE_REPLACE
Constant that is used as the property key on an IDecorationContext. To enable image replacement, set to Boolean.TRUE .

Since:
3.4
See Also:
IDecorationContext, Constant Field Values
Method Detail

addPrefix

void addPrefix(
String prefix)
Adds a prefix to the element's label.

Parameters:
prefix - the prefix

addSuffix

void addSuffix(
String suffix)
Adds a suffix to the element's label.

Parameters:
suffix - the suffix

addOverlay

void addOverlay(
ImageDescriptor overlay)
Adds an overlay to the element's image.

Parameters:
overlay - the overlay image descriptor

addOverlay

void addOverlay(
ImageDescriptor overlay,
                int quadrant)
Adds an overlay to the element's image.

Parameters:
overlay - the overlay image descriptor
quadrant - The constant for the quadrant to draw the image on.

setForegroundColor

void setForegroundColor(
Color color)
Set the foreground color for this decoration.

Parameters:
color - the color to be set for the foreground
Since:
3.1

setBackgroundColor

void setBackgroundColor(
Color color)
Set the background color for this decoration.

Parameters:
color - the color to be set for the background
Since:
3.1

setFont

void setFont(
Font font)
Set the font for this decoration.

Parameters:
font - the font to use in this decoration
Since:
3.1

getDecorationContext


IDecorationContext getDecorationContext()
Return the decoration context in which this decoration will be applied.

Returns:
the decoration context
Since:
3.2

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