Git Product home page Git Product logo

materialcomponentsjavafx's Introduction

MaterialComponentsJavaFX

Its a Framework that allow add Material Components in JavaFX applications

Get Started

  1. Add the controls.css Stylesheet in the Scene object
scene.getStylesheets().add(getClass().getResource("widgets/styles/controls.css").toExternalForm());
  1. Import the class file that will use in the fxml file.Note:Check if the package name is correct,this depends on the hierarchy of your project and the location of widgets package
<?import materialcomponents.widgets.EditText?>

##Text Field ###Single Line alt text

To create a simple text field is necessary add a "prompText" attribute with the content

<EditText prompText="Nombre de Usuario"  />

###Floating Label Float Label

To create a simple text field is necessary add a "hint" attribute with the content.

<EditText hint="Nombre de Usuario" />

###Text Area and Password Field alt text

Both support a simple and floating label , to create a text area its textArea attribute must be set true , in the same way to create a Password Field the passwordField attribute must be set true

<EditText passwordField="true" prompText="Contraseña"/>
<EditText passwordField="true" hint="Contraseña"/>
<EditText textArea="true" prompText="Descripción"/>
<EditText textArea="true" hint="Descripción"/>

###Icon alt text

To create a Icon in the text field in the "icon" attribute must be set the path from the svg file

<EditText hint="Nombre de Usuario" icon="@img/image.svg" />

materialcomponentsjavafx's People

Contributors

marconi1992 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

materialcomponentsjavafx's Issues

Index out of bounds exception in EditText upon setText("");

First off, this is great work you've done here and I really appreciate the effort! The exception occurs whenever I try to clear the text of an existing EditText by setting its text to an empty String via setText("");

Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
at java.util.ArrayList.rangeCheck(ArrayList.java:653)
at java.util.ArrayList.remove(ArrayList.java:492)
at com.sun.javafx.collections.ObservableListWrapper.doRemove(ObservableListWrapper.java:116)
at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:179)
at materialcomponents.widgets.EditText.labelAnimation(EditText.java:113)
at materialcomponents.widgets.EditText.setText(EditText.java:141)

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.