Class OpalItem
java.lang.Object
org.eclipse.nebula.widgets.opal.commons.OpalItem
- Direct Known Subclasses:
ColumnItem
,DLItem
public abstract class OpalItem
extends java.lang.Object
Instances of this object are items manipulated by the widgets of the Opal Project. These items are highly customizable, you can set :
- Background and foreground colors,
- Font
- Image
- Text
- Height
setData methods.
-
Constructor Summary
Constructors Constructor Description OpalItem()
-
Method Summary
Modifier and Type Method Description org.eclipse.swt.graphics.Color
getBackground()
java.lang.Object
getData()
java.lang.Object
getData(java.lang.String key)
org.eclipse.swt.graphics.Font
getFont()
org.eclipse.swt.graphics.Color
getForeground()
int
getHeight()
org.eclipse.swt.graphics.Image
getImage()
java.lang.String
getText()
void
setBackground(org.eclipse.swt.graphics.Color background)
void
setData(java.lang.Object data)
void
setData(java.lang.String key, java.lang.Object value)
Store a data associated to a given key in this itemvoid
setFont(org.eclipse.swt.graphics.Font font)
void
setForeground(org.eclipse.swt.graphics.Color foreground)
void
setHeight(int height)
void
setImage(org.eclipse.swt.graphics.Image image)
void
setText(java.lang.String text)
-
Constructor Details
-
OpalItem
public OpalItem()
-
-
Method Details
-
getBackground
public org.eclipse.swt.graphics.Color getBackground()- Returns:
- the background color of the item
-
getData
public java.lang.Object getData()- Returns:
- the the data stored in this item
-
getData
public java.lang.Object getData(java.lang.String key)- Parameters:
key
- a key- Returns:
- the the data stored in this item associated to this key
-
getFont
public org.eclipse.swt.graphics.Font getFont()- Returns:
- the font of the item
-
getForeground
public org.eclipse.swt.graphics.Color getForeground()- Returns:
- the foreground color of the item
-
getHeight
public int getHeight()- Returns:
- the height of the item
-
getImage
public org.eclipse.swt.graphics.Image getImage()- Returns:
- the image stored in this item
-
getText
public java.lang.String getText()- Returns:
- the text stored in this item
-
setBackground
public void setBackground(org.eclipse.swt.graphics.Color background)- Parameters:
background
- set the background color of this item
-
setFont
public void setFont(org.eclipse.swt.graphics.Font font)- Parameters:
font
- set the font of this item
-
setForeground
public void setForeground(org.eclipse.swt.graphics.Color foreground)- Parameters:
foreground
- set the foreground color of this item
-
setHeight
public void setHeight(int height)- Parameters:
height
- set the height of this item
-
setImage
public void setImage(org.eclipse.swt.graphics.Image image)- Parameters:
image
- set the image of this item
-
setText
public void setText(java.lang.String text)- Parameters:
text
- set the text of this item
-
setData
public void setData(java.lang.Object data)- Parameters:
data
- set the data stored in this item
-
setData
public void setData(java.lang.String key, java.lang.Object value)Store a data associated to a given key in this item- Parameters:
key
- keyvalue
- value associated to this key
-