1. Introduction
Provides a shortcut for adding icons based on IcoMoon Icon Pack.
Griffon version: 2.2.0
2. Usage
2.1. Swing
The griffon-icomoon-swing:1.1.0
JAR provides a new Icon class: griffon.swing.support.icomoonicons.IcoMoonIcon
.
You may use this class with any Swing component that supports an Icon property.
2.2. JavaFX
The griffon-icomoon-javafx:1.1.0
JAR provides a new Node class: griffon.javafx.support.icomoonicons.IcoMoonIcon
.
You may use this class with any JavaFX control that accepts a graphic property. You may also use the icon directly as
it is a subclass of javafx.scene.control.Label
.
2.3. Action Resources
Action icons can be set using resources files if the following format is used:
iconClassName|name:size
Here’s an example using the Swing icon
org.example.AppController.action.Preferences.icon=griffon.swing.support.icomoon.IconMoonIcon|star:32
The JavaFX version for the same icon value is
org.example.AppController.action.Preferences.icon=griffon.javafx.support.icomoon.IcoMoonIcon|star:32
3. Configuration
The plugin delivers artifacts for both Swing and JavaFX. It also contains Groovy enhancements that can be used in combination with the respective UI toolkit DSL (SwingBuilder and GroovyFX).
3.1. Gradle
You have two options for configuring this plugin: automatic and manual.
3.1.1. Automatic
As long as the project has the org.codehaus.griffon.griffon
plugin applied to it you
may include the following snippet in build.gradle
dependencies {
griffon 'org.codehaus.griffon.plugins:griffon-icomoonicons-plugin:1.1.0'
}
The griffon
plugin will take care of the rest given its configuration.
3.1.2. Manual
You will need to configure any of the following blocks depending on your setup
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-swing:1.1.0'
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-javafx:1.1.0'
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-swing-groovy:1.1.0'
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-javafx-groovy:1.1.0'
}
3.2. Maven
First configure the griffon-icomoonicons-plugin
BOM in your POM file, by placing the following
snippet before the <build>
element
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-icomoonicons-plugin</artifactId>
<version>1.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Next configure dependencies as required by your particular setup
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-icomoonicons-swing</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-icomoonicons-javafx</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-icomoonicons-swing-groovy</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-icomoonicons-javafx-groovy</artifactId>
</dependency>
4. Modules
The following sections display all bindings per module. Use this information to successfully override a binding on your own modules or to troubleshoot a module binding if the wrong type has been applied by the Griffon runtime.
4.1. JavaFX
Module name: icomoonicons-javafx-groovy
Depends on: javafx-groovy
bind(BuilderCustomizer.class)
.to(IcoMoonIconsJavaFXBuilderCustomizer.class)
.asSingleton();
The following nodes will become available on a Groovy View
Node | Type |
---|---|
icoMoonIcon |
4.2. Swing
Module name: icomoonicons-swing-groovy
Depends on: swing-groovy
bind(BuilderCustomizer.class)
.to(IcoMoonIconsSwingBuilderCustomizer.class)
.asSingleton();
The following nodes will become available on a Groovy View
Node | Type |
---|---|
icoMoonIcon |
Both icoMoonIcon
Nodes support the following properties
- icon
-
The name of the icon, such as
github
ortwitter
. - size
-
The size of the icon. Either
16
or32
.
6. Icon Cheat Sheet
The following table shows all available icons.
Name | 16 | 32 |
---|---|---|
accessibility |
||
address-book |
||
aid |
||
airplane |
||
alarm |
||
alarm2 |
||
android |
||
angry |
||
angry2 |
||
apple |
||
arrow-down-left |
||
arrow-down-left2 |
||
arrow-down-left3 |
||
arrow-down-right |
||
arrow-down-right2 |
||
arrow-down-right3 |
||
arrow-down |
||
arrow-down2 |
||
arrow-down3 |
||
arrow-left |
||
arrow-left2 |
||
arrow-left3 |
||
arrow-right |
||
arrow-right2 |
||
arrow-right3 |
||
arrow-up-left |
||
arrow-up-left2 |
||
arrow-up-left3 |
||
arrow-up-right |
||
arrow-up-right2 |
||
arrow-up-right3 |
||
arrow-up |
||
arrow-up2 |
||
arrow-up3 |
||
attachment |
||
backward |
||
backward2 |
||
barcode |
||
bars |
||
bars2 |
||
bell |
||
binoculars |
||
blocked |
||
blog |
||
blogger |
||
blogger2 |
||
bold |
||
book |
||
bookmark |
||
bookmarks |
||
books |
||
box-add |
||
box-remove |
||
briefcase |
||
brightness-contrast |
||
brightness-medium |
||
bubble |
||
bubble2 |
||
bubbles |
||
bubbles2 |
||
bubbles3 |
||
bubbles4 |
||
bug |
||
bullhorn |
||
busy |
||
cabinet |
||
calculate |
||
calendar |
||
calendar2 |
||
camera |
||
camera2 |
||
cancel-circle |
||
cart |
||
cart2 |
||
cart3 |
||
checkbox-checked |
||
checkbox-partial |
||
checkbox-unchecked |
||
checkmark-circle |
||
checkmark |
||
checkmark2 |
||
chrome |
||
clock |
||
clock2 |
||
close |
||
cloud-download |
||
cloud-upload |
||
cloud |
||
clubs |
||
code |
||
cog |
||
cog2 |
||
cogs |
||
coin |
||
compass |
||
confused |
||
confused2 |
||
connection |
||
console |
||
contract |
||
contract2 |
||
contrast |
||
cool |
||
cool2 |
||
copy |
||
copy2 |
||
copy3 |
||
credit |
||
crop |
||
css3 |
||
dashboard |
||
delicious |
||
deviantart |
||
deviantart2 |
||
diamonds |
||
dice |
||
disk |
||
download |
||
download2 |
||
download3 |
||
drawer |
||
drawer2 |
||
drawer3 |
||
dribbble |
||
dribbble2 |
||
dribbble3 |
||
droplet |
||
earth |
||
eject |
||
embed |
||
enter |
||
envelop |
||
equalizer |
||
evil |
||
evil2 |
||
exit |
||
expand |
||
expand2 |
||
eye-blocked |
||
eye |
||
eye2 |
||
facebook2 |
||
facebook3 |
||
feed |
||
feed2 |
||
feed3 |
||
feed4 |
||
file-css |
||
file-excel |
||
file-openoffice |
||
file-pdf |
||
file-powerpoint |
||
file-word |
||
file-xml |
||
file-zip |
||
file |
||
file2 |
||
file3 |
||
file4 |
||
film |
||
filter |
||
filter2 |
||
finder |
||
fire |
||
firefox |
||
first |
||
flag |
||
flattr |
||
flickr |
||
flickr2 |
||
flickr3 |
||
flickr4 |
||
flip |
||
flip2 |
||
folder-open |
||
folder |
||
font |
||
food |
||
forrst |
||
forrst2 |
||
forward |
||
forward2 |
||
forward3 |
||
foursquare |
||
foursquare2 |
||
gift |
||
github |
||
github2 |
||
github3 |
||
github4 |
||
github5 |
||
glass |
||
globe |
||
google-drive |
||
google-plus |
||
google-plus2 |
||
google-plus3 |
||
google-plus4 |
||
grin |
||
grin2 |
||
hammer |
||
hammer2 |
||
happy |
||
happy2 |
||
headphones |
||
heart-broken |
||
heart |
||
heart2 |
||
history |
||
home |
||
home2 |
||
home3 |
||
html5 |
||
html52 |
||
icomoon |
||
ie |
||
image |
||
image2 |
||
images |
||
indent-decrease |
||
indent-increase |
||
info |
||
info2 |
||
insert-template |
||
italic |
||
joomla |
||
key |
||
key2 |
||
keyboard |
||
lab |
||
lanyrd |
||
laptop |
||
last |
||
lastfm |
||
lastfm2 |
||
leaf |
||
left-to-right |
||
library |
||
libreoffice |
||
lightning |
||
link |
||
list |
||
list2 |
||
location |
||
location2 |
||
lock |
||
lock2 |
||
loop |
||
loop2 |
||
loop3 |
||
magnet |
||
mail2 |
||
mail3 |
||
mail4 |
||
map |
||
map2 |
||
menu |
||
menu2 |
||
meter |
||
meter2 |
||
minus |
||
mobile |
||
mobile2 |
||
mug |
||
music |
||
neutral |
||
neutral2 |
||
new-tab |
||
newspaper |
||
next |
||
notebook |
||
notification |
||
numbered-list |
||
office |
||
omega |
||
opera |
||
pacman |
||
paint-format |
||
paragraph-center |
||
paragraph-center2 |
||
paragraph-justify |
||
paragraph-justify2 |
||
paragraph-left |
||
paragraph-left2 |
||
paragraph-right |
||
paragraph-right2 |
||
paste |
||
paste2 |
||
paste3 |
||
pause |
||
pause2 |
||
pawn |
||
paypal |
||
paypal2 |
||
paypal3 |
||
pen |
||
pencil |
||
pencil2 |
||
phone-hang-up |
||
phone |
||
picassa |
||
picassa2 |
||
pie |
||
pilcrow |
||
pinterest2 |
||
play |
||
play2 |
||
play3 |
||
plus |
||
podcast |
||
point-down |
||
point-left |
||
point-right |
||
point-up |
||
power-cord |
||
previous |
||
profile |
||
pushpin |
||
qrcode |
||
question |
||
quill |
||
quotes-left |
||
radio-checked |
||
radio-unchecked |
||
redo |
||
redo2 |
||
remove |
||
remove2 |
||
reply |
||
right-to-left |
||
road |
||
rocket |
||
sad |
||
sad2 |
||
safari |
||
scissors |
||
screen |
||
search |
||
settings |
||
share |
||
shield |
||
shocked |
||
shocked2 |
||
shuffle |
||
sigma |
||
signup |
||
skype |
||
smiley |
||
smiley2 |
||
soundcloud |
||
soundcloud2 |
||
spades |
||
spam |
||
spell-check |
||
spinner |
||
spinner2 |
||
spinner3 |
||
spinner4 |
||
spinner5 |
||
spinner6 |
||
stack |
||
stackoverflow |
||
star |
||
star2 |
||
star3 |
||
stats |
||
steam |
||
steam2 |
||
stop |
||
stop2 |
||
stopwatch |
||
storage |
||
strikethrough |
||
stumbleupon |
||
stumbleupon2 |
||
support |
||
switch |
||
tab |
||
table |
||
table2 |
||
tablet |
||
tag |
||
tags |
||
target |
||
text-height |
||
text-width |
||
thumbs-up |
||
thumbs-up2 |
||
ticket |
||
tongue |
||
tongue2 |
||
tree |
||
trophy |
||
truck |
||
tumblr |
||
tumblr2 |
||
tux |
||
tv |
||
twitter2 |
||
twitter3 |
||
underline |
||
undo |
||
undo2 |
||
unlocked |
||
upload |
||
upload2 |
||
upload3 |
||
user |
||
user2 |
||
user3 |
||
user4 |
||
users |
||
users2 |
||
vimeo |
||
vimeo2 |
||
vimeo3 |
||
volume-decrease |
||
volume-high |
||
volume-increase |
||
volume-low |
||
volume-medium |
||
volume-mute |
||
volume-mute2 |
||
wand |
||
warning |
||
windows |
||
windows8 |
||
wink |
||
wink2 |
||
wondering |
||
wondering2 |
||
wordpress |
||
wordpress2 |
||
wrench |
||
xing2 |
||
yahoo |
||
yelp |
||
youtube |
||
youtube2 |
||
zoom-in |
||
zoom-out |