KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > izforge > izpack > installer > PanelAutomationHelper


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 2003 Tino Schwarze
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */

21
22 package com.izforge.izpack.installer;
23
24 import com.izforge.izpack.util.AbstractUIHandler;
25
26 /**
27  * Abstract class implementing basic functions needed by all panel automation helpers.
28  *
29  * @author tisc
30  */

31 abstract public class PanelAutomationHelper implements AbstractUIHandler
32 {
33
34     /*
35      * @see com.izforge.izpack.util.AbstractUIHandler#emitNotification(java.lang.String)
36      */

37     public void emitNotification(String JavaDoc message)
38     {
39         System.out.println(message);
40     }
41
42     /*
43      * @see com.izforge.izpack.util.AbstractUIHandler#emitWarning(java.lang.String,
44      * java.lang.String)
45      */

46     public boolean emitWarning(String JavaDoc title, String JavaDoc message)
47     {
48         System.err.println("[ WARNING: " + message + " ]");
49         // default: continue
50
return true;
51     }
52
53     /*
54      * @see com.izforge.izpack.util.AbstractUIHandler#emitError(java.lang.String, java.lang.String)
55      */

56     public void emitError(String JavaDoc title, String JavaDoc message)
57     {
58         System.err.println("[ ERROR: " + message + " ]");
59     }
60
61     /*
62      * @see com.izforge.izpack.util.AbstractUIHandler#askQuestion(java.lang.String,
63      * java.lang.String, int)
64      */

65     public int askQuestion(String JavaDoc title, String JavaDoc question, int choices)
66     {
67         // don't know what to answer
68
return AbstractUIHandler.ANSWER_CANCEL;
69     }
70
71     /*
72      * @see com.izforge.izpack.util.AbstractUIHandler#askQuestion(java.lang.String,
73      * java.lang.String, int, int)
74      */

75     public int askQuestion(String JavaDoc title, String JavaDoc question, int choices, int default_choice)
76     {
77         return default_choice;
78     }
79
80 }
81
Popular Tags