|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.swt.widgets.ToolItem
org.formaria.swt.ToolItem
public class ToolItem
Draws a coolitem
Copyright (c) Formaria Ltd., 2008
License: see license.txt $Revision: 2.18 $
| Field Summary | |
|---|---|
protected Menu |
menu
|
protected DataModel |
model
|
protected ToolBar |
tb
|
| Constructor Summary | |
|---|---|
ToolItem(ToolBar parent,
int style)
Constructs a new toolitem for a toolbar |
|
| Method Summary | |
|---|---|
protected void |
checkSubclass()
Suppress the subclassing exception |
Menu |
getMenu()
|
DataModel |
getModel()
Get the model |
java.lang.String |
getText(DataModel xmodel,
int i)
Get the appropriate text inside the model |
java.lang.String |
getToolTip()
Get the tooltip text |
void |
setAction(java.lang.Object action)
Set an Action for the toolitem - does nothing |
int |
setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
Set one or more attributes of the component. |
void |
setDataModel(DataModel xmodel)
Set the DataModel which we will be generating the toolitem dropdown from |
void |
setImage(java.lang.String imageName)
Set the image name |
void |
setToolTip(java.lang.String text)
Set the tooltip text |
void |
update()
Update the toolitem dropdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Menu menu
protected DataModel model
protected final ToolBar tb
| Constructor Detail |
|---|
public ToolItem(ToolBar parent,
int style)
parent - parent toolbarstyle - the style| Method Detail |
|---|
protected void checkSubclass()
public void setAction(java.lang.Object action)
setAction in interface Actionableaction - the action object
public int setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
attribName - the name of the attributeattribValue - the value of the attribute
public void setDataModel(DataModel xmodel)
setDataModel in interface ModelHolderxmodel - the DataModel of datapublic DataModel getModel()
public void update()
update in interface ModelHolderpublic Menu getMenu()
public java.lang.String getText(DataModel xmodel,
int i)
xmodel - parent modeli - index of the children
public void setToolTip(java.lang.String text)
text - the new textpublic java.lang.String getToolTip()
public void setImage(java.lang.String imageName)
imageName - the relative URL of the new image
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||