Class LinearScaledMarker

java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.nebula.visualization.xygraph.linearscale.LinearScaledMarker
All Implemented Interfaces:
org.eclipse.draw2d.IFigure

public class LinearScaledMarker
extends org.eclipse.draw2d.Figure
A linear scale related marker, whose orientation, range, mark position etc. are determined by the scale. It must have the same length and bounds.x(for horizontal) or bounds.y(for vertical) with the scale.
  • 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
    LinearScaledMarker​(LinearScale scale)
    Constructor
  • Method Summary

    Modifier and Type Method Description
    void addMarkerElement​(java.lang.String label, double value)
    Add (if the marker does not exist) or change a marker element.
    void addMarkerElement​(java.lang.String label, double value, org.eclipse.swt.graphics.RGB color)
    Add (if the marker does not exist) or change a marker element.
    java.lang.String[] getLabels()  
    AbstractScale.LabelSide getMakerLabelsPosition()  
    AbstractScale.LabelSide getMakerLablesPosition()
    Deprecated.
    use correctly spelled getMakerLabelsPosition()
    org.eclipse.draw2d.geometry.Dimension getPreferredSize​(int wHint, int hHint)  
    LinearScale getScale()  
    boolean isMarkerLabelVisible()  
    boolean isMarkerLableVisible()
    Deprecated.
    use correctly spelled isMarkerLabelVisible()
    boolean isMarkerLineVisible()  
    protected void paintClientArea​(org.eclipse.draw2d.Graphics graphics)  
    void removeMarkerElement​(java.lang.String label)
    Removes the marker element with the given label
    void setBounds​(org.eclipse.draw2d.geometry.Rectangle rect)  
    void setDirty​(boolean dirty)  
    void setLabelSide​(AbstractScale.LabelSide labelSide)  
    void setMarkerElementColor​(java.lang.String label, org.eclipse.swt.graphics.RGB color)
    If the marker exists, set its color.
    void setMarkerElementValue​(java.lang.String label, double value)
    If the marker exists, set its value.
    void setMarkerLabelVisible​(boolean markerLabelVisible)  
    void setMarkerLableVisible​(boolean markerLabelVisible)
    Deprecated.
    use correctly spelled setMarkerLabelVisible(boolean)
    void setMarkerLineVisible​(boolean markerLineVisible)  
    void setScale​(LinearScale scale)  
    void updateMarkerElements()
    updates marker elements of ticks
    void updateMarkerElments()
    Deprecated.
    void updateTick()
    Updates the tick, recalculate all inner parameters

    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, 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, paintFigure, primTranslate, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, 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

  • Method Details

    • setDirty

      public void setDirty​(boolean dirty)
      Parameters:
      dirty - the dirty to set
    • setMarkerElementValue

      public void setMarkerElementValue​(java.lang.String label, double value)
      If the marker exists, set its value.
      Parameters:
      label - the label of the marker element, it must be unique.
      value - the value to be set
    • setMarkerElementColor

      public void setMarkerElementColor​(java.lang.String label, org.eclipse.swt.graphics.RGB color)
      If the marker exists, set its color.
      Parameters:
      label - the label of the marker element, it must be unique.
      color - the color to be set
    • addMarkerElement

      public void addMarkerElement​(java.lang.String label, double value, org.eclipse.swt.graphics.RGB color)
      Add (if the marker does not exist) or change a marker element.
      Parameters:
      label - the label of the marker element, it must be unique.
      value - the value of the marker element
      color - the color of the marker element
    • addMarkerElement

      public void addMarkerElement​(java.lang.String label, double value)
      Add (if the marker does not exist) or change a marker element.
      Parameters:
      label - the label of the marker element, it must be unique.
      value - the value of the marker element
    • removeMarkerElement

      public void removeMarkerElement​(java.lang.String label)
      Removes the marker element with the given label
      Parameters:
      label -
    • paintClientArea

      protected void paintClientArea​(org.eclipse.draw2d.Graphics graphics)
      Overrides:
      paintClientArea in class org.eclipse.draw2d.Figure
    • setBounds

      public void setBounds​(org.eclipse.draw2d.geometry.Rectangle rect)
      Specified by:
      setBounds in interface org.eclipse.draw2d.IFigure
      Overrides:
      setBounds in class org.eclipse.draw2d.Figure
    • updateTick

      public void updateTick()
      Updates the tick, recalculate all inner parameters
    • getLabels

      public java.lang.String[] getLabels()
      Returns:
      the labels
    • updateMarkerElments

      @Deprecated public void updateMarkerElments()
      Deprecated.
      Use correctly spelled updateMarkerElements() instead.
    • updateMarkerElements

      public void updateMarkerElements()
      updates marker elements of ticks
    • setScale

      public void setScale​(LinearScale scale)
      Parameters:
      scale - the scale to set
    • getScale

      public LinearScale getScale()
      Returns:
      the scale
    • setLabelSide

      public void setLabelSide​(AbstractScale.LabelSide labelSide)
      Parameters:
      labelSide - the makerLabelsPosition to set
    • getMakerLabelsPosition

      public AbstractScale.LabelSide getMakerLabelsPosition()
      Returns:
      the makerLabelsPosition
    • getMakerLablesPosition

      @Deprecated public AbstractScale.LabelSide getMakerLablesPosition()
      Deprecated.
      use correctly spelled getMakerLabelsPosition()
    • setMarkerLineVisible

      public void setMarkerLineVisible​(boolean markerLineVisible)
      Parameters:
      markerLineVisible - the markerLineVisible to set
    • isMarkerLineVisible

      public boolean isMarkerLineVisible()
      Returns:
      the markerLineVisible
    • setMarkerLabelVisible

      public void setMarkerLabelVisible​(boolean markerLabelVisible)
      Parameters:
      markerLabelVisible - the markerLabelVisible to set
    • setMarkerLableVisible

      @Deprecated public void setMarkerLableVisible​(boolean markerLabelVisible)
      Deprecated.
      use correctly spelled setMarkerLabelVisible(boolean)
    • isMarkerLabelVisible

      public boolean isMarkerLabelVisible()
      Returns:
      the markerLabelVisible
    • isMarkerLableVisible

      @Deprecated public boolean isMarkerLableVisible()
      Deprecated.
      use correctly spelled isMarkerLabelVisible()
    • getPreferredSize

      public org.eclipse.draw2d.geometry.Dimension getPreferredSize​(int wHint, int hHint)
      Specified by:
      getPreferredSize in interface org.eclipse.draw2d.IFigure
      Overrides:
      getPreferredSize in class org.eclipse.draw2d.Figure