Class GeographicalComponentViewer

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
com._1c.g5.v8.dt.geographicalschema.ui.internal.widgets.GeographicalComponentViewer
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
Direct Known Subclasses:
HeaderViewer, LegendViewer, MapViewer

public abstract class GeographicalComponentViewer extends org.eclipse.swt.widgets.Canvas
Abstract class for viewers implementation.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum for resize directions representation.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final org.eclipse.swt.graphics.Color
    Black color
    protected Map<Color,org.eclipse.swt.graphics.Color>
    Map for SWT Color storage
    View image provider
    View presenter
    protected static final org.eclipse.swt.graphics.Color
    White color

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

    handle
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates new instance of GeographicalComponentViewer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected abstract void
    fillContents(org.eclipse.swt.graphics.GC gc)
    Draw control's contents
    Gets data for this component
    Gets image provider for current view
    getPointedArea(org.eclipse.swt.widgets.Event event)
    Gets change direction from event coordinates.
    void
    Resets viewer's bounds.
    void
    setComponentBounds(int x, int y, int width, int height)
    Sets component's bounds
    void
    Sets image provider for current view
    void
    Scales component to its dimensions.

    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, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toString

    Methods inherited from class org.eclipse.swt.widgets.Scrollable

    computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, 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, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, 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, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update

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

    addDisposeListener, addListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.swt.graphics.Drawable

    isAutoScalable
  • Field Details

    • presenter

      protected IGeographicalSchemaPresenter presenter
      View presenter
    • WHITE

      protected static final org.eclipse.swt.graphics.Color WHITE
      White color
    • BLACK

      protected static final org.eclipse.swt.graphics.Color BLACK
      Black color
    • colorMap

      protected Map<Color,org.eclipse.swt.graphics.Color> colorMap
      Map for SWT Color storage
    • imageProvider

      protected ComponentImageProvider imageProvider
      View image provider
  • Constructor Details

  • Method Details

    • setImageProvider

      public void setImageProvider(ComponentImageProvider imageProvider)
      Sets image provider for current view
      Parameters:
      imageProvider - the imageProvider to set, cannot be null
    • getImageProvider

      public ComponentImageProvider getImageProvider()
      Gets image provider for current view
      Returns:
      image provider for current view, can be null
    • resetBounds

      public void resetBounds()
      Resets viewer's bounds.
    • getPointedArea

      public GeographicalComponentViewer.Direction getPointedArea(org.eclipse.swt.widgets.Event event)
      Gets change direction from event coordinates.
      Parameters:
      event - SWT event Event, cannot be null
      Returns:
      pointed area GeographicalComponentViewer.Direction, never null
    • getComponentData

      public GeographicalSchemaComponent getComponentData()
      Gets data for this component
      Returns:
      the componentData, cannot be null
    • updateBounds

      public void updateBounds()
      Scales component to its dimensions.
    • setComponentBounds

      public void setComponentBounds(int x, int y, int width, int height)
      Sets component's bounds
      Parameters:
      x - component's x coordinate
      y - component's y coordinate
      width - component's width
      height - component's height
    • dispose

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

      protected abstract void fillContents(org.eclipse.swt.graphics.GC gc)
      Draw control's contents
      Parameters:
      gc - gc to draw with, cannot be null