Class JDAxis
java.lang.Object
fr.esrf.tangoatk.widget.util.jdraw.JDObject
fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
fr.esrf.tangoatk.widget.util.jdraw.JDAxis
JDraw Axis graphic object. JDAxis allows to build easily sizeable gauges, it supports
Font, Label format, auto labelling, and tick.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intUse default compiler format to display doublestatic final intDisplay integer using binary format (%b)static final intDisplay integer using decimal format (%d)static final intDisplay integer using haxadecimal format (%x)static final intHorizontal axisstatic final intLabels are at the left of the axis (Vertical axis only)static final intLinear scalestatic final intLogarithmic scalestatic final intLabels are at the right of the axis (Vertical axis only)static final intDisplay value using exponential representation (x.xxEyy)static final intDisplay value using exponential representation (xEyy)protected JLAxisstatic final intDisplay number of second as HH:MM:SSstatic final intVertical axisFields inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDObject
FILL_STYLE_DOT_PATTERN_1, FILL_STYLE_DOT_PATTERN_2, FILL_STYLE_DOT_PATTERN_3, FILL_STYLE_GRADIENT, FILL_STYLE_LARGE_CROSS_HATCH, FILL_STYLE_LARGE_LEFT_HATCH, FILL_STYLE_LARGE_RIGHT_HATCH, FILL_STYLE_NONE, FILL_STYLE_SMALL_CROSS_HATCH, FILL_STYLE_SMALL_LEFT_HATCH, FILL_STYLE_SMALL_RIGHT_HATCH, FILL_STYLE_SOLID, LINE_STYLE_DASH, LINE_STYLE_DASH_DOT, LINE_STYLE_DOT, LINE_STYLE_LONG_DASH, LINE_STYLE_SOLID, VALUE_CHANGE_ON_XDRAG_LEFT, VALUE_CHANGE_ON_XDRAG_RIGHT, VALUE_CHANGE_ON_YDRAG_BOTTOM, VALUE_CHANGE_ON_YDRAG_TOP, VALUE_INC_ON_CLICK, VALUE_INC_ON_PRESSRELEASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy(int x, int y) Returns a copy of this object at the specified location.getFont()intintdoublegetMax()doublegetMin()intintgetScale()intintbooleanbooleanbooleanDetermines whether axis ticks are centered.voidpaint(JDrawEditor parent, Graphics g) Paints this object.voidSets the label font of this axis.voidSets the foreground color (usualy line color) of this object.voidsetFormat(int f) Sets the label format of this axis.voidsetInverted(boolean i) Invert or not this axis.voidsetLabelPos(int pos) Sets the label positionning policy.voidsetMax(double m) Sets the max value of this axis.voidsetMin(double m) Sets the min value of this axis.voidsetOrientation(int o) Sets the axis orientation.voidsetScale(int s) Sets the scale of this axis.voidsetTickCentered(boolean center) Centers or not axis tick.voidsetTickSpacing(int spacing) Sets the minimum tick spacing (in pixel).voidsetTickWidth(int width) Sets the axis tick width.Methods inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDRectangular
getBottom, getHeight, getLeft, getRight, getTop, getWidth, moveSummit, rotate90, setBottom, setHeight, setLeft, setRight, setTop, setWidthMethods inherited from class fr.esrf.tangoatk.widget.util.jdraw.JDObject
addExtension, addMouseListener, addValueListener, centerOrigin, clearMouseListener, clearValueListener, getBackground, getBackgroundMapper, getBoundRect, getExtendedParam, getExtendedParam, getExtendedParamDesc, getExtendedParamIndex, getExtendedParamName, getExtendedParamNumber, getFillStyle, getForeground, getForegroundMapper, getHTranslationMapper, getInitValue, getInvertShadowMapper, getLineStyle, getLineWidth, getMaxValue, getMinValue, getName, getObjectsByName, getOrigin, getShadowWidth, getSummit, getSummitNumber, getValue, getValueChangeMode, getVisibilityMapper, getVTranslationMapper, hasBackgroundMapper, hasExtendedParam, hasForegroundMapper, hasHTranslationMapper, hasInverseShadow, hasInvertShadowMapper, hasVisibilityMapper, hasVTranslationMapper, isAntiAliased, isDisabled, isFixedExtendedParam, isInsideObject, isInteractive, isProgrammed, isVisible, moveSummitH, moveSummitV, preRefresh, refresh, removeExtension, removeMouseListener, removeValueListener, restoreTransform, saveTransform, scale, scaleTranslate, setAntiAlias, setBackground, setBackgroundMapper, setDisabled, setExtendedParam, setExtendedParam, setExtensionList, setFillStyle, setForegroundMapper, setGradientFillParam, setHTranslationMapper, setInitValue, setInteractive, setInverseShadow, setInvertShadowMapper, setLineStyle, setLineWidth, setMaxValue, setMinValue, setName, setOrigin, setShadow, setShadowWidth, setValue, setValueChangeMode, setVisibilityMapper, setVisible, setVTranslationMapper, toString, translate
-
Field Details
-
HORIZONTAL_AXIS
public static final int HORIZONTAL_AXISHorizontal axis- See Also:
-
VERTICAL_AXIS
public static final int VERTICAL_AXISVertical axis- See Also:
-
LEFT_LABEL
public static final int LEFT_LABELLabels are at the left of the axis (Vertical axis only)- See Also:
-
RIGHT_LABEL
public static final int RIGHT_LABELLabels are at the right of the axis (Vertical axis only)- See Also:
-
LINEAR_SCALE
public static final int LINEAR_SCALELinear scale- See Also:
-
LOG_SCALE
public static final int LOG_SCALELogarithmic scale- See Also:
-
AUTO_FORMAT
public static final int AUTO_FORMATUse default compiler format to display double- See Also:
-
SCIENTIFIC_FORMAT
public static final int SCIENTIFIC_FORMATDisplay value using exponential representation (x.xxEyy)- See Also:
-
TIME_FORMAT
public static final int TIME_FORMATDisplay number of second as HH:MM:SS- See Also:
-
DECINT_FORMAT
public static final int DECINT_FORMATDisplay integer using decimal format (%d)- See Also:
-
HEXINT_FORMAT
public static final int HEXINT_FORMATDisplay integer using haxadecimal format (%x)- See Also:
-
BININT_FORMAT
public static final int BININT_FORMATDisplay integer using binary format (%b)- See Also:
-
SCIENTIFICINT_FORMAT
public static final int SCIENTIFICINT_FORMATDisplay value using exponential representation (xEyy)- See Also:
-
theAxis
-
-
Constructor Details
-
JDAxis
Construct a JDAxis object.- Parameters:
objectName- Object namex- Up left corner x coordinatey- Up left corner y coordinatew- Widht (pixel)h- Height (pixel)
-
-
Method Details
-
copy
Description copied from class:JDObjectReturns a copy of this object at the specified location. -
paint
Description copied from class:JDObjectPaints this object.- Overrides:
paintin classJDRectangular- Parameters:
parent- JdrawEditor parent (Can be null except for JDSwingObject)g- the specified Graphics window
-
hasShadow
public boolean hasShadow() -
setForeground
Description copied from class:JDObjectSets the foreground color (usualy line color) of this object. This color is also used for base shadow color.- Overrides:
setForegroundin classJDObject- Parameters:
f- Foreground color
-
setFont
Sets the label font of this axis.- Parameters:
f- Axis label font
-
getFont
- Returns:
- the label font.
- See Also:
-
setTickCentered
public void setTickCentered(boolean center) Centers or not axis tick.- Parameters:
center- True to center tick.- See Also:
-
isTickCentered
public boolean isTickCentered()Determines whether axis ticks are centered.- Returns:
- true if tick are centered.
- See Also:
-
setTickWidth
public void setTickWidth(int width) Sets the axis tick width. Passing a negative value will result in displaying tick on the other side of the axis. If tick are centered , negative and positive value will have the same effects.- Parameters:
width- Tick width- See Also:
-
getTickWidth
public int getTickWidth()- Returns:
- the current axis tick width.
- See Also:
-
setTickSpacing
public void setTickSpacing(int spacing) Sets the minimum tick spacing (in pixel). Allows to control the number of generated labels.- Parameters:
spacing- Minimum tick spacing
-
getTickSpacing
public int getTickSpacing()- Returns:
- the current axis spacing (in pixel).
- See Also:
-
setMax
public void setMax(double m) Sets the max value of this axis.- Parameters:
m- Max value
-
setMin
public void setMin(double m) Sets the min value of this axis.- Parameters:
m- Min value
-
getMax
public double getMax()- Returns:
- the max value of this axis.
- See Also:
-
getMin
public double getMin()- Returns:
- the min value of this axis.
- See Also:
-
setLabelPos
public void setLabelPos(int pos) Sets the label positionning policy. Works only for vertical axis.- Parameters:
pos- Position- See Also:
-
getLabelPos
public int getLabelPos()- Returns:
- the current label positionning policy.
- See Also:
-
setOrientation
public void setOrientation(int o) Sets the axis orientation.- Parameters:
o- Orientation value- See Also:
-
getOrientation
public int getOrientation()- Returns:
- the orientation of this axis.
- See Also:
-
setScale
public void setScale(int s) Sets the scale of this axis.- Parameters:
s- Scale value- See Also:
-
getScale
public int getScale()- Returns:
- the scale of this axis.
- See Also:
-
setFormat
public void setFormat(int f) Sets the label format of this axis.- Parameters:
f- Format value- See Also:
-
getFormat
public int getFormat()- Returns:
- the label format of this axis.
- See Also:
-
setInverted
public void setInverted(boolean i) Invert or not this axis. When enabled , label are going in the opposite side of the screen orientation.- Parameters:
i- True to invert this axis.
-
isInverted
public boolean isInverted()- Returns:
- whether this axis is inverted.
- See Also:
-