com.tensegrity.gui.swt.control.preview
Class MarkerFormatPreview

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.preview.AbstractPreview
                          extended bycom.tensegrity.gui.swt.control.preview.MarkerFormatPreview
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable, Preview

public class MarkerFormatPreview
extends AbstractPreview

A preview for marker items.

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

Field Summary
 
Fields inherited from class com.tensegrity.gui.swt.control.preview.AbstractPreview
preferredSize, previewedItem
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
MarkerFormatPreview(org.eclipse.swt.widgets.Composite parent, int style, AbstractPreviewDialog previewDialog)
          Constructor which requires an instance of an AbstractPreviewDialog to which this MarkerFormatPreview is registered
 
Method Summary
 void draw(org.eclipse.swt.graphics.GC gc)
          A preview should be able to draw its previewed item.
 void drawMarker(org.eclipse.swt.graphics.GC gc)
          Draws the Marker on the given graphics context.
 
Methods inherited from class com.tensegrity.gui.swt.control.preview.AbstractPreview
computeSize, paintControl, updatePreview
 
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

MarkerFormatPreview

public MarkerFormatPreview(org.eclipse.swt.widgets.Composite parent,
                           int style,
                           AbstractPreviewDialog previewDialog)
Constructor which requires an instance of an AbstractPreviewDialog to which this MarkerFormatPreview is registered

Parameters:
parent - the composite to add this MarkerFormatPreview to
style - SWT style bits
previewDialog - the AbstractPreviewDialog to use
Method Detail

draw

public void draw(org.eclipse.swt.graphics.GC gc)
Description copied from interface: Preview
A preview should be able to draw its previewed item. So this method is invoked whenever the preview needs to draw itself, e.g. on a redraw() request.

Parameters:
gc - the graphic context to draw with

drawMarker

public void drawMarker(org.eclipse.swt.graphics.GC gc)
                throws PaintFormatParseException
Draws the Marker on the given graphics context.

Parameters:
gc - a GC instance to draw on.
Throws:
PaintFormatParseException - if the marker's paint format description is not valid


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