[izpack-users] Help text for the userInputPanel Fields
Mandeep Saini
Mandeep.Saini at dante.org.uk
Fri Jun 15 15:56:02 CEST 2007
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("installer.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.ActionEvent
> )
> */
> 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
_____________________________________________________________________
More information about the izpack-users
mailing list