KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > jayasoft > ivy > util > DefaultMessageImpl


1 /*
2  * This file is subject to the licence found in LICENCE.TXT in the root directory of the project.
3  * Copyright Jayasoft 2005 - All rights reserved
4  *
5  * #SNAPSHOT#
6  */

7 package fr.jayasoft.ivy.util;
8
9 public class DefaultMessageImpl implements MessageImpl {
10     private int _level = Message.MSG_INFO;
11
12     /**
13      * @param level
14      */

15     public DefaultMessageImpl(int level) {
16         _level = level;
17     }
18
19     public void log(String JavaDoc msg, int level) {
20         if (level <= _level) {
21             System.out.println(msg);
22         }
23     }
24     
25     public void rawlog(String JavaDoc msg, int level) {
26         log(msg, level);
27     }
28
29     public void progress() {
30         System.out.print(".");
31     }
32
33     public void endProgress(String JavaDoc msg) {
34         System.out.println(msg);
35     }
36
37     public int getLevel() {
38         return _level;
39     }
40 }
41
Popular Tags