[izpack-users] Help text for the userInputPanel Fields

Bartz, Klaus Klaus.Bartz at coi.de
Mon Jun 18 13:43:39 CEST 2007


Hi Mandeep,
IzPack do not contain a separated help system. It is recomanded
to write the label text in a manner that a help is not needed.
On the other hand you are free to declare a help button inside the 
UserInputPanel, if you would have a UserInputPanel specific help system.
An alternate will be to use an additional UserInputPanel which contains
only labels with the help text.

I know, there are some people which prefer common help. 
For this few people I have added the possibility of adding butons to the
navigation panel. In my private part I have implemented the help
stuff. Some of the code I have sent in my last email. This code is
NOT part of the IzPack distribution. My implementation is not ready
for generic use because it works not on all OSes (e.g. not on
HP-UX). Additional it supports only a global, not a context 
sensitive help. In the design phase of my help system I have thougt
about using JHelp for it. But jh.jar has ~ a half mega byte and current
there is no developing on it.

I tend also to use standard IzPack as long as possible. Standard 
IzPack with my additional custom panels and custom actions...
And this is possible with code I have send. It is not need to change 
something in standard IzPack after an update of IzPack. Simple
copy the panel jar file into bin\panels and it works with the old
install.xml.

I will be not happy with a UserInputPanel specific hard implemented
help feature which shows the contents of a text file. Mainly it is 
always visible.
In the moment I use a HTML file with hyperlinks into world. May be with 
an other installation PDF. And so on... 
I need this help not for one or two UserInpuPanels else for all panels.
If there is a help button, it should be in the navigation panel,
not in an implementation of IzPanel, I think.

Cheers

Klaus


> -----Original Message-----
> From: izpack-users-bounces at lists.berlios.de 
> [mailto:izpack-users-bounces at lists.berlios.de] On Behalf Of 
> Mandeep Saini
> Sent: Friday, June 15, 2007 3:56 PM
> To: izpack-users at lists.berlios.de
> Cc: Bartz, Klaus
> Subject: Re: [izpack-users] Help text for the userInputPanel Fields
> 
> 
> Hi Bartz,
> 
> 
> Thanks a lot for the detailed reply.
> 
> The way you suggested is absolutely fine and its working fine 
> but I am 
> thinking that it would be better to introduce this feature through 
> userInputSpec.xml file.
> 
> For example, We can introduce a field 'Help Button' for 
> UserInputPanel 
> and as a attribute of this field we can have 'helpTextFile'. 
> As a value 
> of this attribute we can specify path to the help text file. 
> When user 
> will click on the help button the text in the file will be 
> displayed in 
> the separate window.
> 
> I am ready to write this piece of code but if I write, will it be 
> possible to merge the code in next Izpack release. Actually, we don't 
> want to change the izpack core such that whenever a new release will 
> happen, we have to merge the our changes with the new 
> release. Rather, 
> we want to stick with the standard izpack as far as possible.
> 
> Thanks
> Mandeep
> 
> 
> > Hi Mandeep,
> > some installer tools (e.g. MSI) means that a separated help will be 
> > not state of the art... But you can add tool tips to your 
> components 
> > (buttons etc.), if you write custom panels. And you can 
> also add your 
> > own button into the navigation panel of IzPack.
> > 
> > How to add a button into the navigation panel:
> > you can implement a hidden IzPanel which implements the interface 
> > GUIListener and ActionListener. Place it at first panel. Call 
> > parent.addGuiListener(this) in the constructor. Create the 
> help button 
> > in guiActionPerformed if the flag is GUI_BUILDED. Add the button to 
> > the given navigation panel. Do not forget to add "this" as 
> > ActionListener of the help button. Do your help work in 
> > actionPerformed.
> > 
> > Cheers
> > 
> > Klaus
> > 
> > 
> > 
> > public class HelpFeaturePanel extends IzPanel implements 
> GUIListener, 
> > ActionListener {
> >     // Other class specific variables.
> >     /** The help button. */
> >     protected JButton helpButton;
> > 
> >     /**
> >      * The constructor.
> >      * 
> >      * @param parent The parent IzPack installer frame.
> >      * @param idata The installer internal data.
> >      */
> >     public HelpFeaturePanel(InstallerFrame parent, 
> InstallData idata)
> >     {
> >         super(parent, idata);
> >         setHidden(true);
> >         parent.addGuiListener(this);
> > 
> >     }
> > 
> >     /** Called when the panel becomes active. */
> >     public void panelActivate()
> >     {
> >         parent.skipPanel();
> >     }
> > 
> >     /*
> >      * (non-Javadoc)
> >      * 
> >      * @see 
> > com.izforge.izpack.installer.GUIListener#guiActionPerformed(int,
> > java.lang.Object)
> >      */
> >     public void guiActionPerformed(int what, Object param)
> >     {
> >         if (what == GUI_BUILDED)
> >         {
> >             JPanel navPanel = (JPanel) param;
> >             helpButton = 
> > 
> ButtonFactory.createButton(parent.langpack.getString("installe
> r.help"),
> >                     parent.icons.getImageIcon("help"),
> > idata.buttonsHColor);
> >             navPanel.add(helpButton, 0);
> >             helpButton.addActionListener(this);
> >         }
> > 
> >     }
> > 
> >     /*
> >      * (non-Javadoc)
> >      * 
> >      * @see 
> > 
> java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEve
> > nt
> > )
> >      */
> >     public void actionPerformed(ActionEvent e)
> >     {
> >         // Your help implementation.
> >     }
> > }
> > 
> >> -----Original Message-----
> >> From: izpack-users-bounces at lists.berlios.de
> >> [mailto:izpack-users-bounces at lists.berlios.de] On Behalf Of 
> >> Mandeep Saini
> >> Sent: Thursday, June 14, 2007 7:02 PM
> >> To: izpack-users at lists.berlios.de
> >> Subject: [izpack-users] Help text for the userInputPanel Fields
> >>
> >>
> >> Hi all,
> >>
> >> Is there any way to give help text for user Input Panel
> >> fields, may be 
> >> by using a button or by tool tip on mouse over? Or I have 
> to write my 
> >> own code to do this?
> >>
> >> If right now this functionality is not available then are there any
> >> plans for such feature in the future?
> >>
> >> Regards
> >> Mandeep
> >>
> >> --
> >> 
> ______________________________________________________________________
> >>
> >> Mandeep Saini	
> >> System Engineer
> >>
> >> DANTE - www.dante.net
> >>
> >> Tel: +44 (0) 1223 371 300 (Ext. 349)
> >> Fax: +44 (0) 1223 371 371
> >>
> >> City House, 126-130 Hills Road
> >> Cambridge CB2 1PQ
> >> UK
> >> 
> _____________________________________________________________________
> >>
> >> _______________________________________________
> >> izpack-users mailing list
> >> izpack-users at lists.berlios.de
> >> https://lists.berlios.de/mailman/listinfo/izpack-users
> >>
> > _______________________________________________
> > izpack-users mailing list
> > izpack-users at lists.berlios.de 
> > https://lists.berlios.de/mailman/listinfo/izpack-users
> 
> 
> -- 
> ______________________________________________________________________
> 
> Mandeep Saini	
> System Engineer
> 
> DANTE - www.dante.net
> 
> Tel: +44 (0) 1223 371 300 (Ext. 349)
> Fax: +44 (0) 1223 371 371
> 
> City House, 126-130 Hills Road
> Cambridge CB2 1PQ
> UK 
> _____________________________________________________________________
> 
> _______________________________________________
> izpack-users mailing list
> izpack-users at lists.berlios.de 
> https://lists.berlios.de/mailman/listinfo/izpack-users
> 



More information about the izpack-users mailing list