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 ClassesModifier and TypeClassDescriptionstatic enum
Enum for resize directions representation. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.eclipse.swt.graphics.Color
Black colorMap for SWTColor
storageprotected ComponentImageProvider
View image providerprotected IGeographicalSchemaPresenter
View presenterprotected static final org.eclipse.swt.graphics.Color
White colorFields inherited from class org.eclipse.swt.widgets.Control
handle
-
Constructor Summary
ConstructorsConstructorDescriptionGeographicalComponentViewer
(GeographicalSchemaView parent, IGeographicalSchemaPresenter presenter) Creates new instance ofGeographicalComponentViewer
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
protected abstract void
fillContents
(org.eclipse.swt.graphics.GC gc) Draw control's contentsGets data for this componentGets image provider for current viewgetPointedArea
(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 boundsvoid
setImageProvider
(ComponentImageProvider imageProvider) Sets image provider for current viewvoid
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
View presenter -
WHITE
protected static final org.eclipse.swt.graphics.Color WHITEWhite color -
BLACK
protected static final org.eclipse.swt.graphics.Color BLACKBlack color -
colorMap
Map for SWTColor
storage -
imageProvider
View image provider
-
-
Constructor Details
-
GeographicalComponentViewer
public GeographicalComponentViewer(GeographicalSchemaView parent, IGeographicalSchemaPresenter presenter) Creates new instance ofGeographicalComponentViewer
.- Parameters:
parent
- parentGeographicalSchemaView
, cannot benull
presenter
- application presenter, cannot benull
-
-
Method Details
-
setImageProvider
Sets image provider for current view- Parameters:
imageProvider
- the imageProvider to set, cannot benull
-
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
Gets change direction from event coordinates.- Parameters:
event
- SWT eventEvent
, cannot benull
- Returns:
- pointed area
GeographicalComponentViewer.Direction
, nevernull
-
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 coordinatey
- component's y coordinatewidth
- component's widthheight
- component's height
-
dispose
public void dispose()- Overrides:
dispose
in classorg.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 benull
-