Class RootFigure

java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.nebula.widgets.timeline.figures.RootFigure
All Implemented Interfaces:
org.eclipse.draw2d.IFigure, IStyledFigure

public class RootFigure
extends org.eclipse.draw2d.Figure
implements IStyledFigure
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.draw2d.Figure

    org.eclipse.draw2d.Figure.FigureIterator, org.eclipse.draw2d.Figure.IdentitySearch

    Nested classes/interfaces inherited from interface org.eclipse.draw2d.IFigure

    org.eclipse.draw2d.IFigure.NoInsets
  • Field Summary

    Fields inherited from class org.eclipse.draw2d.Figure

    bgColor, border, bounds, fgColor, flags, font, MAX_FLAG, maxSize, minSize, NO_MANAGER, prefSize, toolTip

    Fields inherited from interface org.eclipse.draw2d.IFigure

    MAX_DIMENSION, MIN_DIMENSION, NO_INSETS
  • Constructor Summary

    Constructors 
    Constructor Description
    RootFigure​(org.eclipse.jface.resource.ResourceManager resourceManager)  
  • Method Summary

    Modifier and Type Method Description
    void addCursorListener​(ICursorListener listener)
    Registers the given listener as a ICursorListener of this IFigure.
    void clear()
    Remove all tracks and cursors.
    org.eclipse.nebula.widgets.timeline.ICursor createCursor​(long eventTime)
    Create a new cursor model instance.
    CursorFigure createCursorFigure​(org.eclipse.nebula.widgets.timeline.ICursor cursor)
    Create a cursor figure.
    EventFigure createEventFigure​(LaneFigure parent, org.eclipse.nebula.widgets.timeline.ITimelineEvent event)
    Create a new figure for the given event.
    LaneFigure createLaneFigure​(TrackFigure track)  
    TrackFigure createTrackFigure​(java.lang.String title)  
    void deleteCursor​(org.eclipse.nebula.widgets.timeline.ICursor cursor)
    Delete a cursor.
    void deleteCursorFigure​(CursorFigure cursorFigure)
    Delete a cursor figure from the detail and overview area.
    void deleteEventFigure​(EventFigure eventFigure)
    Delete an eventFigure from its lane and the overview are.
    void fireTimebaseChanged()
    The offset or the scaling (or both) changed.
    static <T> T getFigure​(org.eclipse.draw2d.IFigure figure, java.lang.Class<T> clazz)  
    static int getLaneCount​(org.eclipse.draw2d.IFigure figure)
    Get total number of lanes.
    static int getLaneIndex​(EventFigure figure)
    Get the absolute index of the lane where figure belongs to.
    org.eclipse.jface.resource.ResourceManager getResourceManager()  
    static RootFigure getRootFigure​(org.eclipse.draw2d.IFigure figure)  
    EventFigure getSelection()
    Get the selected figure.
    ITimelineStyleProvider getStyleProvider()  
    TimeBaseConverter getTimeViewDetails()  
    static TimeBaseConverter getTimeViewDetails​(org.eclipse.draw2d.IFigure parent)  
    void removeCursorListener​(ICursorListener listener)
    Unregisters the given listener, so that it will no longer receive notifications of cursor events
    void setSelection​(EventFigure eventFigure)
    Set the selection figure.
    void setStyleProvider​(ITimelineStyleProvider styleProvider)  
    void updateCursorFigure​(org.eclipse.draw2d.IFigure figure, org.eclipse.nebula.widgets.timeline.ICursor cursor)
    Update a provided cursor figure with fresh cursor data.
    void updateEventFigure​(org.eclipse.draw2d.IFigure figure, org.eclipse.nebula.widgets.timeline.ITimelineEvent event)
    Update a provided event figure with fresh event data.
    void updateStyle​(ITimelineStyleProvider styleProvider)  
    void updateTrackFigure​(org.eclipse.draw2d.IFigure figure, java.lang.String title)
    Update the title of a given track figure.
    void zoom​(double factor, int zoomCenterX)  
    void zoomIn​(int zoomCenterX)  
    void zoomOut​(int zoomCenterX)  

    Methods inherited from class org.eclipse.draw2d.Figure

    add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findDescendantAtExcluding, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, findMouseEventTargetInDescendantsAt, fireCoordinateSystemChanged, fireFigureMoved, fireMoved, firePropertyChange, firePropertyChange, firePropertyChange, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFlag, getFont, getForegroundColor, getInsets, getLayoutManager, getListeners, getLocalBackgroundColor, getLocalFont, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isMouseEventTarget, isOpaque, isRequestFocusEnabled, isShowing, isValid, isValidationRoot, isVisible, layout, paint, paintBorder, paintChildren, paintClientArea, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, useLocalCoordinates, validate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RootFigure

      public RootFigure​(org.eclipse.jface.resource.ResourceManager resourceManager)
  • Method Details

    • getRootFigure

      public static RootFigure getRootFigure​(org.eclipse.draw2d.IFigure figure)
    • getTimeViewDetails

      public static TimeBaseConverter getTimeViewDetails​(org.eclipse.draw2d.IFigure parent)
    • getFigure

      public static <T> T getFigure​(org.eclipse.draw2d.IFigure figure, java.lang.Class<T> clazz)
    • getLaneCount

      public static int getLaneCount​(org.eclipse.draw2d.IFigure figure)
      Get total number of lanes. Sums up lanes of all tracks.
      Parameters:
      figure - any figure of the timeline diagram
      Returns:
      total amount of lanes
    • getLaneIndex

      public static int getLaneIndex​(EventFigure figure)
      Get the absolute index of the lane where figure belongs to.
      Parameters:
      figure - EventFigure of the lane to retrieve index from
      Returns:
      lane index
    • setStyleProvider

      public void setStyleProvider​(ITimelineStyleProvider styleProvider)
    • getResourceManager

      public org.eclipse.jface.resource.ResourceManager getResourceManager()
    • addCursorListener

      public void addCursorListener​(ICursorListener listener)
      Registers the given listener as a ICursorListener of this IFigure. Will be notified of cursor creation and deletion.
      Parameters:
      listener - listener to register
    • removeCursorListener

      public void removeCursorListener​(ICursorListener listener)
      Unregisters the given listener, so that it will no longer receive notifications of cursor events
      Parameters:
      listener - listener to unregister
    • getStyleProvider

      public ITimelineStyleProvider getStyleProvider()
    • clear

      public void clear()
      Remove all tracks and cursors. Leaves the view empty.
    • getTimeViewDetails

      public TimeBaseConverter getTimeViewDetails()
    • fireTimebaseChanged

      public void fireTimebaseChanged()
      The offset or the scaling (or both) changed. We need to update the detail area and the damaged part of the overview area.
    • zoomIn

      public void zoomIn​(int zoomCenterX)
    • zoomOut

      public void zoomOut​(int zoomCenterX)
    • zoom

      public void zoom​(double factor, int zoomCenterX)
    • updateStyle

      public void updateStyle​(ITimelineStyleProvider styleProvider)
      Specified by:
      updateStyle in interface IStyledFigure
    • createTrackFigure

      public TrackFigure createTrackFigure​(java.lang.String title)
    • createLaneFigure

      public LaneFigure createLaneFigure​(TrackFigure track)
    • createCursor

      public org.eclipse.nebula.widgets.timeline.ICursor createCursor​(long eventTime)
      Create a new cursor model instance.
      Parameters:
      eventTime - time to set cursor to
      Returns:
      cursor instance
    • deleteCursor

      public void deleteCursor​(org.eclipse.nebula.widgets.timeline.ICursor cursor)
      Delete a cursor.
      Parameters:
      cursor - cursor to delete
    • setSelection

      public void setSelection​(EventFigure eventFigure)
      Set the selection figure. Stores the selected element and highlights the figure.
      Parameters:
      eventFigure - event figure to select
    • getSelection

      public EventFigure getSelection()
      Get the selected figure.
      Returns:
      selected figure or null
    • createEventFigure

      public EventFigure createEventFigure​(LaneFigure parent, org.eclipse.nebula.widgets.timeline.ITimelineEvent event)
      Create a new figure for the given event.
      Parameters:
      parent - parent figure for new eventFigure
      event - event to create figure for
      Returns:
      created eventFigure in detail area
    • deleteEventFigure

      public void deleteEventFigure​(EventFigure eventFigure)
      Delete an eventFigure from its lane and the overview are.
      Parameters:
      eventFigure - figure to delete
    • createCursorFigure

      public CursorFigure createCursorFigure​(org.eclipse.nebula.widgets.timeline.ICursor cursor)
      Create a cursor figure.
      Parameters:
      cursor - cursor to create
      Returns:
      created figure in detail area
    • deleteCursorFigure

      public void deleteCursorFigure​(CursorFigure cursorFigure)
      Delete a cursor figure from the detail and overview area.
      Parameters:
      cursorFigure - figure to delete
    • updateCursorFigure

      public void updateCursorFigure​(org.eclipse.draw2d.IFigure figure, org.eclipse.nebula.widgets.timeline.ICursor cursor)
      Update a provided cursor figure with fresh cursor data.
      Parameters:
      figure - figure to update
      cursor - new cursor data
    • updateEventFigure

      public void updateEventFigure​(org.eclipse.draw2d.IFigure figure, org.eclipse.nebula.widgets.timeline.ITimelineEvent event)
      Update a provided event figure with fresh event data.
      Parameters:
      figure - figure to update
      event - new cursor data
    • updateTrackFigure

      public void updateTrackFigure​(org.eclipse.draw2d.IFigure figure, java.lang.String title)
      Update the title of a given track figure.
      Parameters:
      figure - figure to update
      title - title to set