1. Introduction

Provides a shortcut for adding feed icons based on ZeusBox Studio’s Feed Icons.

Griffon version: 2.11.0

2. Usage

2.1. Swing

The griffon-feed-swing:2.0.0 JAR provides a new Icon class: griffon.swing.support.feedicons.FeedIcon. You may use this class with any Swing component that supports an Icon property.

2.2. JavaFX

The griffon-feed-javafx:2.0.0 JAR provides a new Node class: griffon.javafx.support.feedicons.FeedIcon. 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.feed.FeedIcon|feed:32

The JavaFX version for the same icon value is

griffon-app/i18n/messages.properties
org.example.AppController.action.Preferences.icon=griffon.javafx.support.feed.FeedIcon|feed: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-feedicons-plugin:2.0.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-feedicons-swing:2.0.0'
}
Java + JavaFX
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-feedicons-javafx:2.0.0'
}
Groovy + Swing
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-feedicons-swing-groovy:2.0.0'
}
Groovy + JavaFX
dependencies {
    compile 'org.codehaus.griffon.plugins:griffon-feedicons-javafx-groovy:2.0.0'
}

3.2. Maven

First configure the griffon-feedicons-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-feedicons-plugin</artifactId>
            <version>2.0.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-feedicons-swing</artifactId>
</dependency>
Java + JavaFX
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-feedicons-javafx</artifactId>
</dependency>
Groovy + Swing
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-feedicons-swing-groovy</artifactId>
</dependency>
Groovy + JavaFX
<dependency>
    <groupId>org.codehaus.griffon.plugins</groupId>
    <artifactId>griffon-feedicons-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: feedicons-javafx-groovy

Depends on: javafx-groovy

bind(BuilderCustomizer.class)
    .to(FeedIconsJavaFXBuilderCustomizer.class)
    .asSingleton();

The following nodes will become available on a Groovy View

Node Type

feedIcon

griffon.javafx.support.feedicons.FeedIcon

4.2. Swing

Module name: feedicons-swing-groovy

Depends on: swing-groovy

bind(BuilderCustomizer.class)
    .to(FeedIconsSwingBuilderCustomizer.class)
    .asSingleton();

The following nodes will become available on a Groovy View

Node Type

feedIcon

griffon.swing.support.feedicons.FeedIcon

Both feedIcon Nodes support the following properties

icon

The name of the icon, such as rss or folder.

size

The size of the icon. Either 16 or 32.

6. Icon Cheat Sheet

The following table shows all available icons.

Name 16 32

activity_window

activity_window

activity_window

check_all

check_all

check_all

comment_rss

comment_rss

comment_rss

comment_rss_add

comment_rss_add

comment_rss_add

comment_rss_delete

comment_rss_delete

comment_rss_delete

comment_rss_info

comment_rss_info

comment_rss_info

feed_source

feed_source

feed_source

flag

flag

flag

folder

folder

folder

folder_add

folder_add

folder_add

folder_remove

folder_remove

folder_remove

folder_rss

folder_rss

folder_rss

info

info

info

mark_as_read

mark_as_read

mark_as_read

next_rss

next_rss

next_rss

next_unread

next_unread

next_unread

post_delicious

post_delicious

post_delicious

post_to_blog

post_to_blog

post_to_blog

previous_rss

previous_rss

previous_rss

previous_unread

previous_unread

previous_unread

reload

reload

reload

rss

rss

rss

rss_file

rss_file

rss_file

rss_file_add

rss_file_add

rss_file_add

rss_file_info

rss_file_info

rss_file_info

rss_file_remove

rss_file_remove

rss_file_remove

rss_pill_blue

rss_pill_blue

rss_pill_blue

rss_pill_orange

rss_pill_orange

rss_pill_orange

site

site

site

site_rss

site_rss

site_rss

stop

stop

stop

subscribe

subscribe

subscribe

unsubscribe

unsubscribe

unsubscribe