com.tensegrity.gui.swt.control.labels
Class MarkerLabel

java.lang.Object
  extended byorg.eclipse.swt.widgets.Widget
      extended byorg.eclipse.swt.widgets.Control
          extended byorg.eclipse.swt.widgets.Scrollable
              extended byorg.eclipse.swt.widgets.Composite
                  extended byorg.eclipse.swt.widgets.Canvas
                      extended bycom.tensegrity.gui.swt.control.widgets.BorderedWidget
                          extended bycom.tensegrity.gui.swt.control.labels.MarkerLabel
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class MarkerLabel
extends BorderedWidget

Gui component for visualizing a marker format object

Version:
$Id: MarkerLabel.java,v 1.8 2006/03/02 11:41:40 BurkhardWick Exp $
Author:
Arnd Houben

Field Summary
 
Fields inherited from class com.tensegrity.gui.swt.control.widgets.BorderedWidget
indent
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
MarkerLabel(org.eclipse.swt.widgets.Composite parent, int style, MarkerFormat markerFormat)
          Constructor which requires an initial MarkerFormat instance
MarkerLabel(org.eclipse.swt.widgets.Composite parent, int style, MarkerItem markerItem)
          Constructor which requires an initial MarkerItem instance
 
Method Summary
 org.eclipse.swt.graphics.Point computeSize(int wHint, int hHint, boolean changed)
           
protected  void draw(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle cArea)
          Draw the content.
 MarkerItem getMarkerItem()
          Returns the corresponding marker item
 void setType(int type)
          Sets the marker item type
protected  void widgetDisposed(org.eclipse.swt.events.DisposeEvent de)
          Called on dispose events.
 
Methods inherited from class com.tensegrity.gui.swt.control.widgets.BorderedWidget
hasBorder, setBorderColor
 
Methods inherited from class org.eclipse.swt.widgets.Canvas
getCaret, scroll, setCaret, setFont
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, 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.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, 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, 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
 

Constructor Detail

MarkerLabel

public MarkerLabel(org.eclipse.swt.widgets.Composite parent,
                   int style,
                   MarkerFormat markerFormat)
Constructor which requires an initial MarkerFormat instance

Parameters:
parent - the composite to add this MarkerLabel to
style - SWT style bits (only SWT.BORDER has an effect)
markerFormat - the initial MarkerFormat

MarkerLabel

public MarkerLabel(org.eclipse.swt.widgets.Composite parent,
                   int style,
                   MarkerItem markerItem)
Constructor which requires an initial MarkerItem instance

Parameters:
parent - the composite to add this MarkerLabel to
style - SWT style bits (only SWT.BORDER has an effect)
markerItem - the initial MarkerItem
Method Detail

getMarkerItem

public MarkerItem getMarkerItem()
Returns the corresponding marker item

Returns:
the marker item instance

setType

public final void setType(int type)
Sets the marker item type

Parameters:
type - the new marker item type

widgetDisposed

protected void widgetDisposed(org.eclipse.swt.events.DisposeEvent de)
Description copied from class: BorderedWidget
Called on dispose events. Implementing classes should release all their requested resources

Specified by:
widgetDisposed in class BorderedWidget
Parameters:
de - a DisposeEvent instance with additional information

draw

protected void draw(org.eclipse.swt.graphics.GC gc,
                    org.eclipse.swt.graphics.Rectangle cArea)
Description copied from class: BorderedWidget
Draw the content.

Specified by:
draw in class BorderedWidget
Parameters:
gc - the graphicd context to use for drawing
cArea - the area an implementing class can use for drawing

computeSize

public org.eclipse.swt.graphics.Point computeSize(int wHint,
                                                  int hHint,
                                                  boolean changed)
Overrides:
computeSize in class BorderedWidget


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.