KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sourceforge > tracelog > config > LogBean


1 package net.sourceforge.tracelog.config;
2
3 import java.io.Serializable JavaDoc;
4
5 import net.sourceforge.tracelog.utils.Util;
6
7 /**
8  * LogFile is a value object that contains information about the log, such as
9  * log name, log file path and the color of log text (when displayed).
10  *
11  * @author Choon-Chern Lim (Mike)
12  */

13 public class LogBean implements Serializable JavaDoc {
14     private static final long serialVersionUID = 7935235546339138095L;
15     private int logOrder;
16     private int foregroundColor;
17     private int backgroundColor;
18     private String JavaDoc logName;
19     private String JavaDoc logFilePath;
20     private String JavaDoc id;
21
22     /**
23      * Sets up log name and log path.
24      *
25      * @param logName
26      * Log name.
27      * @param logFilePath
28      * Log path.
29      */

30     LogBean(int logOrder, String JavaDoc logName, String JavaDoc logPath, int foregroundColor, int backgroundColor) {
31         this.logOrder = logOrder;
32         this.logName = logName;
33         this.logFilePath = logPath;
34         this.foregroundColor = foregroundColor;
35         this.backgroundColor = backgroundColor;
36         this.id = Util.getUniqueId();
37     }
38
39     /**
40      * Returns font color.
41      *
42      * @return Font color.
43      */

44     public int getForegroundColor() {
45         return foregroundColor;
46     }
47
48     /**
49      * Returns log name.
50      *
51      * @return Log name.
52      */

53     public String JavaDoc getLogName() {
54         return logName;
55     }
56
57     /**
58      * Returns log path.
59      *
60      * @return Log path.
61      */

62     public String JavaDoc getLogFilePath() {
63         return logFilePath;
64     }
65
66     /**
67      * Sets font color.
68      *
69      * @param foregroundColor
70      * Font color.
71      */

72     public void setForegroundColor(int foregroundColor) {
73         this.foregroundColor = foregroundColor;
74     }
75
76     /**
77      * Sets log name.
78      *
79      * @param logName
80      * Log name.
81      */

82     public void setLogName(String JavaDoc logName) {
83         this.logName = logName;
84     }
85
86     /**
87      * Sets log path.
88      *
89      * @param logFilePath
90      * Log path.
91      */

92     public void setLogFilePath(String JavaDoc logPath) {
93         this.logFilePath = logPath;
94     }
95
96     /**
97      * @return the logOrder
98      */

99     public int getLogOrder() {
100         return logOrder;
101     }
102
103     /**
104      * @param logOrder
105      * the logOrder to set
106      */

107     public void setLogOrder(int logOrder) {
108         this.logOrder = logOrder;
109     }
110
111     /**
112      * @return the backgroundColor
113      */

114     public int getBackgroundColor() {
115         return backgroundColor;
116     }
117
118     /**
119      * @param backgroundColor
120      * the backgroundColor to set
121      */

122     public void setBackgroundColor(int backgroundColor) {
123         this.backgroundColor = backgroundColor;
124     }
125
126     /**
127      * @return the id
128      */

129     public String JavaDoc getId() {
130         return id;
131     }
132
133     /**
134      * @param id
135      * the id to set
136      */

137     public void setId(String JavaDoc id) {
138         this.id = id.trim();
139     }
140
141 }
142
Popular Tags