[izpack-devel] The icon for the done button

Miraodb miraodb at hotmail.com
Thu Aug 24 10:54:29 CEST 2006


Hi Guyz,

All this sounds good to me.
I made almost the same changes on my local and it worked. Just different
naming...
I agree with Klaus that the switch is a must !

Cheers,
Fabrice
----- Original Message ----- 
From: "Bartz, Klaus" <Klaus.Bartz at coi.de>
To: <izpack-devel at lists.berlios.de>
Sent: Thursday, August 24, 2006 9:21 AM
Subject: Re: [izpack-devel] The icon for the done button


> Hi Ryan,
> OK, no facultativity of a new feature. I use no button icons, therefor
> no problem for me, but...
> in general it is possible to switch off buttons. This will be
> done by the com.izforge.izpack.util.ButtonFactory.
> Unfortunately there is current no public getter for useButtonIcons.
> I can make one or use eval it in setQuitButtonIcon(String iconName)
>     public void setQuitButtonIcon(String iconName)
>     {
>         String doIt =
idata.guiPrefs.modifier.containsKey("useButtonIcons");
>         if ( doIt == null || "yes".equalsIgnoreCase(doIt))
>             quitButton.setIcon(icons.getImageIcon(iconName));
>     }
> If not possible, I will fix your changes.
>
> Cheers
>
> Klaus
>
> >-----Original Message-----
> >From: izpack-devel-bounces at lists.berlios.de
> >[mailto:izpack-devel-bounces at lists.berlios.de]On Behalf Of Ryan
> >Shillington
> >Sent: Wednesday, August 23, 2006 11:35 PM
> >To: izpack-devel at lists.berlios.de
> >Subject: Re: [izpack-devel] The icon for the done button
> >
> >
> >Here's my change for the done button.  What do you think?
> >
> >Index: lib/com/izforge/izpack/panels/FinishPanel.java
> >===================================================================
> >--- lib/com/izforge/izpack/panels/FinishPanel.java      (revision 1529)
> >+++ lib/com/izforge/izpack/panels/FinishPanel.java      (working copy)
> >@@ -48,10 +48,10 @@
> >     private static final long serialVersionUID = 3257282535107998009L;
> >
> >     /** The automated installers generation button. */
> >-    private JButton autoButton;
> >+    protected JButton autoButton;
> >
> >     /** The variables substitutor. */
> >-    private VariableSubstitutor vs;
> >+    protected VariableSubstitutor vs;
> >
> >     /**
> >      * The constructor.
> >@@ -84,6 +84,7 @@
> >         parent.lockNextButton();
> >         parent.lockPrevButton();
> >
> >parent.setQuitButtonText(parent.langpack.getString("FinishPanel
> >.done"));
> >+        parent.setQuitButtonIcon("done");
> >         if (idata.installSuccess)
> >         {
> >             // We set the information
> >@@ -159,7 +160,7 @@
> >      * @param destination The path to translate.
> >      * @return The translated path.
> >      */
> >-    private String translatePath(String destination)
> >+    protected String translatePath(String destination)
> >     {
> >         // Parse for variables
> >         destination = vs.substitute(destination, null);
> >Index: lib/com/izforge/izpack/panels/SimpleFinishPanel.java
> >===================================================================
> >--- lib/com/izforge/izpack/panels/SimpleFinishPanel.java
> >(revision 1529)
> >+++ lib/com/izforge/izpack/panels/SimpleFinishPanel.java
> > (working
> >copy)
> >@@ -78,6 +78,7 @@
> >         parent.lockNextButton();
> >         parent.lockPrevButton();
> >
> >parent.setQuitButtonText(parent.langpack.getString("FinishPanel
> >.done"));
> >+        parent.setQuitButtonIcon("done");
> >         if (idata.installSuccess)
> >         {
> >
> >Index: lib/com/izforge/izpack/installer/InstallerFrame.java
> >===================================================================
> >--- lib/com/izforge/izpack/installer/InstallerFrame.java
> >(revision 1529)
> >+++ lib/com/izforge/izpack/installer/InstallerFrame.java
> > (working
> >copy)
> >@@ -972,6 +972,11 @@
> >         quitButton.setText(text1);
> >     }
> >
> >+    public void setQuitButtonIcon(String iconName)
> >+    {
> >+        quitButton.setIcon(icons.getImageIcon(iconName));
> >+    }
> >+
> >     /*
> >      * FocusTraversalPolicy objects to handle keybord blocking; the
> >declaration os Object allows to
> >      * use a pre version 1.4 VM.
> >Index: lib/com/izforge/izpack/installer/icons.xml
> >===================================================================
> >--- lib/com/izforge/izpack/installer/icons.xml  (revision 1529)
> >+++ lib/com/izforge/izpack/installer/icons.xml  (working copy)
> >@@ -5,6 +5,7 @@
> >     <icon res="/img/leftarrow.png" id="stepback"/>
> >     <icon res="/img/rightarrow.png" id="stepforward"/>
> >     <icon res="/img/stop.png" id="stop"/>
> >+    <icon res="/img/done.png" id="done"/>
> >     <icon res="/img/kcontrol.png" id="host"/>
> >     <icon res="/img/info.png" id="information"/>
> >     <icon res="/img/contents.png" id="history"/>
> >Index: img/installer/img/done.png
> >===================================================================
> >Cannot display: file marked as a binary type.
> >svn:mime-type = application/octet-stream
> >
> >Property changes on: img\installer\img\done.png
> >___________________________________________________________________
> >Name: svn:mime-type
> >   + application/octet-stream
> >
> <snip>
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-devel
>
>




More information about the izpack-devel mailing list