01: /* *************************************************************************
02:
03: Millstone(TM)
04: Open Sourced User Interface Library for
05: Internet Development with Java
06:
07: Millstone is a registered trademark of IT Mill Ltd
08: Copyright (C) 2000-2005 IT Mill Ltd
09:
10: *************************************************************************
11:
12: This library is free software; you can redistribute it and/or
13: modify it under the terms of the GNU Lesser General Public
14: license version 2.1 as published by the Free Software Foundation.
15:
16: This library 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 GNU
19: Lesser General Public License for more details.
20:
21: You should have received a copy of the GNU Lesser General Public
22: License along with this library; if not, write to the Free Software
23: Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24:
25: *************************************************************************
26:
27: For more information, contact:
28:
29: IT Mill Ltd phone: +358 2 4802 7180
30: Ruukinkatu 2-4 fax: +358 2 4802 7181
31: 20540, Turku email: info@itmill.com
32: Finland company www: www.itmill.com
33:
34: Primary source for MillStone information and releases: www.millstone.org
35:
36: ********************************************************************** */
37:
38: package org.millstone.base.terminal;
39:
40: /** Interface for rendering error messages to terminal. All the visible errors
41: * shown to user must implement this interface.
42: *
43: * @author IT Mill Ltd.
44: * @version 3.1.1
45: * @since 3.0
46: */
47: public interface ErrorMessage extends Paintable {
48:
49: /** Error code for system errors and bugs. */
50: public static final int SYSTEMERROR = 5000;
51:
52: /** Error code for critical error messages. */
53: public static final int CRITICAL = 4000;
54:
55: /** Error code for regular error messages. */
56: public static final int ERROR = 3000;
57:
58: /** Error code for warning messages. */
59: public static final int WARNING = 2000;
60:
61: /** Error code for informational messages. */
62: public static final int INFORMATION = 1000;
63:
64: /** Gets the errors level.
65: *
66: * @return the level of error as an integer.
67: */
68: public int getErrorLevel();
69:
70: /** Error messages are inmodifiable and thus listeners are not needed. This
71: * method should be implemented as empty.
72: *
73: * @see org.millstone.base.terminal.Paintable#addListener(Paintable.RepaintRequestListener)
74: */
75: public void addListener(RepaintRequestListener listener);
76:
77: /** Error messages are inmodifiable and thus listeners are not needed. This
78: * method should be implemented as empty.
79: *
80: * @see org.millstone.base.terminal.Paintable#removeListener(Paintable.RepaintRequestListener)
81: */
82: public void removeListener(RepaintRequestListener listener);
83:
84: /** Error messages are inmodifiable and thus listeners are not needed. This
85: * method should be implemented as empty.
86: *
87: * @see org.millstone.base.terminal.Paintable#requestRepaint()
88: */
89: public void requestRepaint();
90:
91: }
|