Class RoundScaledRamp

All Implemented Interfaces:

public class RoundScaledRamp
extends org.eclipse.draw2d.Figure
A ramp looks like a colorful donut, which is used to indicate the alarm limit, hihi, hi, lo or lolo. The ramp is based on a round scale which is in the same polar coordinate system as the ramp. The ramp could be used for any round scale based widgets, such as meter, gauge and knob etc.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  RoundScaledRamp.Threshold
    The alarm thereshold for a PV, includs HIHI, HI, LO or LOLO.
    (package private) static class  RoundScaledRamp.ThresholdMarker
    Hold the properties for each threshold.

    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

  • 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

  • Constructor Summary

    Constructor Description
    RoundScaledRamp​(RoundScale scale)
  • Method Summary

    Modifier and Type Method Description
    org.eclipse.draw2d.geometry.Dimension getPreferredSize​(int wHint, int hHint)  
    int getRampWidth()  
    RoundScale getScale()  
    protected void paintClientArea​(org.eclipse.draw2d.Graphics graphics)  
    void setBounds​(org.eclipse.draw2d.geometry.Rectangle rect)  
    void setDirty​(boolean dirty)  
    void setGradient​(boolean gradient)
    If gradient is true, the color will be displayed in gradient style
    void setRampWidth​(int rampWidth)  
    void setScale​(RoundScale scale)  
    void setThresholdColor​(RoundScaledRamp.Threshold thresholdName, color)
    Set color of the threshold.
    void setThresholdValue​(RoundScaledRamp.Threshold thresholdName, double value)
    Set value of the threshold.
    void setThresholdVisibility​(RoundScaledRamp.Threshold thresholdName, boolean visible)
    Set visibility of the threshold.

    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

    • setBounds

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

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

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

      public RoundScale getScale()
      the round scale for this ramp
    • setScale

      public void setScale​(RoundScale scale)
      scale - the round scale to set
    • getRampWidth

      public int getRampWidth()
      the rampWidth
    • setRampWidth

      public void setRampWidth​(int rampWidth)
      rampWidth - the rampWidth to set
    • setGradient

      public void setGradient​(boolean gradient)
      If gradient is true, the color will be displayed in gradient style
      gradient - the gradient to set
    • setThresholdValue

      public void setThresholdValue​(RoundScaledRamp.Threshold thresholdName, double value)
      Set value of the threshold.
      thresholdName - the threshold name which should be one of RoundScaledRamp.Threshold
      value - the value to set
    • setThresholdColor

      public void setThresholdColor​(RoundScaledRamp.Threshold thresholdName, color)
      Set color of the threshold.
      thresholdName - the threshold name which should be one of RoundScaledRamp.Threshold
      color - the RGB color to set
    • setThresholdVisibility

      public void setThresholdVisibility​(RoundScaledRamp.Threshold thresholdName, boolean visible)
      Set visibility of the threshold.
      thresholdName - the threshold name which should be one of RoundScaledRamp.Threshold
      visible - true if this threshold should be visible
    • setDirty

      public void setDirty​(boolean dirty)
      dirty - the dirty to set