Giter Club home page Giter Club logo

fonts-fontawesome's Introduction

Font Awesome by Dave Gandy: http://fontawesome.io/

Font Awesome gives you scalable vector icons that can instantly be customized โ€” size, color, drop shadow, and anything that can be done with the power of CSS.

This library provides a bundled version of these fonts that can easily be used in your Java/JavaFX-based applications.

Screenshot

A compiled and ready-to-use version of this library can be found in the Sonatype OSS Maven Repository (oss.sonatype.org). To use the library in your Maven based projects just add the following lines to your 'pom.xml':

<dependency>
  <groupId>com.cathive.fonts</groupId>
  <artifactId>fonts-fontawesome</artifactId>
  <version>${fonts-fontawesome.version}</version>
</dependency>

You can directly use the FontAwesome icons in your JavaFX application. Use instances of com.cathive.fonts.FontAwesomeIconView โ€” either construct them programatically or embed them into your FXML sources:

<?xml version="1.0" encoding="UTF-8"?>
<!--
  This example shows three different buttons (stop, play and pause)
  whose graphic components (icons) are rendered using the FontAwesome
  icons.
  -->
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.HBox?>
<?import com.cathive.fonts.fontawesome.FontAwesomeIconView?>
<HBox xmlns:fx="http://javafx.com/fxml">
  <children>
    <Button text="Stop">
      <graphic>
        <FontAwesomeIconView icon="ICON_STOP"/>
      </graphic>
    </Button>
    <Button text="Play">
      <graphic>
        <FontAwesomeIconView icon="ICON_PLAY"/>
      </graphic>
    </Button>
    <Button text="Pause">
      <graphic>
        <FontAwesomeIconView icon="ICON_PAUSE"/>
      </graphic>
    </Button>
  </children>
</HBox>

fonts-fontawesome's People

Contributors

headcr4sh avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

fonts-fontawesome's Issues

String binding exceptions

Hi There

When creating a FontAwesomeIconView using char constructor like below:

new FontAwesomeIconView(FontAwesomeIcon.ICON_EDIT.getUnicode())

I get the following exception:

A bound value cannot be set.
/C:/workspace/estimate/estimate/target/classes/atill/markdownfx/mdeditor-viewer.fxml
/C:/workspace/estimate/estimate/target/classes/projmon/gui/taskForm.fxml:102
  at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:157)
  at javafx.beans.property.StringPropertyBase.set(StringPropertyBase.java:67)
  at javafx.beans.property.StringProperty.setValue(StringProperty.java:84)
  at javafx.scene.control.Labeled.setText(Labeled.java:135)
  at com.cathive.fonts.fontawesome.FontAwesomeIconView.<init>(FontAwesomeIconView.java:55)
  at atill.markdownfx.EditorViewerController.initialize(EditorViewerController.java:59)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2152)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2028)
  at javafx.fxml.FXMLLoader$IncludeElement.constructValue(FXMLLoader.java:937)
  at javafx.fxml.FXMLLoader$ValueElement.processStartElement(FXMLLoader.java:567)
  at javafx.fxml.FXMLLoader.processStartElement(FXMLLoader.java:2314)
  at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2131)
  at projmon.FXControlLoader.loadControl(FXControlLoader.java:171)
  at projmon.FXControlLoader.loadTaskForm(FXControlLoader.java:120)
  at projmon.hierarchical.TaskHierarchy.loadContentControl(TaskHierarchy.java:125)
  at projmon.control.ProjectScreenController$SelectedWorkContentListener.itemSelected(ProjectScreenController.java:108)
  at projmon.control.ProjectScreenController$SelectedWorkContentListener.itemSelected(ProjectScreenController.java:1)
  at projmon.control.WorkTreeController$3.itemSelected(WorkTreeController.java:141)
  at projmon.control.WorkTreeController$3.itemSelected(WorkTreeController.java:1)
  at projmon.hierarchical.HierarchyTreeCell$1.handle(HierarchyTreeCell.java:76)
  at projmon.hierarchical.HierarchyTreeCell$1.handle(HierarchyTreeCell.java:1)
  at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
  at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
  at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
  at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
  at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
  at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
  at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
  at javafx.event.Event.fireEvent(Event.java:171)
  at javafx.scene.Scene$ClickGenerator.postProcess(Scene.java:3113)
  at javafx.scene.Scene$ClickGenerator.access$8600(Scene.java:3051)
  at javafx.scene.Scene$MouseHandler.process(Scene.java:3333)
  at javafx.scene.Scene$MouseHandler.process(Scene.java:3164)
  at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3119)
  at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1559)
  at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2261)
  at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:228)
  at com.sun.glass.ui.View.handleMouseEvent(View.java:528)
  at com.sun.glass.ui.View.notifyMouse(View.java:922)
  at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
  at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
  at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
  at java.lang.Thread.run(Thread.java:722)

This is occurring under Java 7 and 8.

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.