Statistics
| Revision:

root / import / ext3D / trunk / install-extension3d / IzPack / src / lib / com / izforge / izpack / installer / PanelAutomationHelper.java @ 15280

History | View | Annotate | Download (2.61 KB)

1
/*
2
 *  $Id: PanelAutomationHelper.java,v 1.1 2006/06/14 07:29:07 cesar Exp $
3
 *  IzPack
4
 *  Copyright (C) 2003 Tino Schwarze, Julien Ponge
5
 *
6
 *  File :               PanelAutomationHelper.java
7
 *  Description :        Provides generic UI handler functions for automated panels.
8
 *  Author's email :     tino.schwarze@informati.tu-chemnitz.de
9
 *  Author's Website :   http://www.tisc.de
10
 *
11
 *  This program is free software; you can redistribute it and/or
12
 *  modify it under the terms of the GNU General Public License
13
 *  as published by the Free Software Foundation; either version 2
14
 *  of the License, or any later version.
15
 *
16
 *  This program is distributed in the hope that it will be useful,
17
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 *  GNU General Public License for more details.
20
 *
21
 *  You should have received a copy of the GNU General Public License
22
 *  along with this program; if not, write to the Free Software
23
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
24
 */
25

    
26
package com.izforge.izpack.installer;
27

    
28
import com.izforge.izpack.util.AbstractUIHandler;
29

    
30
/**
31
 * Abstract class implementing basic functions needed by all panel automation helpers.
32
 * 
33
 * @author tisc
34
 */
35
abstract public class PanelAutomationHelper implements AbstractUIHandler
36
{
37

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

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

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

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

    
73
  /* 
74
   * @see com.izforge.izpack.util.AbstractUIHandler#askQuestion(java.lang.String, java.lang.String, int, int)
75
   */
76
  public int askQuestion(String title, String question, int choices, int default_choice)
77
  {
78
    return default_choice;
79
  }
80

    
81
}