java.lang.Object
eu.hansolo.medusa.Section
- All Implemented Interfaces:
Comparable<Section>
Created by hansolo on 11.12.15.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<javafx.scene.image.Image>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>>javafx.beans.property.ReadOnlyDoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.StringProperty -
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Section.SectionEventfinal Section.SectionEventfinal Section.SectionEvent -
Constructor Summary
ConstructorsConstructorDescriptionSection()Represents an area of a given range, defined by a start and stop value.Section(double START, double STOP) Section(double START, double STOP, String TEXT, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color TEXT_COLOR) Section(double START, double STOP, String TEXT, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color HIGHLIGHT_COLOR, javafx.scene.paint.Color TEXT_COLOR) Section(double START, double STOP, String TEXT, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color HIGHLIGHT_COLOR, javafx.scene.paint.Color TEXT_COLOR, String STYLE_CLASS) Section(double START, double STOP, String TEXT, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color TEXT_COLOR) Section(double START, double STOP, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR) Section(double START, double STOP, javafx.scene.paint.Color COLOR) Section(double START, double STOP, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color HIGHLIGHT_COLOR) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckForValue(double VALUE) Checks if the section contains the given value and fires an event in case the value "entered" or "left" the section.javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>intbooleancontains(double VALUE) Returns true if the given value is within the range between section.getStart() and section.getStop()booleanvoidjavafx.scene.paint.ColorgetColor()Returns the color that will be used to colorize the section in a gauge.javafx.scene.paint.ColorReturns the color that will be used to colorize the section in a gauge when it is highlighted.javafx.scene.image.ImagegetImage()Returns the image that was defined for the section.final javafx.event.EventHandler<Section.SectionEvent>Gets the value of the property onSectionEntered.final javafx.event.EventHandler<Section.SectionEvent>Gets the value of the property onSectionLeft.final javafx.event.EventHandler<Section.SectionEvent>Gets the value of the property onSectionUpdate.doublegetRange()Returns the absolute range between stop and startdoublegetStart()Returns the value where the section begins.doublegetStop()Returns the value where the section ends.Returns the style class that can be used to colorize the section.getText()Returns the text that was set for the section.javafx.scene.paint.ColorReturns the color that will be used to colorize the section text.javafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.ObjectProperty<javafx.scene.image.Image>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>>final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>>javafx.beans.property.ReadOnlyDoublePropertyvoidsetColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize the section in a gauge.voidsetHighlightColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize a highlighted sectionvoidsetIcon(javafx.scene.image.Image IMAGE) Defines an image for the section.final voidsetOnSectionEntered(javafx.event.EventHandler<Section.SectionEvent> value) Sets the value of the property onSectionEntered.final voidsetOnSectionLeft(javafx.event.EventHandler<Section.SectionEvent> value) Sets the value of the property onSectionLeft.final voidsetOnSectionUpdate(javafx.event.EventHandler<Section.SectionEvent> value) Sets the value of the property onSectionUpdate.voidsetStart(double START) Defines the value where the section begins.voidsetStop(double STOP) Defines the value where the section ends.voidsetStyleClass(String STYLE_CLASS) Defines the style class that can be used to colorize the section.voidDefines a text for the section.voidsetTextColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize the section text.javafx.beans.property.DoublePropertyjavafx.beans.property.DoublePropertyjavafx.beans.property.ObjectProperty<javafx.scene.paint.Color>javafx.beans.property.StringPropertytoString()
-
Property Details
-
start
public javafx.beans.property.DoubleProperty startProperty- See Also:
-
stop
public javafx.beans.property.DoubleProperty stopProperty- See Also:
-
range
public javafx.beans.property.ReadOnlyDoubleProperty rangeProperty- See Also:
-
text
public javafx.beans.property.StringProperty textProperty- See Also:
-
icon
public javafx.beans.property.ObjectProperty<javafx.scene.image.Image> iconProperty- See Also:
-
color
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> colorProperty- See Also:
-
highlightColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> highlightColorProperty- See Also:
-
textColor
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> textColorProperty- See Also:
-
onSectionEntered
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>> onSectionEnteredProperty -
onSectionLeft
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>> onSectionLeftProperty -
onSectionUpdate
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>> onSectionUpdateProperty
-
-
Field Details
-
ENTERED_EVENT
-
LEFT_EVENT
-
UPDATE_EVENT
-
-
Constructor Details
-
Section
public Section()Represents an area of a given range, defined by a start and stop value. This class is used for regions and areas in many gauges. It is possible to check a value against the defined range and fire events in case the value enters or leaves the defined region. -
Section
public Section(double START, double STOP) -
Section
public Section(double START, double STOP, javafx.scene.paint.Color COLOR) -
Section
public Section(double START, double STOP, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color HIGHLIGHT_COLOR) -
Section
public Section(double START, double STOP, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR) -
Section
-
Section
public Section(double START, double STOP, String TEXT, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color TEXT_COLOR) -
Section
public Section(double START, double STOP, String TEXT, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color TEXT_COLOR) -
Section
public Section(double START, double STOP, String TEXT, javafx.scene.image.Image ICON, javafx.scene.paint.Color COLOR, javafx.scene.paint.Color HIGHLIGHT_COLOR, javafx.scene.paint.Color TEXT_COLOR) -
Section
-
-
Method Details
-
getStart
public double getStart()Returns the value where the section begins.- Returns:
- the value where the section begins
-
setStart
public void setStart(double START) Defines the value where the section begins.- Parameters:
START-
-
startProperty
public javafx.beans.property.DoubleProperty startProperty()- See Also:
-
getStop
public double getStop()Returns the value where the section ends.- Returns:
- the value where the section ends
-
setStop
public void setStop(double STOP) Defines the value where the section ends.- Parameters:
STOP-
-
stopProperty
public javafx.beans.property.DoubleProperty stopProperty()- See Also:
-
getRange
public double getRange()Returns the absolute range between stop and start- Returns:
- the absolute range between stop and start
-
rangeProperty
public javafx.beans.property.ReadOnlyDoubleProperty rangeProperty()- See Also:
-
getText
Returns the text that was set for the section.- Returns:
- the text that was set for the section
-
setText
Defines a text for the section.- Parameters:
TEXT-
-
textProperty
public javafx.beans.property.StringProperty textProperty()- See Also:
-
getImage
public javafx.scene.image.Image getImage()Returns the image that was defined for the section. In some skins the image will be drawn (e.g. SimpleSkin).- Returns:
- the image that was defined for the section
-
setIcon
public void setIcon(javafx.scene.image.Image IMAGE) Defines an image for the section. In some skins the image will be drawn (e.g. SimpleSkin)- Parameters:
IMAGE-
-
iconProperty
public javafx.beans.property.ObjectProperty<javafx.scene.image.Image> iconProperty()- See Also:
-
getColor
public javafx.scene.paint.Color getColor()Returns the color that will be used to colorize the section in a gauge.- Returns:
- the color that will be used to colorize the section
-
setColor
public void setColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize the section in a gauge.- Parameters:
COLOR-
-
colorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> colorProperty()- See Also:
-
getHighlightColor
public javafx.scene.paint.Color getHighlightColor()Returns the color that will be used to colorize the section in a gauge when it is highlighted.- Returns:
- the color that will be used to colorize a highlighted section
-
setHighlightColor
public void setHighlightColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize a highlighted section- Parameters:
COLOR-
-
highlightColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> highlightColorProperty()- See Also:
-
getTextColor
public javafx.scene.paint.Color getTextColor()Returns the color that will be used to colorize the section text.- Returns:
- the color that will be used to colorize the section text
-
setTextColor
public void setTextColor(javafx.scene.paint.Color COLOR) Defines the color that will be used to colorize the section text.- Parameters:
COLOR-
-
textColorProperty
public javafx.beans.property.ObjectProperty<javafx.scene.paint.Color> textColorProperty()- See Also:
-
getStyleClass
Returns the style class that can be used to colorize the section. This is not implemented in the current available skins.- Returns:
- the style class that can be used to colorize the section
-
setStyleClass
Defines the style class that can be used to colorize the section. This is not implemented in the current available skins.- Parameters:
STYLE_CLASS-
-
contains
public boolean contains(double VALUE) Returns true if the given value is within the range between section.getStart() and section.getStop()- Parameters:
VALUE-- Returns:
- true if the given value is within the range of the section
-
checkForValue
public void checkForValue(double VALUE) Checks if the section contains the given value and fires an event in case the value "entered" or "left" the section. With this one can react if a value enters/leaves a specific region in a gauge.- Parameters:
VALUE-
-
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Section>
-
toString
-
onSectionEnteredProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>> onSectionEnteredProperty() -
setOnSectionEntered
Sets the value of the property onSectionEntered.- Property description:
-
getOnSectionEntered
Gets the value of the property onSectionEntered.- Property description:
-
onSectionLeftProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>> onSectionLeftProperty() -
setOnSectionLeft
Sets the value of the property onSectionLeft.- Property description:
-
getOnSectionLeft
Gets the value of the property onSectionLeft.- Property description:
-
onSectionUpdateProperty
public final javafx.beans.property.ObjectProperty<javafx.event.EventHandler<Section.SectionEvent>> onSectionUpdateProperty() -
setOnSectionUpdate
Sets the value of the property onSectionUpdate.- Property description:
-
getOnSectionUpdate
Gets the value of the property onSectionUpdate.- Property description:
-
fireSectionEvent
-