Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.28 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.28 KB

MultiRange Control

MultiRange is a JavaFX control similar to the default Slider control but with support for any number of thumbs (always in pairs).

Usage

alt tag

To create a new range just click over the slider or over any range. A range can be modified dragging its thumbs.

To delete a range right-click over the range.

Create programatically

// Create a new MultiRange with min/max values
MultiRange multiRange = new MultiRange(0, 100);

// Show tick marks and tick labels
multiRange.setShowTickLabels(true);
multiRange.setShowTickMarks(true);

// Set major tick unit and minor tick count
multiRange.setMajorTickUnit(2);
multiRange.setMinorTickCount(10);

// Make it snap to ticks
multiRange.setSnapToTicks(true);

Create with FXML

<?import multirange.MultiRange?>
...
<AnchorPane>
   <children>
      <MultiRange fx:id="multiRange" stylesheets="@./multirange.css"/>
   </children>
</AnchorPane>

Installation

Maven

<dependency>
  <groupId>com.albertoquesada</groupId>
  <artifactId>multi-range</artifactId>
  <version>0.1</version>
</dependency>

Manual

Download the JAR file and place it on your classpath.