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

griffon-app/i18n/messages.properties
org.example.AppController.action.Preferences.icon=griffon.swing.support.icomoon.IconMoonIcon|star:32

The JavaFX version for the same icon value is

griffon-app/i18n/messages.properties
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

Java + Swing
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-swing:1.1.0'
}
Java + JavaFX
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-javafx:1.1.0'
}
Groovy + Swing
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-icomoonicons-swing-groovy:1.1.0'
}
Groovy + JavaFX
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

Java + Swing
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-icomoonicons-swing</artifactId>
</dependency>
Java + JavaFX
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-icomoonicons-javafx</artifactId>
</dependency>
Groovy + Swing
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-icomoonicons-swing-groovy</artifactId>
</dependency>
Groovy + JavaFX
<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

griffon.javafx.support.icomoonicons.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

griffon.swing.support.icomoonicons.IcoMoonIcon

Both icoMoonIcon Nodes support the following properties

icon

The name of the icon, such as github or twitter.

size

The size of the icon. Either 16 or 32.

6. Icon Cheat Sheet

The following table shows all available icons.

Name 16 32

accessibility

accessibility

accessibility

address-book

address-book

address-book

aid

aid

aid

airplane

airplane

airplane

alarm

alarm

alarm

alarm2

alarm2

alarm2

android

android

android

angry

angry

angry

angry2

angry2

angry2

apple

apple

apple

arrow-down-left

arrow-down-left

arrow-down-left

arrow-down-left2

arrow-down-left2

arrow-down-left2

arrow-down-left3

arrow-down-left3

arrow-down-left3

arrow-down-right

arrow-down-right

arrow-down-right

arrow-down-right2

arrow-down-right2

arrow-down-right2

arrow-down-right3

arrow-down-right3

arrow-down-right3

arrow-down

arrow-down

arrow-down

arrow-down2

arrow-down2

arrow-down2

arrow-down3

arrow-down3

arrow-down3

arrow-left

arrow-left

arrow-left

arrow-left2

arrow-left2

arrow-left2

arrow-left3

arrow-left3

arrow-left3

arrow-right

arrow-right

arrow-right

arrow-right2

arrow-right2

arrow-right2

arrow-right3

arrow-right3

arrow-right3

arrow-up-left

arrow-up-left

arrow-up-left

arrow-up-left2

arrow-up-left2

arrow-up-left2

arrow-up-left3

arrow-up-left3

arrow-up-left3

arrow-up-right

arrow-up-right

arrow-up-right

arrow-up-right2

arrow-up-right2

arrow-up-right2

arrow-up-right3

arrow-up-right3

arrow-up-right3

arrow-up

arrow-up

arrow-up

arrow-up2

arrow-up2

arrow-up2

arrow-up3

arrow-up3

arrow-up3

attachment

attachment

attachment

backward

backward

backward

backward2

backward2

backward2

barcode

barcode

barcode

bars

bars

bars

bars2

bars2

bars2

bell

bell

bell

binoculars

binoculars

binoculars

blocked

blocked

blocked

blog

blog

blog

blogger

blogger

blogger

blogger2

blogger2

blogger2

bold

bold

bold

book

book

book

bookmark

bookmark

bookmark

bookmarks

bookmarks

bookmarks

books

books

books

box-add

box-add

box-add

box-remove

box-remove

box-remove

briefcase

briefcase

briefcase

brightness-contrast

brightness-contrast

brightness-contrast

brightness-medium

brightness-medium

brightness-medium

bubble

bubble

bubble

bubble2

bubble2

bubble2

bubbles

bubbles

bubbles

bubbles2

bubbles2

bubbles2

bubbles3

bubbles3

bubbles3

bubbles4

bubbles4

bubbles4

bug

bug

bug

bullhorn

bullhorn

bullhorn

busy

busy

busy

cabinet

cabinet

cabinet

calculate

calculate

calculate

calendar

calendar

calendar

calendar2

calendar2

calendar2

camera

camera

camera

camera2

camera2

camera2

cancel-circle

cancel-circle

cancel-circle

cart

cart

cart

cart2

cart2

cart2

cart3

cart3

cart3

checkbox-checked

checkbox-checked

checkbox-checked

checkbox-partial

checkbox-partial

checkbox-partial

checkbox-unchecked

checkbox-unchecked

checkbox-unchecked

checkmark-circle

checkmark-circle

checkmark-circle

checkmark

checkmark

checkmark

checkmark2

checkmark2

checkmark2

chrome

chrome

chrome

clock

clock

clock

clock2

clock2

clock2

close

close

close

cloud-download

cloud-download

cloud-download

cloud-upload

cloud-upload

cloud-upload

cloud

cloud

cloud

clubs

clubs

clubs

code

code

code

cog

cog

cog

cog2

cog2

cog2

cogs

cogs

cogs

coin

coin

coin

compass

compass

compass

confused

confused

confused

confused2

confused2

confused2

connection

connection

connection

console

console

console

contract

contract

contract

contract2

contract2

contract2

contrast

contrast

contrast

cool

cool

cool

cool2

cool2

cool2

copy

copy

copy

copy2

copy2

copy2

copy3

copy3

copy3

credit

credit

credit

crop

crop

crop

css3

css3

css3

dashboard

dashboard

dashboard

delicious

delicious

delicious

deviantart

deviantart

deviantart

deviantart2

deviantart2

deviantart2

diamonds

diamonds

diamonds

dice

dice

dice

disk

disk

disk

download

download

download

download2

download2

download2

download3

download3

download3

drawer

drawer

drawer

drawer2

drawer2

drawer2

drawer3

drawer3

drawer3

dribbble

dribbble

dribbble

dribbble2

dribbble2

dribbble2

dribbble3

dribbble3

dribbble3

droplet

droplet

droplet

earth

earth

earth

eject

eject

eject

embed

embed

embed

enter

enter

enter

envelop

envelop

envelop

equalizer

equalizer

equalizer

evil

evil

evil

evil2

evil2

evil2

exit

exit

exit

expand

expand

expand

expand2

expand2

expand2

eye-blocked

eye-blocked

eye-blocked

eye

eye

eye

eye2

eye2

eye2

facebook

facebook

facebook

facebook2

facebook2

facebook2

facebook3

facebook3

facebook3

feed

feed

feed

feed2

feed2

feed2

feed3

feed3

feed3

feed4

feed4

feed4

file-css

file-css

file-css

file-excel

file-excel

file-excel

file-openoffice

file-openoffice

file-openoffice

file-pdf

file-pdf

file-pdf

file-powerpoint

file-powerpoint

file-powerpoint

file-word

file-word

file-word

file-xml

file-xml

file-xml

file-zip

file-zip

file-zip

file

file

file

file2

file2

file2

file3

file3

file3

file4

file4

file4

film

film

film

filter

filter

filter

filter2

filter2

filter2

finder

finder

finder

fire

fire

fire

firefox

firefox

firefox

first

first

first

flag

flag

flag

flattr

flattr

flattr

flickr

flickr

flickr

flickr2

flickr2

flickr2

flickr3

flickr3

flickr3

flickr4

flickr4

flickr4

flip

flip

flip

flip2

flip2

flip2

folder-open

folder-open

folder-open

folder

folder

folder

font

font

font

food

food

food

forrst

forrst

forrst

forrst2

forrst2

forrst2

forward

forward

forward

forward2

forward2

forward2

forward3

forward3

forward3

foursquare

foursquare

foursquare

foursquare2

foursquare2

foursquare2

gift

gift

gift

github

github

github

github2

github2

github2

github3

github3

github3

github4

github4

github4

github5

github5

github5

glass

glass

glass

globe

globe

globe

google-drive

google-drive

google-drive

google-plus

google-plus

google-plus

google-plus2

google-plus2

google-plus2

google-plus3

google-plus3

google-plus3

google-plus4

google-plus4

google-plus4

google

google

google

grin

grin

grin

grin2

grin2

grin2

hammer

hammer

hammer

hammer2

hammer2

hammer2

happy

happy

happy

happy2

happy2

happy2

headphones

headphones

headphones

heart-broken

heart-broken

heart-broken

heart

heart

heart

heart2

heart2

heart2

history

history

history

home

home

home

home2

home2

home2

home3

home3

home3

html5

html5

html5

html52

html52

html52

icomoon

icomoon

icomoon

ie

ie

ie

image

image

image

image2

image2

image2

images

images

images

indent-decrease

indent-decrease

indent-decrease

indent-increase

indent-increase

indent-increase

info

info

info

info2

info2

info2

insert-template

insert-template

insert-template

instagram

instagram

instagram

italic

italic

italic

joomla

joomla

joomla

key

key

key

key2

key2

key2

keyboard

keyboard

keyboard

lab

lab

lab

lanyrd

lanyrd

lanyrd

laptop

laptop

laptop

last

last

last

lastfm

lastfm

lastfm

lastfm2

lastfm2

lastfm2

leaf

leaf

leaf

left-to-right

left-to-right

left-to-right

library

library

library

libreoffice

libreoffice

libreoffice

lightning

lightning

lightning

link

link

link

linkedin

linkedin

linkedin

list

list

list

list2

list2

list2

location

location

location

location2

location2

location2

lock

lock

lock

lock2

lock2

lock2

loop

loop

loop

loop2

loop2

loop2

loop3

loop3

loop3

magnet

magnet

magnet

mail

mail

mail

mail2

mail2

mail2

mail3

mail3

mail3

mail4

mail4

mail4

map

map

map

map2

map2

map2

menu

menu

menu

menu2

menu2

menu2

meter

meter

meter

meter2

meter2

meter2

minus

minus

minus

mobile

mobile

mobile

mobile2

mobile2

mobile2

mug

mug

mug

music

music

music

neutral

neutral

neutral

neutral2

neutral2

neutral2

new-tab

new-tab

new-tab

newspaper

newspaper

newspaper

next

next

next

notebook

notebook

notebook

notification

notification

notification

numbered-list

numbered-list

numbered-list

office

office

office

omega

omega

omega

opera

opera

opera

pacman

pacman

pacman

paint-format

paint-format

paint-format

paragraph-center

paragraph-center

paragraph-center

paragraph-center2

paragraph-center2

paragraph-center2

paragraph-justify

paragraph-justify

paragraph-justify

paragraph-justify2

paragraph-justify2

paragraph-justify2

paragraph-left

paragraph-left

paragraph-left

paragraph-left2

paragraph-left2

paragraph-left2

paragraph-right

paragraph-right

paragraph-right

paragraph-right2

paragraph-right2

paragraph-right2

paste

paste

paste

paste2

paste2

paste2

paste3

paste3

paste3

pause

pause

pause

pause2

pause2

pause2

pawn

pawn

pawn

paypal

paypal

paypal

paypal2

paypal2

paypal2

paypal3

paypal3

paypal3

pen

pen

pen

pencil

pencil

pencil

pencil2

pencil2

pencil2

phone-hang-up

phone-hang-up

phone-hang-up

phone

phone

phone

picassa

picassa

picassa

picassa2

picassa2

picassa2

pie

pie

pie

pilcrow

pilcrow

pilcrow

pinterest

pinterest

pinterest

pinterest2

pinterest2

pinterest2

play

play

play

play2

play2

play2

play3

play3

play3

plus

plus

plus

podcast

podcast

podcast

point-down

point-down

point-down

point-left

point-left

point-left

point-right

point-right

point-right

point-up

point-up

point-up

power-cord

power-cord

power-cord

previous

previous

previous

print

print

print

profile

profile

profile

pushpin

pushpin

pushpin

qrcode

qrcode

qrcode

question

question

question

quill

quill

quill

quotes-left

quotes-left

quotes-left

radio-checked

radio-checked

radio-checked

radio-unchecked

radio-unchecked

radio-unchecked

reddit

reddit

reddit

redo

redo

redo

redo2

redo2

redo2

remove

remove

remove

remove2

remove2

remove2

reply

reply

reply

right-to-left

right-to-left

right-to-left

road

road

road

rocket

rocket

rocket

sad

sad

sad

sad2

sad2

sad2

safari

safari

safari

scissors

scissors

scissors

screen

screen

screen

search

search

search

settings

settings

settings

share

share

share

shield

shield

shield

shocked

shocked

shocked

shocked2

shocked2

shocked2

shuffle

shuffle

shuffle

sigma

sigma

sigma

signup

signup

signup

skype

skype

skype

smiley

smiley

smiley

smiley2

smiley2

smiley2

soundcloud

soundcloud

soundcloud

soundcloud2

soundcloud2

soundcloud2

spades

spades

spades

spam

spam

spam

spell-check

spell-check

spell-check

spinner

spinner

spinner

spinner2

spinner2

spinner2

spinner3

spinner3

spinner3

spinner4

spinner4

spinner4

spinner5

spinner5

spinner5

spinner6

spinner6

spinner6

stack

stack

stack

stackoverflow

stackoverflow

stackoverflow

star

star

star

star2

star2

star2

star3

star3

star3

stats

stats

stats

steam

steam

steam

steam2

steam2

steam2

stop

stop

stop

stop2

stop2

stop2

stopwatch

stopwatch

stopwatch

storage

storage

storage

strikethrough

strikethrough

strikethrough

stumbleupon

stumbleupon

stumbleupon

stumbleupon2

stumbleupon2

stumbleupon2

support

support

support

switch

switch

switch

tab

tab

tab

table

table

table

table2

table2

table2

tablet

tablet

tablet

tag

tag

tag

tags

tags

tags

target

target

target

text-height

text-height

text-height

text-width

text-width

text-width

thumbs-up

thumbs-up

thumbs-up

thumbs-up2

thumbs-up2

thumbs-up2

ticket

ticket

ticket

tongue

tongue

tongue

tongue2

tongue2

tongue2

tree

tree

tree

trophy

trophy

trophy

truck

truck

truck

tumblr

tumblr

tumblr

tumblr2

tumblr2

tumblr2

tux

tux

tux

tv

tv

tv

twitter

twitter

twitter

twitter2

twitter2

twitter2

twitter3

twitter3

twitter3

underline

underline

underline

undo

undo

undo

undo2

undo2

undo2

unlocked

unlocked

unlocked

upload

upload

upload

upload2

upload2

upload2

upload3

upload3

upload3

user

user

user

user2

user2

user2

user3

user3

user3

user4

user4

user4

users

users

users

users2

users2

users2

vimeo

vimeo

vimeo

vimeo2

vimeo2

vimeo2

vimeo3

vimeo3

vimeo3

volume-decrease

volume-decrease

volume-decrease

volume-high

volume-high

volume-high

volume-increase

volume-increase

volume-increase

volume-low

volume-low

volume-low

volume-medium

volume-medium

volume-medium

volume-mute

volume-mute

volume-mute

volume-mute2

volume-mute2

volume-mute2

wand

wand

wand

warning

warning

warning

windows

windows

windows

windows8

windows8

windows8

wink

wink

wink

wink2

wink2

wink2

wondering

wondering

wondering

wondering2

wondering2

wondering2

wordpress

wordpress

wordpress

wordpress2

wordpress2

wordpress2

wrench

wrench

wrench

xing

xing

xing

xing2

xing2

xing2

yahoo

yahoo

yahoo

yelp

yelp

yelp

youtube

youtube

youtube

youtube2

youtube2

youtube2

zoom-in

zoom-in

zoom-in

zoom-out

zoom-out

zoom-out