1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.log4j.chainsaw.plugins;
19
20 import org.apache.log4j.plugins.Plugin;
21 import org.apache.log4j.spi.LoggerRepository;
22
23 import java.awt.LayoutManager;
24
25 import javax.swing.JPanel;
26
27
28 /***
29 */
30 public abstract class GUIPluginSkeleton extends JPanel implements Plugin {
31 private LoggerRepository loggerRepository;
32 private boolean active;
33
34 /***
35 *
36 */
37 public GUIPluginSkeleton() {
38 super();
39 }
40
41 /***
42 * @param isDoubleBuffered
43 */
44 public GUIPluginSkeleton(boolean isDoubleBuffered) {
45 super(isDoubleBuffered);
46 }
47
48 /***
49 * @param layout
50 */
51 public GUIPluginSkeleton(LayoutManager layout) {
52 super(layout);
53 }
54
55 /***
56 * @param layout
57 * @param isDoubleBuffered
58 */
59 public GUIPluginSkeleton(LayoutManager layout, boolean isDoubleBuffered) {
60 super(layout, isDoubleBuffered);
61 }
62
63
64
65
66 public LoggerRepository getLoggerRepository() {
67 return this.loggerRepository;
68 }
69
70
71
72
73 public void setLoggerRepository(LoggerRepository repository) {
74 this.loggerRepository = repository;
75 }
76
77
78
79
80 public boolean isActive() {
81 return active;
82 }
83
84
85
86
87 public boolean isEquivalent(Plugin testPlugin) {
88
89 return false;
90 }
91
92 /***
93 * @param active The active to set.
94 */
95 public final void setActive(boolean active) {
96 boolean oldValue = this.active;
97 this.active = active;
98 firePropertyChange("active", oldValue, this.active);
99 }
100 }