Class AbstractGraph

  • All Implemented Interfaces:
    org.eclipse.swt.graphics.Drawable
    Direct Known Subclasses:
    JobGraph, TransGraph

    public abstract class AbstractGraph
    extends org.eclipse.swt.widgets.Composite
    The beginnings of a common graph object, used by JobGraph and TransGraph to share common behaviors.
    Author:
    Will Gorman (wgorman@pentaho.com)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.eclipse.swt.widgets.Canvas canvas  
      protected org.eclipse.swt.widgets.ScrollBar hori  
      protected org.pentaho.di.core.gui.Point iconoffset  
      protected float magnification  
      protected org.pentaho.di.core.gui.Point noteoffset  
      protected org.pentaho.di.core.gui.Point offset  
      protected org.eclipse.swt.widgets.ScrollBar vert  
      protected org.pentaho.ui.xul.XulDomContainer xulDomContainer  
      protected org.eclipse.swt.widgets.Combo zoomLabel  
      • Fields inherited from class org.eclipse.swt.widgets.Composite

        embeddedHandle
      • Fields inherited from class org.eclipse.swt.widgets.Widget

        handle
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractGraph​(org.eclipse.swt.widgets.Composite parent, int style)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void dispose()  
      protected <T extends org.pentaho.di.core.gui.GUIPositionInterface>
      void
      doRightClickSelection​(T clicked, List<T> selection)  
      boolean forceFocus()  
      protected org.pentaho.di.core.gui.Point getArea()  
      ChangedWarningInterface getChangedWarning()
      Gets the ChangedWarning for the given TabItemInterface class.
      protected abstract org.pentaho.di.core.gui.Point getOffset()  
      protected org.pentaho.di.core.gui.Point getOffset​(org.pentaho.di.core.gui.Point thumb, org.pentaho.di.core.gui.Point area)  
      protected org.pentaho.di.core.gui.Point getThumb​(org.pentaho.di.core.gui.Point area, org.pentaho.di.core.gui.Point transMax)  
      protected org.pentaho.di.core.gui.Point magnifyPoint​(org.pentaho.di.core.gui.Point p)  
      org.pentaho.di.core.gui.Point real2screen​(int x, int y)  
      void redraw()  
      org.pentaho.di.core.gui.Point screen2real​(int x, int y)  
      boolean setFocus()  
      protected void setZoomLabel()  
      int showChangedWarning()  
      int showChangedWarning​(String fileName)
      Show the ChangedWarning and return the users selection
      int sign​(int n)  
      void zoom100Percent()  
      void zoomIn()  
      void zoomOut()  
      • Methods inherited from class org.eclipse.swt.widgets.Composite

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

      • offset

        protected org.pentaho.di.core.gui.Point offset
      • iconoffset

        protected org.pentaho.di.core.gui.Point iconoffset
      • noteoffset

        protected org.pentaho.di.core.gui.Point noteoffset
      • vert

        protected org.eclipse.swt.widgets.ScrollBar vert
      • hori

        protected org.eclipse.swt.widgets.ScrollBar hori
      • canvas

        protected org.eclipse.swt.widgets.Canvas canvas
      • magnification

        protected float magnification
      • zoomLabel

        protected org.eclipse.swt.widgets.Combo zoomLabel
      • xulDomContainer

        protected org.pentaho.ui.xul.XulDomContainer xulDomContainer
    • Constructor Detail

      • AbstractGraph

        public AbstractGraph​(org.eclipse.swt.widgets.Composite parent,
                             int style)
    • Method Detail

      • getOffset

        protected abstract org.pentaho.di.core.gui.Point getOffset()
      • getOffset

        protected org.pentaho.di.core.gui.Point getOffset​(org.pentaho.di.core.gui.Point thumb,
                                                          org.pentaho.di.core.gui.Point area)
      • magnifyPoint

        protected org.pentaho.di.core.gui.Point magnifyPoint​(org.pentaho.di.core.gui.Point p)
      • getThumb

        protected org.pentaho.di.core.gui.Point getThumb​(org.pentaho.di.core.gui.Point area,
                                                         org.pentaho.di.core.gui.Point transMax)
      • sign

        public int sign​(int n)
      • getArea

        protected org.pentaho.di.core.gui.Point getArea()
      • setZoomLabel

        protected void setZoomLabel()
      • doRightClickSelection

        protected <T extends org.pentaho.di.core.gui.GUIPositionInterface> void doRightClickSelection​(T clicked,
                                                                                                      List<T> selection)
      • redraw

        public void redraw()
        Overrides:
        redraw in class org.eclipse.swt.widgets.Control
      • zoomIn

        public void zoomIn()
      • zoomOut

        public void zoomOut()
      • zoom100Percent

        public void zoom100Percent()
      • screen2real

        public org.pentaho.di.core.gui.Point screen2real​(int x,
                                                         int y)
      • real2screen

        public org.pentaho.di.core.gui.Point real2screen​(int x,
                                                         int y)
      • setFocus

        public boolean setFocus()
        Overrides:
        setFocus in class org.eclipse.swt.widgets.Composite
      • forceFocus

        public boolean forceFocus()
        Overrides:
        forceFocus in class org.eclipse.swt.widgets.Control
      • getChangedWarning

        public ChangedWarningInterface getChangedWarning()
        Gets the ChangedWarning for the given TabItemInterface class. This should be overridden by a given TabItemInterface class to support the changed warning dialog.
        Returns:
        ChangedWarningInterface The class that provides the dialog and return value
      • showChangedWarning

        public int showChangedWarning​(String fileName)
                               throws org.pentaho.di.core.exception.KettleException
        Show the ChangedWarning and return the users selection
        Returns:
        int Value of SWT.YES, SWT.NO, SWT.CANCEL
        Throws:
        org.pentaho.di.core.exception.KettleException
      • showChangedWarning

        public int showChangedWarning()
                               throws org.pentaho.di.core.exception.KettleException
        Throws:
        org.pentaho.di.core.exception.KettleException
      • dispose

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