01: /*
02: * Copyright 2001-2006 C:1 Financial Services GmbH
03: *
04: * This software is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License Version 2.1, as published by the Free Software Foundation.
07: *
08: * This software is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11: * Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public
14: * License along with this library; if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
16: */
17:
18: package de.finix.contelligent.client.gui;
19:
20: import java.awt.Color;
21: import java.util.logging.Logger;
22:
23: import javax.swing.Action;
24: import javax.swing.JLabel;
25:
26: import de.finix.contelligent.client.event.ContelligentEvent;
27: import de.finix.contelligent.client.i18n.Resources;
28:
29: public class NoReadEditor extends AbstractComponentEditor {
30:
31: private static Logger logger = Logger.getLogger(NoReadEditor.class
32: .getName());
33:
34: public NoReadEditor() {
35: super ();
36: }
37:
38: public void init() {
39: JLabel label = new JLabel(Resources
40: .getLocalString("no_read_permission"));
41: label.setForeground(new Color(192, 0, 0));
42: add(label);
43: }
44:
45: public void update() {
46: }
47:
48: protected void updateComponent() {
49: }
50:
51: protected void componentChanged(ContelligentEvent event) {
52: }
53:
54: protected void childComponentAdded(ContelligentEvent event) {
55: }
56:
57: protected void childComponentRemoved(ContelligentEvent event) {
58: }
59:
60: protected void childComponentChanged(ContelligentEvent event) {
61: }
62:
63: protected void descendentComponentChanged(ContelligentEvent event) {
64: }
65:
66: public void setEditable(boolean editable) {
67: super .setEditable(editable);
68: }
69:
70: public void rollback() {
71: setEditable(false);
72: update();
73: }
74:
75: public void commit() {
76: setEditable(false);
77: update();
78: }
79:
80: public Action[] getActions() {
81: return new Action[] {};
82: }
83: }
|