Package quadbase.util
Interface IAnnotation
- All Superinterfaces:
Cloneable,IGradientPropertySet,IGradientSupport,IPlot,IText
This interface defines the requirements of an annotation object. Please call the method in
quabase.util.IAnnotationSet to create a new annotation.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThis function returns the referenced object of this annotation.This function gets the relative position to the referenced object.getValue()This function returns the value of the string.String[]This function returns the value of the string array.intGet how much the annotation text will be offset to right or left (with negative values) from the border/backgroundintGet how much the annotation text will be offset to up or down (with negative values) from the border/backgroundbooleanThis function returns whether both this object and the referenced object are visiblevoidsetReferenceObject(IReferenceObj refObj) This function sets the referenced object of this annotation.voidsetRelativePosition(Point_2D relativePos) This function sets the relative position to the referenced object.voidThis function sets the value of the string.voidThis function sets the value of the string array.voidsetVisible(boolean visible) This function sets the object to either visible or invisible.voidsetxShift(int xShift) Set how much the annotation text will be offset to right or left (with negative values) from the border/backgroundvoidsetyShift(int yShift) Set how much the annotation text will be offset to up or down (with negative values) from the border/backgroundMethods inherited from interface quadbase.util.IGradientPropertySet
set3DShadingEnabled, setGradientCyclic, setGradientDesColor, setGradientEnabled, setGradientEndX, setGradientEndY, setGradientShade, setGradientStartX, setGradientStartYMethods inherited from interface quadbase.util.IGradientSupport
getGradientDesColor, getGradientEndX, getGradientEndY, getGradientShade, getGradientStartX, getGradientStartY, is3DShadingEnabled, isGradientCyclic, isGradientEnabledMethods inherited from interface quadbase.util.IPlot
getAppearance, getBackgroundColor, getBorderColor, getBorderThickness, getCutCornerWidth, getDepth, getDialBGImageRelativeURL, getDialBGImageURL, getDialBGRatio, getDialBGState, getDialFGImageRelativeURL, getDialFGImageURL, getDialFGRatio, getDialFGState, getPosition, getRelativeHeight, getRelativeWidth, isBackgroundVisible, isBorderVisible, setAppearance, setBackgroundColor, setBackgroundVisible, setBorderColor, setBorderThickness, setBorderVisible, setCutCornerWidth, setDepth, setDialBGImage, setDialBGImage, setDialBGRatio, setDialBGState, setDialFGImage, setDialFGImage, setDialFGRatio, setDialFGState, setPosition, setRelativeHeight, setRelativeWidth
-
Method Details
-
getValue
String getValue()This function returns the value of the string. Combine all elements in string array and separate them with a newline character.- Returns:
- The value of the string as a String object.
-
setValue
This function sets the value of the string. Break up the string when a newline character is found. Then store the substrings in a string array.- Parameters:
value- The string value to set.
-
getValues
String[] getValues()This function returns the value of the string array.- Returns:
- The value of the string as a String array
-
setValues
This function sets the value of the string array.- Parameters:
value- The string array value to set.
-
setVisible
void setVisible(boolean visible) This function sets the object to either visible or invisible.- Parameters:
visible- The state of the object
-
isVisible
boolean isVisible()This function returns whether both this object and the referenced object are visible- Returns:
- visible or not
-
getReferenceObject
IReferenceObj getReferenceObject()This function returns the referenced object of this annotation.- Returns:
- the referenced object
- See Also:
-
setReferenceObject
This function sets the referenced object of this annotation.- Parameters:
refObj- The referenced object- See Also:
-
getRelativePosition
Point_2D getRelativePosition()This function gets the relative position to the referenced object. The return value is the ratio of position different between the referenced position and the annotation position to the canvas size. If the return value is (ratioX1, ratioY1), the referenced position is (ratioX2, ratioY2) and the canvas size is (width, height), the annotation will be draw at position ( width*(ratioX1 + ratioX2), height*(ratioY1 + ratioY2) ) Note that position (0, 0) represents the lower-left corner of the chart canvas.- Returns:
- The relative position
-
setRelativePosition
This function sets the relative position to the referenced object.- Parameters:
relativePos- The relative position
-
getxShift
int getxShift()Get how much the annotation text will be offset to right or left (with negative values) from the border/background- Returns:
- The relative offset on X axis, default 0
-
setxShift
void setxShift(int xShift) Set how much the annotation text will be offset to right or left (with negative values) from the border/background- Parameters:
xShift- The X axis offset, accepts negative values, default 0
-
getyShift
int getyShift()Get how much the annotation text will be offset to up or down (with negative values) from the border/background- Returns:
- The relative offset on Y axis, default 0
-
setyShift
void setyShift(int yShift) Set how much the annotation text will be offset to up or down (with negative values) from the border/background- Parameters:
yShift- The relative offset on Y axis, default 0
-