01: /**
02: * L2FProd.com Common Components 7.3 License.
03: *
04: * Copyright 2005-2007 L2FProd.com
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package com.l2fprod.common.beans.editor;
18:
19: import java.awt.Component;
20: import java.awt.Graphics;
21: import java.awt.Rectangle;
22: import java.beans.PropertyChangeListener;
23: import java.beans.PropertyChangeSupport;
24: import java.beans.PropertyEditor;
25:
26: /**
27: * AbstractPropertyEditor. <br>
28: *
29: */
30: public class AbstractPropertyEditor implements PropertyEditor {
31:
32: protected Component editor;
33: private PropertyChangeSupport listeners = new PropertyChangeSupport(
34: this );
35:
36: public boolean isPaintable() {
37: return false;
38: }
39:
40: public boolean supportsCustomEditor() {
41: return false;
42: }
43:
44: public Component getCustomEditor() {
45: return editor;
46: }
47:
48: public void addPropertyChangeListener(
49: PropertyChangeListener listener) {
50: listeners.addPropertyChangeListener(listener);
51: }
52:
53: public void removePropertyChangeListener(
54: PropertyChangeListener listener) {
55: listeners.removePropertyChangeListener(listener);
56: }
57:
58: protected void firePropertyChange(Object oldValue, Object newValue) {
59: listeners.firePropertyChange("value", oldValue, newValue);
60: }
61:
62: public Object getValue() {
63: return null;
64: }
65:
66: public void setValue(Object value) {
67: }
68:
69: public String getAsText() {
70: return null;
71: }
72:
73: public String getJavaInitializationString() {
74: return null;
75: }
76:
77: public String[] getTags() {
78: return null;
79: }
80:
81: public void setAsText(String text) throws IllegalArgumentException {
82: }
83:
84: public void paintValue(Graphics gfx, Rectangle box) {
85: }
86:
87: }
|