Package elki.visualization.svg
Class SVGButton
- java.lang.Object
-
- elki.visualization.svg.SVGButton
-
public class SVGButton extends java.lang.Object
Class to draw a button as SVG.- Since:
- 0.5.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description private CSSClass
butcss
Class for the buttons main CSSstatic java.lang.String
DEFAULT_BUTTON_COLOR
Default button colorstatic java.lang.String
DEFAULT_TEXT_COLOR
Default text colorprivate double
h
Heightprivate double
r
Corner rounding factor.private java.lang.String
title
Button title, optionalprivate CSSClass
titlecss
Title stylingprivate double
w
Widthprivate double
x
X positionprivate double
y
Y position
-
Constructor Summary
Constructors Constructor Description SVGButton(double x, double y, double w, double h, double r)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.w3c.dom.Element
render(SVGPlot svgp)
Produce the actual SVG elements for the button.void
setTitle(java.lang.String title, java.lang.String textcolor)
Set the button title
-
-
-
Field Detail
-
DEFAULT_BUTTON_COLOR
public static final java.lang.String DEFAULT_BUTTON_COLOR
Default button color- See Also:
- Constant Field Values
-
DEFAULT_TEXT_COLOR
public static final java.lang.String DEFAULT_TEXT_COLOR
Default text color- See Also:
- Constant Field Values
-
x
private double x
X position
-
y
private double y
Y position
-
w
private double w
Width
-
h
private double h
Height
-
r
private double r
Corner rounding factor. NaN = no rounding
-
butcss
private CSSClass butcss
Class for the buttons main CSS
-
title
private java.lang.String title
Button title, optional
-
titlecss
private CSSClass titlecss
Title styling
-
-
Method Detail
-
render
public org.w3c.dom.Element render(SVGPlot svgp)
Produce the actual SVG elements for the button.- Parameters:
svgp
- Plot to draw to- Returns:
- Button wrapper element
-
setTitle
public void setTitle(java.lang.String title, java.lang.String textcolor)
Set the button title- Parameters:
title
- Button titletextcolor
- Color
-
-