|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
org.eclipse.swt.widgets.Canvas
net.xoetrope.swt.XImage
net.xoetrope.swt.XHotspotImage
public class XHotspotImage
A widget for displaying an image and associating hotspots at coordinates specified in an external file
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected int |
currentHotspotIdx
true to draw the hotspots as highlighted areas |
protected static org.eclipse.swt.graphics.Cursor |
defaultCursor
The default cursor |
protected static org.eclipse.swt.graphics.Cursor |
handCursor
The default pointer - the hand cursor |
protected java.util.Vector |
hotspots
The hotspots |
protected java.util.Vector |
names
The hotspot names |
protected java.util.Vector |
tooltips
The hotspot tooltiptexts |
| Fields inherited from class net.xoetrope.swt.XImage |
|---|
currentProject |
| Fields inherited from class org.eclipse.swt.widgets.Control |
|---|
handle |
| Constructor Summary | |
|---|---|
XHotspotImage(java.lang.Object parent)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
addCustomHotspot(XmlElement ele)
Add a custom hotspot |
int |
checkHotspot(org.eclipse.swt.events.MouseEvent e)
Check the mouse event with the hotspots |
java.lang.String |
getName(int i)
Get the name of a hotspot |
void |
mouseMove(org.eclipse.swt.events.MouseEvent e)
Refresh the display when the mouse moves |
void |
read(java.io.Reader r)
Read a file to store the hotspots |
| Methods inherited from class net.xoetrope.swt.XImage |
|---|
checkSubclass, paint, setAttribute, setImage |
| Methods inherited from class org.eclipse.swt.widgets.Canvas |
|---|
drawBackground, getCaret, scroll, setCaret, setFont |
| Methods inherited from class org.eclipse.swt.widgets.Composite |
|---|
changed, computeSize, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList |
| Methods inherited from class org.eclipse.swt.widgets.Scrollable |
|---|
computeTrim, getClientArea, getHorizontalBar, getVerticalBar |
| Methods inherited from class org.eclipse.swt.widgets.Control |
|---|
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update |
| Methods inherited from class org.eclipse.swt.widgets.Widget |
|---|
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int currentHotspotIdx
protected static org.eclipse.swt.graphics.Cursor handCursor
protected static org.eclipse.swt.graphics.Cursor defaultCursor
protected java.util.Vector hotspots
protected java.util.Vector names
protected java.util.Vector tooltips
| Constructor Detail |
|---|
public XHotspotImage(java.lang.Object parent)
parent - parent object| Method Detail |
|---|
public void mouseMove(org.eclipse.swt.events.MouseEvent e)
mouseMove in interface org.eclipse.swt.events.MouseMoveListenerpublic int checkHotspot(org.eclipse.swt.events.MouseEvent e)
e - MouseEvent
public void read(java.io.Reader r)
r - Readerprotected void addCustomHotspot(XmlElement ele)
ele - XmlElementpublic java.lang.String getName(int i)
i - index of the hotspot
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||