public class LinearRenderer2D extends AbstractAxisRenderer2D
INTERSECTION, LABEL, LABEL_COLOR, LABEL_DISTANCE, LABEL_FONT, LABEL_ROTATION, SHAPE, SHAPE_COLOR, SHAPE_DIRECTION_SWAPPED, SHAPE_NORMAL_ORIENTATION_CLOCKWISE, SHAPE_STROKE, SHAPE_VISIBLE, TICK_LABELS, TICK_LABELS_DISTANCE, TICK_LABELS_FORMAT, TICK_LABELS_OUTSIDE, TICK_LABELS_ROTATION, TICKS, TICKS_ALIGNMENT, TICKS_AUTO_SPACING, TICKS_COLOR, TICKS_CUSTOM, TICKS_FONT, TICKS_LENGTH, TICKS_MINOR, TICKS_MINOR_ALIGNMENT, TICKS_MINOR_COLOR, TICKS_MINOR_COUNT, TICKS_MINOR_LENGTH, TICKS_MINOR_STROKE, TICKS_SPACING, TICKS_STROKE
Constructor and Description |
---|
LinearRenderer2D()
Creates a new renderer for linear axes in two-dimensional space.
|
Modifier and Type | Method and Description |
---|---|
protected void |
createTicks(List<Tick> ticks,
Axis axis,
double min,
double max,
Set<Double> tickPositions,
boolean isAutoSpacing)
Adds minor and major ticks to a list of ticks.
|
Number |
viewToWorld(Axis axis,
double value,
boolean extrapolate)
Converts a view (screen) coordinate value to a world (axis) coordinate
value.
|
double |
worldToView(Axis axis,
Number value,
boolean extrapolate)
Converts a world (axis) coordinate value to a view (screen) coordinate
value.
|
createTicksCustom, evaluateShape, getNormal, getPosition, getRendererComponent, getShapeLength, getTick, getTicks, settingChanged
addSettingsListener, getSetting, hasSetting, hasSettingDefault, notifySettingChanged, removeSetting, removeSettingDefault, removeSettingsListener, setSetting, setSetting, setSettingDefault
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSetting, removeSetting, removeSettingDefault, setSetting, setSettingDefault
public LinearRenderer2D()
public double worldToView(Axis axis, Number value, boolean extrapolate)
axis
- Axisvalue
- World coordinate value to convertextrapolate
- Option to activate extrapolation value that are not
on the axispublic Number viewToWorld(Axis axis, double value, boolean extrapolate)
axis
- Axisvalue
- View coordinate value to convertextrapolate
- Option to activate extrapolation value that are not
on the axisprotected void createTicks(List<Tick> ticks, Axis axis, double min, double max, Set<Double> tickPositions, boolean isAutoSpacing)
AbstractAxisRenderer2D
createTicks
in class AbstractAxisRenderer2D
ticks
- List of ticksaxis
- Axismin
- Minimum value of axismax
- Maximum value of axistickPositions
- Set of tick positionsisAutoSpacing
- Use automatic scalingCopyright © 2009-2013. All Rights Reserved.