Class LinearScaleTickLabels

java.lang.Object
org.eclipse.draw2d.Figure
org.eclipse.nebula.visualization.xygraph.linearscale.LinearScaleTickLabels
All Implemented Interfaces:
org.eclipse.draw2d.IFigure
Direct Known Subclasses:
LinearScaleTickLabels2

public class LinearScaleTickLabels
extends org.eclipse.draw2d.Figure
Linear Scale tick labels.
  • 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 
    Modifier and Type Field Description
    protected static java.lang.String MINUS  

    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
    LinearScaleTickLabels​(IScaleProvider linearScale)
    Constructor.
    LinearScaleTickLabels​(IScaleProvider linearScale, ITicksProvider ticks)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    protected void drawXTick​(org.eclipse.draw2d.Graphics graphics)
    Draw the X tick.
    protected void drawYTick​(org.eclipse.draw2d.Graphics graphics)
    Draw the Y tick.
    int getGridStepInPixel()  
    IScaleProvider getScale()  
    int getTickLabelMaxHeight()  
    int getTickLabelMaxLength()  
    java.util.ArrayList<java.lang.Integer> getTickLabelPositions()
    Gets the tick label positions.
    ITicksProvider getTicksProvider()  
    java.util.ArrayList<java.lang.Boolean> getTickVisibilities()  
    boolean isShowMaxLabel()  
    boolean isShowMinLabel()  
    protected void paintClientArea​(org.eclipse.draw2d.Graphics graphics)  
    void setScale​(IScaleProvider scale)
    sets the type of scale
    void setShowMaxLabel​(boolean showMaxLabel)
    set whether max label is shown or not
    void setShowMinLabel​(boolean showMinLabel)
    sets whether min label is shown or not
    protected void setTicksProvider​(ITicksProvider ticks)
    Sets the ticks provider
    Range update​(int length)
    Updates the tick labels.

    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, 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
  • Field Details

  • Constructor Details

  • Method Details

    • getTicksProvider

      public ITicksProvider getTicksProvider()
      Returns:
      the ticks provider used
    • setTicksProvider

      protected void setTicksProvider​(ITicksProvider ticks)
      Sets the ticks provider
      Parameters:
      ticks -
    • getGridStepInPixel

      public int getGridStepInPixel()
      Returns:
      the gridStepInPixel
    • getTickLabelPositions

      public java.util.ArrayList<java.lang.Integer> getTickLabelPositions()
      Gets the tick label positions.
      Returns:
      the tick label positions
    • getTickVisibilities

      public java.util.ArrayList<java.lang.Boolean> getTickVisibilities()
      Returns:
      the tickVisibilities
    • drawXTick

      protected void drawXTick​(org.eclipse.draw2d.Graphics graphics)
      Draw the X tick. To be overridden if needed.
      Parameters:
      graphics - the graphics context
    • drawYTick

      protected void drawYTick​(org.eclipse.draw2d.Graphics graphics)
      Draw the Y tick. To be overridden if needed.
      Parameters:
      graphics - the graphics context
    • paintClientArea

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

      public boolean isShowMinLabel()
      Returns:
      True is min label is shown
    • setShowMinLabel

      public void setShowMinLabel​(boolean showMinLabel)
      sets whether min label is shown or not
      Parameters:
      showMinLabel -
    • isShowMaxLabel

      public boolean isShowMaxLabel()
      Returns:
      True if max label is shown
    • setShowMaxLabel

      public void setShowMaxLabel​(boolean showMaxLabel)
      set whether max label is shown or not
      Parameters:
      showMaxLabel -
    • getTickLabelMaxLength

      public int getTickLabelMaxLength()
      Returns:
      the tickLabelMaxLength
    • getTickLabelMaxHeight

      public int getTickLabelMaxHeight()
      Returns:
      the tickLabelMaxHeight
    • getScale

      public IScaleProvider getScale()
      Returns:
      the scale
    • setScale

      public void setScale​(IScaleProvider scale)
      sets the type of scale
      Parameters:
      scale -
    • update

      public Range update​(int length)
      Updates the tick labels.
      Parameters:
      length - scale tick length (without margin)
      Returns:
      returns a new axis Range if scale has changed and has ticks at ends and its size is > 1, null otherwise.