« Icons » : différence entre les versions
Aller à la navigation
Aller à la recherche
(Page créée avec « TBW ... Return to the introduction ↑ Go to the next page → ») |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
<font color=#556B2F>'''GENIUS'''</font> also allows to get icons instead of buttons with label: | |||
* It can be done using the [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GButton.html GButton] class with a specific constructor taking a [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GIcon.html GIcon] object as an argument | |||
* It also applies to [{{PathCurrentJavaDoc}}/fr/cnes/genius/threads/GCommandLauncher.GExecButton.html GExecButton] | |||
<font color=#556B2F>'''GENIUS'''</font> proposes standard icons (included into the genius.jar file) via the [{{PathCurrentJavaDoc}}/fr/cnes/genius/lowLevel/GIcon.html GIcon] class. The following icons are available: | |||
* CLEAR | |||
* COLLAPSE | |||
* DELETE | |||
* ERROR | |||
* EXIT | |||
* EXPAND | |||
* INFO | |||
* OPEN | |||
* PRINT | |||
* SAVE | |||
* START | |||
* STOP | |||
* WARNING | |||
[[File:Icons.jpg] | |||
<syntaxhighlight lang="java"> | |||
butLoad = new GButton("Load", new GIcon (GIcon.Type.OPEN, 24)); // Size = 24 pixels | |||
butWrite = new GButton("Write", new GIcon (GIcon. Type.SAVE, 24)); | |||
butClear = new GButton("Clear", new GIcon (GIcon. Type.CLEAR, 24)); | |||
butQuit = new GButton("Quit", new GIcon (GIcon. Type.EXIT, 24)); | |||
cmd = new GJavaCommandLauncher( … ); | |||
// Icons change automatically when launch/stop | |||
cmd.setButtonIcons(new GIcon(GIcon.Type.START, 24), new GIcon(GIcon.Type.STOP, 24)); | |||
// Specific icon | |||
butAppli = new GButton("Appli", String absoluteOrRelativePath); | |||
</syntaxhighlight> | |||
[[WELCOME_TO_THE_GENIUS_WIKI|Return to the introduction ↑]] | [[WELCOME_TO_THE_GENIUS_WIKI|Return to the introduction ↑]] | ||
[[GClear_interface|Go to the next page →]] | [[GClear_interface|Go to the next page →]] |
Version du 5 mai 2017 à 11:48
GENIUS also allows to get icons instead of buttons with label:
- It can be done using the GButton class with a specific constructor taking a GIcon object as an argument
- It also applies to GExecButton
GENIUS proposes standard icons (included into the genius.jar file) via the GIcon class. The following icons are available:
- CLEAR
- COLLAPSE
- DELETE
- ERROR
- EXIT
- EXPAND
- INFO
- OPEN
- SAVE
- START
- STOP
- WARNING
[[File:Icons.jpg]
butLoad = new GButton("Load", new GIcon (GIcon.Type.OPEN, 24)); // Size = 24 pixels
butWrite = new GButton("Write", new GIcon (GIcon. Type.SAVE, 24));
butClear = new GButton("Clear", new GIcon (GIcon. Type.CLEAR, 24));
butQuit = new GButton("Quit", new GIcon (GIcon. Type.EXIT, 24));
cmd = new GJavaCommandLauncher( … );
// Icons change automatically when launch/stop
cmd.setButtonIcons(new GIcon(GIcon.Type.START, 24), new GIcon(GIcon.Type.STOP, 24));
// Specific icon
butAppli = new GButton("Appli", String absoluteOrRelativePath);