Package elki.visualization.svg
Class SVGCheckbox
- java.lang.Object
-
- elki.visualization.svg.SVGCheckbox
-
public class SVGCheckbox extends java.lang.Object
SVG checkbox.- Since:
- 0.5.0
- Author:
- Sascha Goldhofer
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
checked
Status flagprotected java.lang.String
label
Checkbox labelprotected javax.swing.event.EventListenerList
listenerList
Event listeners
-
Constructor Summary
Constructors Constructor Description SVGCheckbox(boolean checked)
Constructor, without labelSVGCheckbox(boolean checked, java.lang.String label)
Constructor, with label
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCheckBoxListener(javax.swing.event.ChangeListener listener)
Register a listener for this checkbox.protected void
fireSwitchEvent(javax.swing.event.ChangeEvent evt)
Fire the event to listenersboolean
isChecked()
Return the checkmark status.void
removeCheckBoxListener(javax.swing.event.ChangeListener listener)
Remove a listener for this checkbox.org.w3c.dom.Element
renderCheckBox(SVGPlot svgp, double x, double y, double size)
Render the SVG checkbox to a plot
-
-
-
Method Detail
-
renderCheckBox
public org.w3c.dom.Element renderCheckBox(SVGPlot svgp, double x, double y, double size)
Render the SVG checkbox to a plot- Parameters:
svgp
- Plot to draw tox
- X offsety
- Y offsetsize
- Size factor- Returns:
- Container element
-
addCheckBoxListener
public void addCheckBoxListener(javax.swing.event.ChangeListener listener)
Register a listener for this checkbox.- Parameters:
listener
- Listener to add
-
removeCheckBoxListener
public void removeCheckBoxListener(javax.swing.event.ChangeListener listener)
Remove a listener for this checkbox.- Parameters:
listener
- Listener to remove
-
isChecked
public boolean isChecked()
Return the checkmark status.- Returns:
- true, when checked
-
fireSwitchEvent
protected void fireSwitchEvent(javax.swing.event.ChangeEvent evt)
Fire the event to listeners- Parameters:
evt
- Event to fire
-
-