samples.graph
Class SWTVertexImageShaperDemo

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 samples.graph.SWTVertexImageShaperDemo
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class SWTVertexImageShaperDemo
extends org.eclipse.swt.widgets.Composite

Demonstrates the use of images to represent graph vertices. The images are supplied via the VertexShapeFunction so that both the image and its shape can be utilized. The images used in this demo (courtesy of slashdot.org) are rectangular but with a transparent background. When vertices are represented by these images, it looks better if the actual shape of the opaque part of the image is computed so that the edge arrowheads follow the visual shape of the image. This demo uses the FourPassImageShaper class to compute the Shape from an image with transparent background.

Author:
Tom Nelson

Nested Class Summary
static class SWTVertexImageShaperDemo.DemoVertexImageShapeTransformer<V>
          this class exists only to provide settings to turn on/off shapes and image fill in this demo.
static class SWTVertexImageShaperDemo.DemoVertexImageTransformer<V>
          this class exists only to provide settings to turn on/off shapes and image fill in this demo.
static class SWTVertexImageShaperDemo.PickWithIconListener<V>
          When Vertices are picked, add a checkmark icon to the imager.
static class SWTVertexImageShaperDemo.VertexStringerImpl<V,S>
          A simple implementation of VertexStringer that gets Vertex labels from a Map
 
Field Summary
 
Fields inherited from class org.eclipse.swt.widgets.Control
handle
 
Constructor Summary
SWTVertexImageShaperDemo(org.eclipse.swt.widgets.Composite parent, int style)
           
 
Method Summary
static void main(String[] args)
          a driver for this demo
 
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, 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, setFont, 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

SWTVertexImageShaperDemo

public SWTVertexImageShaperDemo(org.eclipse.swt.widgets.Composite parent,
                                int style)
Method Detail

main

public static void main(String[] args)
a driver for this demo



Copyright © 2007. All Rights Reserved.