Skip to content

Commit

Permalink
Update guide
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmiray committed Jan 9, 2016
1 parent e72ff77 commit b97ae31
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 7 deletions.
4 changes: 4 additions & 0 deletions subprojects/guide/src/asciidoc/_links.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
:link_devicons: link:http://vorillaz.github.io/devicons/[DevIcons, window="_blank"]
:api_link_fonticon_javafx: link:api/org/kordamp/ikonli/javafx/FontIcon.html[org.kordamp.ikonli.javafx.FontIcon, window="_blank"]
:api_link_fonticon_swing: link:api/org/kordamp/ikonli/swing/FontIcon.html[org.kordamp.ikonli.swing.FontIcon, window="_blank"]

:project-owner: aalmiray
:project-repo: kordamp

14 changes: 14 additions & 0 deletions subprojects/guide/src/asciidoc/introduction.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,17 @@ Ikonli provides icon packs that can be used in Java applications. Currently Swin
Ikonli is open source software with dual licensing, under GPLv3 and ASLv2. GPLv3 is the base license that governs all
source code. If you make use of Ikonli with either the link:https://github.com/griffon/griffon[Griffon Framework] or
the link:https://github.com/basilisk-fw/basilisk[Basilisk Framework] then the GPLv3 is suspended and ASLv2 applies.

== Download

Ikonli and all of its icon packs can be downloaded from Bintray
image:https://api.bintray.com/packages/{project-owner}/{project-repo}/ikonli/images/download.svg[link="https://bintray.com/{project-owner}/{project-repo}/ikonli/_latestVersion"].

You must select a binary that matches your target UI toolkit, such as

[horizontal]
Swing:: ikonli-swing-{project-version}
JavaFX:: ikonli-javafx-{project-version}

Next, select any of the icon packs you want to use. You may select more than one for the same application.

4 changes: 2 additions & 2 deletions subprojects/guide/src/asciidoc/usage.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ it is a subclass of `javafx.scene.control.Label`. The icon class can be used ins

.Stylable Properties

`{api_link_fonticon_javafx}` Exposes the following properties that can be styled using CSS:
`{api_link_fonticon_javafx}` exposes properties that can be styled using CSS. It defines a node class named `ikonli-font-icon`.

[horizontal]
-fx-icon-code:: An icon literal such as `di-java` or `fa-github`.
-fx-icon-size:: The size of the icon, in pixels.
-fx-icon-color:: A JavaFx `Paint` definition, such as a plain color or gradient.
-fx-icon-color:: A JavaFX `Paint` definition, such as a plain color or gradient.

Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void changed(ObservableValue<? extends Ikon> v, Ikon o, Ikon n) {
};

public FontIcon() {
getStyleClass().setAll("font-icon");
getStyleClass().setAll("ikonli-font-icon");
setIconSize(16);
setIconColor(Color.BLACK);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,14 @@
package org.kordamp.ikonli.javafx;

import javafx.scene.text.Font;
import org.kordamp.ikonli.Ikon;
import org.kordamp.ikonli.IkonHandler;

import java.util.LinkedHashSet;
import java.util.ServiceLoader;
import java.util.Set;

import static java.util.Objects.requireNonNull;

/**
* @author Andres Almiray
*/
Expand All @@ -84,11 +85,12 @@ public static IkonResolver getInstance() {
}

public IkonHandler resolveIkonHandler(String value) {
requireNonNull(value, "Ikon description must not be null");
for (IkonHandler handler : HANDLERS) {
if (handler.supports(value)) {
return handler;
}
}
return null;
throw new UnsupportedOperationException("Cannot resolve '" + value + "'");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@
import java.util.ServiceLoader;
import java.util.Set;

import static java.util.Objects.requireNonNull;

/**
* @author Andres Almiray
*/
Expand Down Expand Up @@ -96,11 +98,12 @@ public static IkonResolver getInstance() {
}

public IkonHandler resolve(String value) {
requireNonNull(value, "Ikon description must not be null");
for (IkonHandler handler : HANDLERS) {
if (handler.supports(value)) {
return handler;
}
}
return null;
throw new UnsupportedOperationException("Cannot resolve '" + value + "'");
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.font-icon {
.ikonli-font-icon {
-fx-icon-size: 48px;
}

0 comments on commit b97ae31

Please sign in to comment.