01: /*
02: * Copyright (c) 2000, Jacob Smullyan.
03: *
04: * This is part of SkunkDAV, a WebDAV client. See http://skunkdav.sourceforge.net/
05: * for the latest version.
06: *
07: * SkunkDAV is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License as published
09: * by the Free Software Foundation; either version 2, or (at your option)
10: * any later version.
11: *
12: * SkunkDAV is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with SkunkDAV; see the file COPYING. If not, write to the Free
19: * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20: * 02111-1307, USA.
21: */
22:
23: package org.skunk.dav.client.gui;
24:
25: import javax.swing.Icon;
26: import javax.swing.JTable;
27: import org.skunk.swing.IconCellRenderer;
28: import org.skunk.dav.client.Lock;
29:
30: public class LockRenderer extends IconCellRenderer {
31: private Icon lockIcon;
32:
33: public LockRenderer() {
34: super ();
35: lockIcon = ResourceManager.getImageIcon(
36: ResourceManager.LOCK_ICON, null);
37: }
38:
39: public Icon getIcon(JTable table, Object value, boolean isSelected,
40: boolean hasFocus, int row, int column) {
41: return (value != null && value instanceof Lock) ? lockIcon
42: : null;
43: }
44: }
45: /* $Log: LockRenderer.java,v $
46: /* Revision 1.9 2000/12/19 22:36:05 smulloni
47: /* adjustments to preamble.
48: /*
49: /* Revision 1.8 2000/12/03 23:53:26 smulloni
50: /* added license and copyright preamble to java files.
51: /*
52: /* Revision 1.7 2000/11/14 23:16:45 smullyan
53: /* modified to accomodate change in interface: ImageIcon changed to Icon.
54: /*
55: /* Revision 1.6 2000/11/10 22:40:07 smullyan
56: /* added icon to table for resource type; fixes to copy and move; disabling of
57: /* menu items that are inappropriate.
58: /*
59: /* Revision 1.5 2000/11/09 23:34:58 smullyan
60: /* log added to every Java file, with the help of python. Lock stealing
61: /* implemented, and treatment of locks made more robust.
62: /* */
|