Class HopGuiAbstractGraph
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- org.apache.hop.ui.hopgui.perspective.execution.DragViewZoomBase
-
- org.apache.hop.ui.hopgui.perspective.dataorch.HopGuiAbstractGraph
-
- All Implemented Interfaces:
IGraphSnapAlignDistribute,org.eclipse.swt.graphics.Drawable
- Direct Known Subclasses:
HopGuiPipelineGraph,HopGuiWorkflowGraph
public abstract class HopGuiAbstractGraph extends DragViewZoomBase implements IGraphSnapAlignDistribute
The beginnings of a common graph object, used by JobGraph and HopGuiPipelineGraph to share common behaviors.
-
-
Field Summary
Fields Modifier and Type Field Description protected HopGuihopGuiprotected PointiconOffsetprotected Stringidprotected PointnoteOffsetprotected org.eclipse.swt.widgets.CompositeparentCompositeprotected org.eclipse.swt.custom.CTabItemparentTabItemstatic StringSTATE_MAGNIFICATIONstatic StringSTATE_SCROLL_X_SELECTIONstatic StringSTATE_SCROLL_Y_SELECTIONprotected Map<String,Object>stateMapThis is a state map which can be used by plugins to render extra states on top of pipelines and workflows or their components.protected org.eclipse.swt.widgets.ToolTiptoolTipprotected IVariablesvariables-
Fields inherited from class org.apache.hop.ui.hopgui.perspective.execution.DragViewZoomBase
canvas, graphPort, magnification, maximum, offset, viewDrag, viewDragBaseOffset, viewDragStart, viewPort, viewPortNavigation, viewPortStart
-
-
Constructor Summary
Constructors Constructor Description HopGuiAbstractGraph(HopGui hopGui, org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.custom.CTabItem parentTabItem)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidalignBottom()voidalignLeft()voidalignRight()voidalignTop()voidapplyStateProperties(Map<String,Object> stateProperties)abstract SnapAllignDistributecreateSnapAlignDistribute()voiddispose()voiddistributeHorizontal()voiddistributeVertical()protected voidenableSnapAlignDistributeMenuItems(IHopFileType fileType, boolean selectedTransform)booleanforceFocus()RectanglegetGraphPort()Gets graphPortStringgetId()Gets idfloatgetMagnification()Gets magnificationorg.eclipse.swt.widgets.CompositegetParentComposite()Gets parentCompositeorg.eclipse.swt.custom.CTabItemgetParentTabItem()Gets parentTabItemMap<String,Object>getStateMap()Gets stateMapMap<String,Object>getStateProperties()IVariablesgetVariables()Gets variablesRectanglegetViewPort()Gets viewPortabstract booleanhasChanged()protected org.eclipse.swt.widgets.DisplayhopDisplay()protected org.eclipse.swt.widgets.ShellhopShell()voidredraw()voidsetGraphPort(Rectangle graphPort)Sets graphPortvoidsetMagnification(float magnification)Sets magnificationvoidsetParentComposite(org.eclipse.swt.widgets.Composite parentComposite)voidsetParentTabItem(org.eclipse.swt.custom.CTabItem parentTabItem)voidsetStateMap(Map<String,Object> stateMap)voidsetVariables(IVariables variables)voidsetViewPort(Rectangle viewPort)Sets viewPortprotected voidshowToolTip(org.eclipse.swt.graphics.Point location)voidsnapToGrid()-
Methods inherited from class org.apache.hop.ui.hopgui.perspective.execution.DragViewZoomBase
calculateCorrectedMagnification, dragView, dragViewPort, getArea, mouseScrolled, screen2real, setupDragView, setZoomLabel, validateOffset, viewDown, viewLeft, viewReset, viewRight, viewUp, zoom100Percent, zoom100Percent2, zoomFitToScreen, zoomFitToScreen2, zoomIn, zoomIn2, zoomOut
-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, redraw, 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, dragDetect, dragDetect, 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, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, 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
-
-
-
-
Field Detail
-
STATE_MAGNIFICATION
public static final String STATE_MAGNIFICATION
- See Also:
- Constant Field Values
-
STATE_SCROLL_X_SELECTION
public static final String STATE_SCROLL_X_SELECTION
- See Also:
- Constant Field Values
-
STATE_SCROLL_Y_SELECTION
public static final String STATE_SCROLL_Y_SELECTION
- See Also:
- Constant Field Values
-
hopGui
protected HopGui hopGui
-
variables
protected IVariables variables
-
parentComposite
protected org.eclipse.swt.widgets.Composite parentComposite
-
parentTabItem
protected org.eclipse.swt.custom.CTabItem parentTabItem
-
iconOffset
protected Point iconOffset
-
noteOffset
protected Point noteOffset
-
id
protected final String id
-
toolTip
protected org.eclipse.swt.widgets.ToolTip toolTip
-
-
Constructor Detail
-
HopGuiAbstractGraph
public HopGuiAbstractGraph(HopGui hopGui, org.eclipse.swt.widgets.Composite parent, int style, org.eclipse.swt.custom.CTabItem parentTabItem)
-
-
Method Detail
-
hopShell
protected org.eclipse.swt.widgets.Shell hopShell()
-
hopDisplay
protected org.eclipse.swt.widgets.Display hopDisplay()
-
hasChanged
public abstract boolean hasChanged()
-
redraw
public void redraw()
- Specified by:
redrawin classDragViewZoomBase
-
forceFocus
public boolean forceFocus()
- Overrides:
forceFocusin classorg.eclipse.swt.widgets.Control
-
dispose
public void dispose()
- Overrides:
disposein classorg.eclipse.swt.widgets.Widget
-
getParentTabItem
public org.eclipse.swt.custom.CTabItem getParentTabItem()
Gets parentTabItem- Returns:
- value of parentTabItem
-
setParentTabItem
public void setParentTabItem(org.eclipse.swt.custom.CTabItem parentTabItem)
- Parameters:
parentTabItem- The parentTabItem to set
-
getParentComposite
public org.eclipse.swt.widgets.Composite getParentComposite()
Gets parentComposite- Returns:
- value of parentComposite
-
setParentComposite
public void setParentComposite(org.eclipse.swt.widgets.Composite parentComposite)
- Parameters:
parentComposite- The parentComposite to set
-
getId
public String getId()
Gets id- Returns:
- value of id
-
showToolTip
protected void showToolTip(org.eclipse.swt.graphics.Point location)
-
createSnapAlignDistribute
public abstract SnapAllignDistribute createSnapAlignDistribute()
- Specified by:
createSnapAlignDistributein interfaceIGraphSnapAlignDistribute
-
snapToGrid
public void snapToGrid()
- Specified by:
snapToGridin interfaceIGraphSnapAlignDistribute
-
alignLeft
public void alignLeft()
- Specified by:
alignLeftin interfaceIGraphSnapAlignDistribute
-
alignRight
public void alignRight()
- Specified by:
alignRightin interfaceIGraphSnapAlignDistribute
-
alignTop
public void alignTop()
- Specified by:
alignTopin interfaceIGraphSnapAlignDistribute
-
alignBottom
public void alignBottom()
- Specified by:
alignBottomin interfaceIGraphSnapAlignDistribute
-
distributeHorizontal
@GuiKeyboardShortcut(alt=true, key=16777220) @GuiOsxKeyboardShortcut(alt=true, key=16777220) public void distributeHorizontal()
- Specified by:
distributeHorizontalin interfaceIGraphSnapAlignDistribute
-
distributeVertical
@GuiOsxKeyboardShortcut(alt=true, key=16777217) public void distributeVertical()
- Specified by:
distributeVerticalin interfaceIGraphSnapAlignDistribute
-
getVariables
public IVariables getVariables()
Gets variables- Returns:
- value of variables
-
setVariables
public void setVariables(IVariables variables)
- Parameters:
variables- The variables to set
-
setStateMap
public void setStateMap(Map<String,Object> stateMap)
- Parameters:
stateMap- The stateMap to set
-
getMagnification
public float getMagnification()
Gets magnification- Returns:
- value of magnification
-
setMagnification
public void setMagnification(float magnification)
Sets magnification- Parameters:
magnification- value of magnification
-
getViewPort
public Rectangle getViewPort()
Gets viewPort- Returns:
- value of viewPort
-
setViewPort
public void setViewPort(Rectangle viewPort)
Sets viewPort- Parameters:
viewPort- value of viewPort
-
getGraphPort
public Rectangle getGraphPort()
Gets graphPort- Returns:
- value of graphPort
-
setGraphPort
public void setGraphPort(Rectangle graphPort)
Sets graphPort- Parameters:
graphPort- value of graphPort
-
enableSnapAlignDistributeMenuItems
protected void enableSnapAlignDistributeMenuItems(IHopFileType fileType, boolean selectedTransform)
-
-