TrueAnalogClockHand
TrueAnalogClockHand Programming Interface
Interfaces
BeforeDrawListener
public Boolean onBeforeDraw(
Called before drawing the hand and its shadow and allows to draw hand from code manually. Return true to disable default drawing.
AfterDrawListener
public void onAfterDraw(
Called after drawing the hand and its shadow and allows to draw hand from code manually.
Methods
public void setBeforeDrawListener(
Sets BeforeDrawListener.
public void setAfterDrawListener(
Sets AfterDrawListener.
public boolean isUseSystemTime(
Returns true if hand uses current system time, otherwise false.
public void setUseSystemTime(
If true the hand must use the current system time, otherwise the internal time is used (
public long getTime(
Returns current time in milliseconds (
public void setTime(
Sets internal clock time using the system current time.
public void setTime(
Sets internal clock time using the passed parameters.
public void setTime(
public void setTime(
public void setTimeOffset(
Sets time offset using passed values. TrueAnalogClock class does not keep the value and just sets time offset for all contained hands.
public void setTimeOffset(
public boolean getJumping()
Returns true if the hand is in the jumping mode.
public void setJumping(
Sets the jumping mode.
public String getName()
Gets the name of hand.
public void setName(
Sets the name of hand.
public boolean isHidden()
Returns true if the hand is hidden.
public void setHidden(
Sets the hidden state. If true is passed the hand is not drawn.
public boolean isCounterclockwise()
Returns true if the hand has counterclockwise direction of rotation.
public void setCounterclockwise(
Set the direction of rotation.
public boolean isUnderFace()
If true, the hand is drawn before face drawing.
public void setUnderFace(
If the passed parameter true the hand will be drawn before face image drawing.
public long getTimeOffset()
Returns the current time offset. This value is internal value of the hand object and does not relate to the current time zone.
public void setTimeOffset(
Sets the internal time offset.
public void setTimeOffset(
public long getTime()
Returns the time that is currently used in the hand object. If isUseSystemTime is true, the current system time is returned.
public void setTime(
Sets the time of the hand object.
public HandType getType()
Returns type of the hand object.
public void setType(
Sets type of the hand.
public enum HandType {
public Point getAxisPoint()
Returns the axis point in the hand image coordinates.
public void setAxisPoint(
Sets the axis point in the hand image coordinates.
public Point getAxisFacePoint()
Gets the face axis point for this hand in the face image coordinates.
public void setAxisFacePoint(
Set the face axis point for this hand in the face image coordinates.
public float getAngleOffset()
Gets the start angle.
public void setAngleOffset(
Sets the start angle.
public float getAngleRange()
Gets the angle range.
public void setAngleRange(
Sets the angle range.
public float getValue()
Gets the current value.
public void setValue(
Sets the current value.
public float getValueOffset()
Gets the value offset. Default offset is 0.
public void setValueOffset(
Sets the value offset.
public float getValueRange()
Gets the value range.
public void setValueRange(
Sets the value range.
public Bitmap getBitmap()
Gets the hand image.
public void setBitmap(Bitmap bitmap)
Sets the hand image.
public boolean isShadow()
Returns true if the hand shadow is enabled.
public void setShadow(
If true is passed the hand shadow will be drawn.
public int getShadowColor()
Gets the color of hand shadow.
public void setShadowColor(
Sets the color of hand shadow.
public float getShadowBlurRadius()
Gets hand shadow blur radius.
public void setShadowBlurRadius(
Sets hand shadow blur radius.
public Point getShadowOffset()
Returns offset of the hand shadow.
public void setShadowOffset(
Sets the offset of the hand shadow.
public float calculateValue()
Returns current value of the hand. Use it for calculating value for standard hand types.
public float calculateAngle()
Returns current angle of the hand. Returned value depends from the complete set of other properties: value, value offset, value range, angle offset and angle range.
public void DrawHand(
Draws the hand and calls the listener's callback functions.