public class RoundScale extends AbstractScale
AbstractScale.LabelSide
Modifier and Type | Field and Description |
---|---|
static int |
SPACE_BTW_MARK_LABEL |
DEFAULT_DATE_FORMAT, default_decimal_format, DEFAULT_ENGINEERING_FORMAT, DEFAULT_LOG_SCALE_MAX, DEFAULT_MAX, DEFAULT_MIN, dirty, ENGINEERING_LIMIT, max, min
Constructor and Description |
---|
RoundScale()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
convertPixelToRadians(int pixels) |
double |
getCoercedValuePosition(double value,
boolean relative) |
double |
getEndAngle() |
int |
getEstimatedDonutWidth() |
int |
getInnerRadius() |
double |
getLengthInDegrees() |
int |
getLengthInPixels() |
org.eclipse.draw2d.geometry.Dimension |
getPreferredSize(int wHint,
int hHint) |
int |
getRadius() |
RoundScaleTickLabels |
getScaleTickLabels()
Gets the scale tick labels.
|
RoundScaleTickMarks |
getScaleTickMarks()
Gets the scale tick marks.
|
double |
getStartAngle() |
double |
getValuePosition(double value,
boolean relative)
Get the position of the value in degrees.
|
protected void |
layout() |
void |
setBounds(org.eclipse.draw2d.geometry.Rectangle rect) |
void |
setEndAngle(double endAngle) |
void |
setFont(org.eclipse.swt.graphics.Font font) |
void |
setForegroundColor(org.eclipse.swt.graphics.Color color) |
void |
setRadius(int radius) |
void |
setStartAngle(double startAngle) |
void |
updateTick()
Updates the tick, recalculate all parameters, such as margin, length...
|
protected boolean |
useLocalCoordinates()
Updates the tick layout.
|
format, format, getFormatPattern, getMajorGridStep, getMajorTickMarkStepHint, getMinorTickMarkStepHint, getRange, getTickLabelSide, getTickLablesSide, getTimeUnit, internalSetAutoFormat, internalSetFormatPattern, internalSetLogScaleEnabled, internalSetRange, isAutoFormat, isDateEnabled, isDirty, isLogScaleEnabled, isMinorTicksVisible, isScaleLineVisible, setAutoFormat, setDateEnabled, setDirty, setFormatPattern, setLogScale, setMajorGridStep, setMajorTickMarkStepHint, setMinorTickMarkStepHint, setMinorTicksVisible, setRange, setRange, setRange, setScaleLineVisible, setTickLabelSide, setTickLableSide, setTimeUnit
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, 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, setChildrenDirection, setChildrenEnabled, setChildrenOrientation, setClippingStrategy, setConstraint, setCursor, setEnabled, setFlag, setFocusTraversable, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
public static final int SPACE_BTW_MARK_LABEL
public int getLengthInPixels()
public double getLengthInDegrees()
public double convertPixelToRadians(int pixels)
pixels
- the pixels to be convertedpublic int getEstimatedDonutWidth()
public org.eclipse.draw2d.geometry.Dimension getPreferredSize(int wHint, int hHint)
getPreferredSize
in interface org.eclipse.draw2d.IFigure
getPreferredSize
in class org.eclipse.draw2d.Figure
public RoundScaleTickLabels getScaleTickLabels()
public RoundScaleTickMarks getScaleTickMarks()
public double getCoercedValuePosition(double value, boolean relative)
public double getValuePosition(double value, boolean relative)
value
- the value to find its position. It can be value out of range.relative
- the polar axs would be counterclockwisely rotated to the endAngle if true.protected void layout()
layout
in class org.eclipse.draw2d.Figure
public void setBounds(org.eclipse.draw2d.geometry.Rectangle rect)
setBounds
in interface org.eclipse.draw2d.IFigure
setBounds
in class org.eclipse.draw2d.Figure
public void setFont(org.eclipse.swt.graphics.Font font)
setFont
in interface org.eclipse.draw2d.IFigure
setFont
in class AbstractScale
public void setForegroundColor(org.eclipse.swt.graphics.Color color)
setForegroundColor
in interface org.eclipse.draw2d.IFigure
setForegroundColor
in class org.eclipse.draw2d.Figure
public void updateTick()
updateTick
in class AbstractScale
protected boolean useLocalCoordinates()
useLocalCoordinates
in class org.eclipse.draw2d.Figure
public void setStartAngle(double startAngle)
startAngle
- the startAngle to setpublic double getStartAngle()
public void setEndAngle(double endAngle)
endAngle
- the endAngle to setpublic double getEndAngle()
public void setRadius(int radius)
radius
- the radius to setpublic int getRadius()
public int getInnerRadius()