org.jplot2d.element
Interface AxisTransform
-
- All Superinterfaces:
- Element
- All Known Subinterfaces:
- AxisTransformEx
- All Known Implementing Classes:
- AxisTransformImpl
public interface AxisTransform extends Element
An axis transform define a X or Y transformation of a viewport. It can be shared by a group of axes, which represent the same user range.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description RangegetCoreRange()Return the core range of the AxisTransform.Layer[]getLayers()Returns all layers attaching to this AxisTransform.AxisRangeLockGroupgetLockGroup()Returns the lock group to that this AxisTransform belongs.doublegetMarginFactor()Returns the factor that the margin will be appended to rangeNormalTransformgetNormalTransform()Returns the normal transform of this AxisTransformRangegetRange()Return the range of the AxisTransform.AxisTickManager[]getTickManagers()Returns all axis tick managers belongs to this range manager.TransformTypegetTransform()Returns the transform typeAxisTypegetType()Return the type of this axis.booleanisAutoMargin()Returnstrueif the margin is extended to an axis major tick automatically.booleanisInverted()Returnstrueif this AxisTransform is inverted.voidsetAutoMargin(boolean autoMargin)Controls if the the margin is extended to an axis major tick automatically.voidsetCoreRange(Range range)Set the core range of the AxisTransform.voidsetInverted(boolean flag)Setsfalseto make this AxisTransform have "normal" displaying, ortrueto have "inverted" displaying.voidsetLockGroup(AxisRangeLockGroup group)Join an axis lock group.voidsetMarginFactor(double factor)Sets the factor that the margin will be appended to rangevoidsetRange(Range range)Set the actual range displayed in the AxisTransform.voidsetTransform(TransformType txfType)Sets the transform typevoidsetType(AxisType type)Set the type of the axis.-
Methods inherited from interface org.jplot2d.element.Element
getEnvironment, getId, getParent
-
-
-
-
Method Detail
-
getType
AxisType getType()
Return the type of this axis.- Returns:
- the type of this axis
-
setType
void setType(AxisType type)
Set the type of the axis. An axis type can only be changed when it dosn't lock with other axes.- Parameters:
type- the axis type
-
getTransform
TransformType getTransform()
Returns the transform type- Returns:
- the transform type
-
setTransform
void setTransform(TransformType txfType)
Sets the transform type- Parameters:
txfType- the transform type
-
isInverted
boolean isInverted()
Returnstrueif this AxisTransform is inverted.- Returns:
trueif this AxisTransform is inverted
-
setInverted
void setInverted(boolean flag)
Setsfalseto make this AxisTransform have "normal" displaying, ortrueto have "inverted" displaying.- Parameters:
flag- if flag istruethis AxisTransform is inverted, if flag isfalsethis AxisTransform is normal
-
isAutoMargin
boolean isAutoMargin()
Returnstrueif the margin is extended to an axis major tick automatically. The minimal margin is controlled bygetMarginFactor()- Returns:
trueif the margin is auto-selected
-
setAutoMargin
void setAutoMargin(boolean autoMargin)
Controls if the the margin is extended to an axis major tick automatically.- Parameters:
autoMargin- the switch
-
getMarginFactor
double getMarginFactor()
Returns the factor that the margin will be appended to range- Returns:
- the margin factor
-
setMarginFactor
void setMarginFactor(double factor)
Sets the factor that the margin will be appended to range- Parameters:
factor- the margin factor
-
getCoreRange
Range getCoreRange()
Return the core range of the AxisTransform. The returned range will be negative (start > end) if this AxisTransform is inverted.- Returns:
- the core range
-
setCoreRange
void setCoreRange(Range range)
Set the core range of the AxisTransform. The range will expand according to the settings of autoMargin and marginFactor, and derive an actual range. The given range can be positive (start < end) or negative (start > end). It has not effect on the inverted property. All locked axes will follow the change of this axis.If user want set actual range directly by
setRange(Range), The coreRange will be set tonullautomatically.- Parameters:
range- the core range to be set
-
getRange
Range getRange()
Return the range of the AxisTransform. The returned range will be negative (start > end) if this AxisTransform is inverted.- Returns:
- the actual range displayed
-
setRange
void setRange(Range range)
Set the actual range displayed in the AxisTransform. The given range can be positive (start < end) or negative (start > end). It has not effect on the inverted property. All locked axes will follow the change of this axis.The coreRange is set to
nullafter calling this method.- Parameters:
range- the actual range to be set.
-
getNormalTransform
NormalTransform getNormalTransform()
Returns the normal transform of this AxisTransform- Returns:
- the normal transform
-
getLockGroup
AxisRangeLockGroup getLockGroup()
Returns the lock group to that this AxisTransform belongs. A AxisTransform must has a lock group, which have this AxisTransform at least.- Returns:
-
setLockGroup
void setLockGroup(AxisRangeLockGroup group)
Join an axis lock group. The lock group must exist in the same environment, otherwise an exception will be thrown.- Parameters:
group- the lock group to join to.
-
getTickManagers
AxisTickManager[] getTickManagers()
Returns all axis tick managers belongs to this range manager.- Returns:
- all axes tick managers belongs to this range manager.
-
getLayers
Layer[] getLayers()
Returns all layers attaching to this AxisTransform.- Returns:
-
-
DMelt 3.0 © DataMelt by jWork.ORG