org.eclipse.actf.util.win32
Class OverlayLabel

java.lang.Object
  extended by org.eclipse.swt.widgets.Widget
      extended by org.eclipse.swt.widgets.Control
          extended by org.eclipse.swt.widgets.Scrollable
              extended by org.eclipse.swt.widgets.Composite
                  extended by org.eclipse.swt.widgets.Canvas
                      extended by org.eclipse.swt.custom.CLabel
                          extended by org.eclipse.actf.util.win32.OverlayLabel
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class OverlayLabel
extends org.eclipse.swt.custom.CLabel

OverlayLabel is used to show some information on the application windows.


Field Summary
 Object associatedObject
           
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Method Summary
static OverlayLabel create(Object associatedObject)
          Create overlay label
 org.eclipse.swt.widgets.Menu createPopupMenu()
          Create popup menu.
 void dispose()
           
static OverlayLabel[] getLabelsAtPosition(org.eclipse.swt.graphics.Point position)
          Get all OverlayLabel at the specified position
 String getMenuText()
           
static String getOwnerId()
           
static void removeAll()
          Remove all label from the overlay window for overlay labels.
static void removeAll(boolean force)
          Remove all label from the overlay window for overlay labels.
static void setOwnerId(String id)
          Set ID of the owner view.
 void setTooltop(String text, String[][] properties)
          Set the tooltip text of the label.
 
Methods inherited from class org.eclipse.swt.custom.CLabel
computeSize, getAlignment, getBottomMargin, getImage, getLeftMargin, getRightMargin, getStyle, getText, getToolTipText, getTopMargin, setAlignment, setBackground, setBackground, setBackground, setBackground, setBottomMargin, setFont, setImage, setLeftMargin, setMargins, setRightMargin, setText, setToolTipText, setTopMargin
 
Methods inherited from class org.eclipse.swt.widgets.Canvas
drawBackground, getCaret, getIME, scroll, setCaret, setIME
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, 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, addDragDetectListener, addFocusListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, getData, getData, getDisplay, getListeners, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

associatedObject

public Object associatedObject
Method Detail

removeAll

public static void removeAll()
Remove all label from the overlay window for overlay labels. All labels will be removed with synchronization.


removeAll

public static void removeAll(boolean force)
Remove all label from the overlay window for overlay labels.

Parameters:
force - whether remove without synchronize or not.

create

public static OverlayLabel create(Object associatedObject)
Create overlay label

Parameters:
associatedObject - the content of the label.
Returns:
the new OverlayLabel instance if the associatedObject is not already used.

getLabelsAtPosition

public static OverlayLabel[] getLabelsAtPosition(org.eclipse.swt.graphics.Point position)
Get all OverlayLabel at the specified position

Parameters:
position - the target position
Returns:
the arrays of OverlayLabels placed at the position.

createPopupMenu

public org.eclipse.swt.widgets.Menu createPopupMenu()
Create popup menu.

Returns:
the popup menu.

dispose

public void dispose()
Overrides:
dispose in class org.eclipse.swt.widgets.Widget

getOwnerId

public static String getOwnerId()
Returns:
the id of the owner view.

setOwnerId

public static void setOwnerId(String id)
Set ID of the owner view.

Parameters:
the - id of the owner view.

setTooltop

public void setTooltop(String text,
                       String[][] properties)
Set the tooltip text of the label.

Parameters:
text - the tooltip text
properties - the set of property names and values. [0]=name, [1]=value.

getMenuText

public String getMenuText()
Returns:
the text to be shown on menu.