org.eclipse.actf.visualization.ui

## Class VisualizationCanvas

- java.lang.Object
- - org.eclipse.swt.widgets.Widget
  - - org.eclipse.swt.widgets.Control
    - - org.eclipse.swt.widgets.Scrollable
      - - org.eclipse.swt.widgets.Composite
        - - org.eclipse.swt.widgets.Canvas
          - - org.eclipse.actf.visualization.ui.VisualizationCanvas

All Implemented Interfaces:
  org.eclipse.swt.graphics.Drawable

    public class VisualizationCanvas
    extends org.eclipse.swt.widgets.Canvas

Utility class to show visualization result into `Canvas`

### Field Summary

### Fields inherited from class org.eclipse.swt.widgets.Control

`handle`

### Constructor Summary

Constructors
Constructor and Description
`VisualizationCanvas(org.eclipse.swt.widgets.Composite parent)` Create `VisualizationCanvas`
`VisualizationCanvas(org.eclipse.swt.widgets.Composite parent, int style)` Create `VisualizationCanvas`

### Method Summary

Methods
`void` `clear()` Clear canvas image
`void` `highlight(List<IPositionSize> highlightList)` Highlight specified areas
`void` `setCurrentModelService(IModelService currentModelService)` Set current active model service
`void` `setSync(boolean sync)` Enable/disable view sync with target `IModelService`
`void` `showImage(org.eclipse.swt.graphics.ImageData imageData, IModelService targetModelService)` Show `ImageData` to Canvas and set specified `IModelService` as a view sync target

### Methods inherited from class org.eclipse.swt.widgets.Canvas

`drawBackground, getCaret, getIME, scroll, setCaret, setFont, setIME`

### Methods inherited from class org.eclipse.swt.widgets.Composite

`changed, computeSize, 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, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update`

### Methods inherited from class org.eclipse.swt.widgets.Widget

`addDisposeListener, addListener, dispose, getData, getData, getDisplay, getListeners, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, reskin, setData, setData, toString`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### VisualizationCanvas

    public VisualizationCanvas(org.eclipse.swt.widgets.Composite parent)

Create `VisualizationCanvas`

Parameters:
  `parent` - parent `Composite`

#### VisualizationCanvas

    public VisualizationCanvas(org.eclipse.swt.widgets.Composite parent,
                       int style)

Create `VisualizationCanvas`

Parameters:
  `parent` - parent `Composite`
  `style` - widget style

### Method Detail

#### setCurrentModelService

    public void setCurrentModelService(IModelService currentModelService)

Set current active model service

Parameters:
  `currentModelService` - target `IModelService`

#### showImage

    public void showImage(org.eclipse.swt.graphics.ImageData imageData,
                 IModelService targetModelService)

Show `ImageData` to Canvas and set specified `IModelService` as a view sync target

Parameters:
  `imageData` - image data to show
  `targetModelService` - target `IModelService` for view sync

#### clear

    public void clear()

Clear canvas image

#### highlight

    public void highlight(List<IPositionSize> highlightList)

Highlight specified areas

Parameters:
  `highlightList` - target area information in `IPositionSize` format

#### setSync

    public void setSync(boolean sync)

Enable/disable view sync with target `IModelService`

Parameters:
  `sync` - if true, enable view sync