Code Monkey home page Code Monkey logo

range-selector's Introduction

Logo

Range Selector

This is a utility for generating a GUI and related controllers/providers to obtain a selectable range. The initial target is for selecting a frequency range in a simple and intuitive way. Currently, this is specifically for selecting a 2D range along the X-axis.

Initially, this will focus on providing a Swing based GUI for selecting a range of values, but the goal is to offer both Swing and JavaFX-based solutions eventually.

Examples

One common feature is the ability to lock the range selection; this will preserve the current state until unlocked whether that state includes a selected range or not.

This is the ultra-simple proof-of-concept view: Simple Range Selection

Here is a basic histogram-based range selection view with an icon (that doubles as a button) showing the lock state: Basic Histogram

Demo App

The demo application is what runs when you execute the Spring application (./gradlew bootRun) Range Selector Demo App Launcher

Requirements

This project requires:

Other Key Libraries

This project leverages a few key libraries:

  • Spring Boot (dependency injection framework and application runner)
  • Apache Commons Lang3 (primarily for the Range class)

Building

To build this project:

./gradlew clean build

Usage

Command Line Runner Example

To run the basic sample from the command line, execute:

./gradlew runSample

As a Library in Your Project

This is intended to be pulled into another project as a library.

Add the dependency:

implementation 'com.mikeoertli:range-selector'

Inject the RangeSelectorProvider and request a RangeSelectorController:

public class MyApplication {
    
    private final RangeSelectorProvider rangeSelectorProvider;

    @Inject
    public MyApplication(RangeSelectorProvider rangeSelectorProvider)
    {
        this.rangeSelectorProvider = rangeSelectorProvider;
    }
    
    public void doStuff()
    {
        RangeSelectorController controller = rangeSelectorProvider.createRangeSelectorController();
        
        RangeSelectorPanel panel = controller.getPanel();

        // ...
    }

}

Author

Mike Oertli

Questions, comments, and pull requests are welcome!

range-selector's People

Contributors

mikeoertli avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.