KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > event > LateShortcutInstallListener


1 /*
2  * IzPack - Copyright 2001-2007 Julien Ponge, All Rights Reserved.
3  *
4  * http://www.izforge.com/izpack/
5  * http://developer.berlios.de/projects/izpack/
6  *
7  * Copyright 2007 Markus Schlegel
8  * Copyright 2007 Julien Ponge
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  */

22
23 package com.izforge.izpack.event;
24
25 import com.izforge.izpack.installer.*;
26 import com.izforge.izpack.panels.ShortcutPanel;
27 import com.izforge.izpack.util.AbstractUIProgressHandler;
28
29 /**
30  * Creates the Shortcuts after files have been installed.
31  * Use this listener, if you place the ShortcutPanel before the Installation of the files.
32  *
33  * @author Marcus Schlegel, Pulinco
34  */

35 public class LateShortcutInstallListener extends SimpleInstallerListener {
36
37   public LateShortcutInstallListener()
38   {
39       ShortcutPanel.getInstance().createImmediately = false;
40   }
41   
42   public void afterPacks(AutomatedInstallData idata, AbstractUIProgressHandler handler)
43   throws Exception JavaDoc
44   {
45       //now it's time to write down the shortcuts...
46
ShortcutPanel.getInstance().createAndRegisterShortcuts();
47   }
48 }
49
Popular Tags