|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.swt.widgets.Widget
|
+--org.eclipse.swt.widgets.Control
|
+--org.eclipse.swt.widgets.Scrollable
|
+--org.eclipse.swt.widgets.Composite
|
+--org.eclipse.swt.widgets.Canvas
|
+--i3mclient.i3m.CoolButton
Own widget to have a button with image and text.
| Field Summary | |
static int |
FLAT
Identifies that the button is in flat state |
static int |
NORMAL
Identifies that the button is in normal state |
static int |
PRESSED
Identifies that the button is pressed |
| Fields inherited from class org.eclipse.swt.widgets.Control |
handle |
| Constructor Summary | |
CoolButton(Composite composite,
int style)
Constructor. |
|
| Method Summary | |
void |
addMenuItem(String itemText,
Image itemImage,
Object name)
Add a item to the popup-menu. |
void |
addSelectionListener(SelectionListener listener)
Add a selection listener. |
Point |
computeMinSize()
Return the minimal size of the button. |
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Return the size of the button. |
Image |
getImage()
|
MenuItem |
getMenuItem(int index)
|
String |
getText()
|
void |
menuHidden(MenuEvent event)
|
void |
menuShown(MenuEvent arg0)
|
void |
mouseDoubleClick(MouseEvent arg0)
|
void |
mouseDown(MouseEvent arg0)
|
void |
mouseEnter(MouseEvent event)
|
void |
mouseExit(MouseEvent event)
|
void |
mouseHover(MouseEvent arg0)
|
void |
mouseUp(MouseEvent arg0)
|
void |
paintControl(PaintEvent event)
|
void |
removeSelectionListener(SelectionListener listener)
Remove a selection listener. |
void |
setImage(Image imageSet)
|
void |
setText(String textSet)
|
void |
widgetDefaultSelected(SelectionEvent arg0)
|
void |
widgetDisposed(DisposeEvent arg0)
|
void |
widgetSelected(SelectionEvent event)
|
| Methods inherited from class org.eclipse.swt.widgets.Canvas |
getCaret, scroll, setCaret, setFont |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
addDisposeListener, addListener, dispose, getData, getData, getStyle, notifyListeners, removeDisposeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static int NORMAL
public static int PRESSED
public static int FLAT
| Constructor Detail |
public CoolButton(Composite composite,
int style)
composite - In this composite the button will be insertedstyle - The SWT-style of the canvas (SWT.NONE is preferred)| Method Detail |
public void paintControl(PaintEvent event)
paintControl in interface PaintListener
public Point computeSize(int wHint,
int hHint,
boolean changed)
computeSize in class CompositewHint - the minimal width of buttonhHint - the minimal height of buttonchanged - changed or not
public Point computeMinSize()
public void mouseDoubleClick(MouseEvent arg0)
mouseDoubleClick in interface MouseListenerpublic void mouseDown(MouseEvent arg0)
mouseDown in interface MouseListenerpublic void mouseUp(MouseEvent arg0)
mouseUp in interface MouseListenerpublic void mouseEnter(MouseEvent event)
mouseEnter in interface MouseTrackListenerpublic void mouseExit(MouseEvent event)
mouseExit in interface MouseTrackListenerpublic void mouseHover(MouseEvent arg0)
mouseHover in interface MouseTrackListenerpublic Image getImage()
public String getText()
public void setImage(Image imageSet)
imageSet - The image on the buttonpublic void setText(String textSet)
textSet - The text on the button
public void addMenuItem(String itemText,
Image itemImage,
Object name)
itemText - The text of the itemitemImage - The image left of the textname - The name of the menu itempublic MenuItem getMenuItem(int index)
index - The index of the requested item
public void addSelectionListener(SelectionListener listener)
listener - The listener which should be added to the intern listpublic void removeSelectionListener(SelectionListener listener)
listener - The listener which should be removed from the intern listpublic void widgetSelected(SelectionEvent event)
widgetSelected in interface SelectionListenerpublic void widgetDefaultSelected(SelectionEvent arg0)
widgetDefaultSelected in interface SelectionListenerpublic void menuHidden(MenuEvent event)
menuHidden in interface MenuListenerpublic void menuShown(MenuEvent arg0)
menuShown in interface MenuListenerpublic void widgetDisposed(DisposeEvent arg0)
widgetDisposed in interface DisposeListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||