1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
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 /* (non-Javadoc)
64 * @see org.apache.log4j.plugins.Plugin#getLoggerRepository()
65 */
66 public LoggerRepository getLoggerRepository() {
67 return this.loggerRepository;
68 }
69
70 /* (non-Javadoc)
71 * @see org.apache.log4j.plugins.Plugin#setLoggerRepository(org.apache.log4j.spi.LoggerRepository)
72 */
73 public void setLoggerRepository(LoggerRepository repository) {
74 this.loggerRepository = repository;
75 }
76
77 /* (non-Javadoc)
78 * @see org.apache.log4j.plugins.Plugin#isActive()
79 */
80 public boolean isActive() {
81 return active;
82 }
83
84 /* (non-Javadoc)
85 * @see org.apache.log4j.plugins.Plugin#isEquivalent(org.apache.log4j.plugins.Plugin)
86 */
87 public boolean isEquivalent(Plugin testPlugin) {
88 // TODO Auto-generated method stub
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 }