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.ColorgetBackground()java.lang.ObjectgetData()java.lang.ObjectgetData(java.lang.String key)org.eclipse.swt.graphics.FontgetFont()org.eclipse.swt.graphics.ColorgetForeground()intgetHeight()org.eclipse.swt.graphics.ImagegetImage()java.lang.StringgetText()voidsetBackground(org.eclipse.swt.graphics.Color background)voidsetData(java.lang.Object data)voidsetData(java.lang.String key, java.lang.Object value)Store a data associated to a given key in this itemvoidsetFont(org.eclipse.swt.graphics.Font font)voidsetForeground(org.eclipse.swt.graphics.Color foreground)voidsetHeight(int height)voidsetImage(org.eclipse.swt.graphics.Image image)voidsetText(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
-