1. Introduction
Provides a shortcut for adding tango icons based on Tango! icon set.
Griffon version: 2.11.0
2. Usage
2.1. Swing
The griffon-tango-swing:2.0.0
JAR provides a new Icon class: griffon.swing.support.tangoicons.TangoIcon
.
You may use this class with any Swing component that supports an Icon property.
2.2. JavaFX
The griffon-tango-javafx:2.0.0
JAR provides a new Node class: griffon.javafx.support.tangoicons.TangoIcon
.
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|category:name:size
Here’s an example using the Swing icon
org.example.AppController.action.Preferences.icon=griffon.swing.support.tango.TangoIcon|apps:help-browser:32
The JavaFX version for the same icon value is
org.example.AppController.action.Preferences.icon=griffon.javafx.support.tango.TangoIcon|apps:help-browser: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-tangoicons-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
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-tangoicons-swing:2.0.0'
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-tangoicons-javafx:2.0.0'
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-tangoicons-swing-groovy:2.0.0'
}
dependencies {
compile 'org.codehaus.griffon.plugins:griffon-tangoicons-javafx-groovy:2.0.0'
}
3.2. Maven
First configure the griffon-tangoicons-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-tangoicons-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
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-tangoicons-swing</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-tangoicons-javafx</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-tangoicons-swing-groovy</artifactId>
</dependency>
<dependency>
<groupId>org.codehaus.griffon.plugins</groupId>
<artifactId>griffon-tangoicons-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: tangoicons-javafx-groovy
Depends on: javafx-groovy
bind(BuilderCustomizer.class)
.to(TangoIconsJavaFXBuilderCustomizer.class)
.asSingleton();
The following nodes will become available on a Groovy View
Node | Type |
---|---|
tangoIcon |
4.2. Swing
Module name: tangoicons-swing-groovy
Depends on: swing-groovy
bind(BuilderCustomizer.class)
.to(TangoIconsSwingBuilderCustomizer.class)
.asSingleton();
The following nodes will become available on a Groovy View
Node | Type |
---|---|
tangoIcon |
Both tangoIcon
Nodes support the following properties
- icon
-
The name of the icon, such as
actions:go-up
oractions:go-down
. - size
-
The size of the icon. One of
16
,22
,32
.
6. Icon Cheat Sheet
The following tables show all available icons. Table names stand for categories.
Name | 16 | 22 | 32 |
---|---|---|---|
address-book-new |
|||
appointment-new |
|||
bookmark-new |
|||
contact-new |
|||
document-new |
|||
document-open |
|||
document-print-preview |
|||
document-print |
|||
document-properties |
|||
document-save-as |
|||
document-save |
|||
edit-clear |
|||
edit-copy |
|||
edit-cut |
|||
edit-delete |
|||
edit-find-replace |
|||
edit-find |
|||
edit-paste |
|||
edit-redo |
|||
edit-select-all |
|||
edit-undo |
|||
folder-new |
|||
format-indent-less |
|||
format-indent-more |
|||
format-justify-center |
|||
format-justify-fill |
|||
format-justify-left |
|||
format-justify-right |
|||
format-text-bold |
|||
format-text-italic |
|||
format-text-strikethrough |
|||
format-text-underline |
|||
go-bottom |
|||
go-down |
|||
go-first |
|||
go-home |
|||
go-jump |
|||
go-last |
|||
go-next |
|||
go-previous |
|||
go-top |
|||
go-up |
|||
list-add |
|||
list-remove |
|||
mail-forward |
|||
mail-mark-junk |
|||
mail-mark-not-junk |
|||
mail-message-new |
|||
mail-reply-all |
|||
mail-reply-sender |
|||
mail-send-receive |
|||
media-eject |
|||
media-playback-pause |
|||
media-playback-start |
|||
media-playback-stop |
|||
media-record |
|||
media-seek-backward |
|||
media-seek-forward |
|||
media-skip-backward |
|||
media-skip-forward |
|||
process-stop |
|||
system-lock-screen |
|||
system-log-out |
|||
system-search |
|||
system-shutdown |
|||
tab-new |
|||
view-fullscreen |
|||
view-refresh |
|||
window-new |
Name | 16 | 22 | 32 |
---|---|---|---|
accessories-calculator |
|||
accessories-character-map |
|||
accessories-text-editor |
|||
help-browser |
|||
internet-group-chat |
|||
internet-mail |
|||
internet-news-reader |
|||
internet-web-browser |
|||
office-calendar |
|||
preferences-desktop-accessibility |
|||
preferences-desktop-assistive-technology |
|||
preferences-desktop-font |
|||
preferences-desktop-keyboard-shortcuts |
|||
preferences-desktop-locale |
|||
preferences-desktop-multimedia |
|||
preferences-desktop-remote-desktop |
|||
preferences-desktop-screensaver |
|||
preferences-desktop-theme |
|||
preferences-desktop-wallpaper |
|||
preferences-system-network-proxy |
|||
preferences-system-session |
|||
preferences-system-windows |
|||
system-file-manager |
|||
system-installer |
|||
system-software-update |
|||
system-users |
|||
utilities-system-monitor |
|||
utilities-terminal |
Name | 16 | 22 | 32 |
---|---|---|---|
applications-accessories |
|||
applications-development |
|||
applications-games |
|||
applications-graphics |
|||
applications-internet |
|||
applications-multimedia |
|||
applications-office |
|||
applications-other |
|||
applications-system |
|||
preferences-desktop-peripherals |
|||
preferences-desktop |
|||
preferences-system |
Name | 16 | 22 | 32 |
---|---|---|---|
audio-card |
|||
audio-input-microphone |
|||
battery |
|||
camera-photo |
|||
camera-video |
|||
computer |
|||
drive-harddisk |
|||
drive-optical |
|||
drive-removable-media |
|||
input-gaming |
|||
input-keyboard |
|||
input-mouse |
|||
media-flash |
|||
media-floppy |
|||
media-optical |
|||
multimedia-player |
|||
network-wired |
|||
network-wireless |
|||
printer |
|||
video-display |
Name | 16 | 22 | 32 |
---|---|---|---|
emblem-favorite |
|||
emblem-important |
|||
emblem-photos |
|||
emblem-readonly |
|||
emblem-symbolic-link |
|||
emblem-system |
|||
emblem-unreadable |
Name | 16 | 22 | 32 |
---|---|---|---|
face-angel |
|||
face-crying |
|||
face-devilish |
|||
face-glasses |
|||
face-grin |
|||
face-kiss |
|||
face-monkey |
|||
face-plain |
|||
face-sad |
|||
face-smile-big |
|||
face-smile |
|||
face-surprise |
|||
face-wink |
Name | 16 | 22 | 32 |
---|---|---|---|
application-certificate |
|||
application-x-executable |
|||
audio-x-generic |
|||
font-x-generic |
|||
image-x-generic |
|||
package-x-generic |
|||
text-html |
|||
text-x-generic-template |
|||
text-x-generic |
|||
text-x-script |
|||
video-x-generic |
|||
x-office-address-book |
|||
x-office-calendar |
|||
x-office-document-template |
|||
x-office-document |
|||
x-office-drawing-template |
|||
x-office-drawing |
|||
x-office-presentation-template |
|||
x-office-presentation |
|||
x-office-spreadsheet-template |
|||
x-office-spreadsheet |
Name | 16 | 22 | 32 |
---|---|---|---|
folder-remote |
|||
folder-saved-search |
|||
folder |
|||
network-server |
|||
network-workgroup |
|||
start-here |
|||
user-desktop |
|||
user-home |
|||
user-trash |
Name | 16 | 22 | 32 |
---|---|---|---|
audio-volume-high |
|||
audio-volume-low |
|||
audio-volume-medium |
|||
audio-volume-muted |
|||
battery-caution |
|||
dialog-error |
|||
dialog-information |
|||
dialog-warning |
|||
folder-drag-accept |
|||
folder-open |
|||
folder-visiting |
|||
image-loading |
|||
image-missing |
|||
mail-attachment |
|||
network-error |
|||
network-idle |
|||
network-offline |
|||
network-receive |
|||
network-transmit-receive |
|||
network-transmit |
|||
network-wireless-encrypted |
|||
printer-error |
|||
software-update-available |
|||
software-update-urgent |
|||
user-trash-full |
|||
weather-clear-night |
|||
weather-clear |
|||
weather-few-clouds-night |
|||
weather-few-clouds |
|||
weather-overcast |
|||
weather-severe-alert |
|||
weather-showers-scattered |
|||
weather-showers |
|||
weather-snow |
|||
weather-storm |