Package elki.visualization.svg
Class SVGSimpleLinearAxis
- java.lang.Object
-
- elki.visualization.svg.SVGSimpleLinearAxis
-
public final class SVGSimpleLinearAxis extends java.lang.Object
Class to draw a simple axis with tick marks on the plot.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SVGSimpleLinearAxis.Alignment
Flag for axis label position.static class
SVGSimpleLinearAxis.LabelStyle
Labeling style: left-handed, right-handed, no ticks, labels at ends
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
CSS_AXIS
CSS class name for the axesprivate static java.lang.String
CSS_AXIS_LABEL
CSS class name for the axesprivate static java.lang.String
CSS_AXIS_TICK
CSS class name for the axes
-
Constructor Summary
Constructors Modifier Constructor Description private
SVGSimpleLinearAxis()
Private constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
drawAxis(SVGPlot plot, org.w3c.dom.Element parent, LinearScale scale, double x1, double y1, double x2, double y2, SVGSimpleLinearAxis.LabelStyle labelstyle, StyleLibrary style)
Plot an axis with appropriate scalesprivate static void
setupCSSClasses(java.lang.Object owner, CSSClassManager manager, StyleLibrary style)
Register CSS classes with aCSSClassManager
-
-
-
Field Detail
-
CSS_AXIS
private static final java.lang.String CSS_AXIS
CSS class name for the axes- See Also:
- Constant Field Values
-
CSS_AXIS_TICK
private static final java.lang.String CSS_AXIS_TICK
CSS class name for the axes- See Also:
- Constant Field Values
-
CSS_AXIS_LABEL
private static final java.lang.String CSS_AXIS_LABEL
CSS class name for the axes- See Also:
- Constant Field Values
-
-
Method Detail
-
setupCSSClasses
private static void setupCSSClasses(java.lang.Object owner, CSSClassManager manager, StyleLibrary style) throws CSSClassManager.CSSNamingConflict
Register CSS classes with aCSSClassManager
- Parameters:
owner
- Owner of the CSS classesmanager
- Manager to register the classes with- Throws:
CSSClassManager.CSSNamingConflict
- when a name clash occurs
-
drawAxis
public static void drawAxis(SVGPlot plot, org.w3c.dom.Element parent, LinearScale scale, double x1, double y1, double x2, double y2, SVGSimpleLinearAxis.LabelStyle labelstyle, StyleLibrary style) throws CSSClassManager.CSSNamingConflict
Plot an axis with appropriate scales- Parameters:
plot
- Plot objectparent
- Containing elementscale
- axis scale informationx1
- starting coordinatey1
- starting coordinatex2
- ending coordinatey2
- ending coordinatelabelstyle
- Style for placing the labelsstyle
- Style library- Throws:
CSSClassManager.CSSNamingConflict
- when a conflict occurs in CSS
-
-