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.action;
24:
25: import java.awt.Frame;
26: import java.awt.Window;
27: import java.awt.event.ActionEvent;
28: import javax.swing.AbstractAction;
29: import javax.swing.SwingUtilities;
30: import org.skunk.dav.client.DAVFile;
31: import org.skunk.dav.client.gui.Explorer;
32: import org.skunk.dav.client.gui.PropertiesDialog;
33: import org.skunk.dav.client.gui.ResourceManager;
34: import org.skunk.trace.Debug;
35:
36: /**
37: * PropertiesAction.java
38: *
39: *
40: * Created: Tue Oct 24 11:37:00 2000
41: *
42: * @author Jacob Smullyan
43: * @version $Version$
44: */
45:
46: public class PropertiesAction extends AbstractAction {
47: private DAVFile file;
48: private Explorer ex;
49:
50: public PropertiesAction(Explorer ex, DAVFile file) {
51: this .ex = ex;
52: this .file = file;
53: }
54:
55: public PropertiesAction(Explorer ex) {
56: this (ex, null);
57: }
58:
59: public void actionPerformed(ActionEvent e) {
60: DAVFile localFile = (file != null) ? file : ex.getCurrentFile();
61: if (localFile == null) {
62: Debug.trace(this , Debug.DP3,
63: "no file specified for PropertiesAction");
64: return;
65: }
66: Window w = SwingUtilities.windowForComponent(ex);
67: PropertiesDialog dialog = new PropertiesDialog(
68: (w instanceof Frame) ? (Frame) w : null, ex, localFile);
69: dialog.setLocationRelativeTo(ex);
70: dialog.show();
71: }
72: }
73:
74: /* $Log: PropertiesAction.java,v $
75: /* Revision 1.7 2001/01/05 08:01:12 smulloni
76: /* changes to the connection gui for the Explorer; added depth configurability to
77: /* propfind in the jpython test script; added an experimental "allprop" system
78: /* property which affects the propfind query type
79: /*
80: /* Revision 1.6 2000/12/19 22:36:05 smulloni
81: /* adjustments to preamble.
82: /*
83: /* Revision 1.5 2000/12/03 23:53:26 smulloni
84: /* added license and copyright preamble to java files.
85: /*
86: /* Revision 1.4 2000/11/13 23:28:31 smullyan
87: /* first pass at a gui for proppatch, added to the propertiese dialog. Highly
88: /* problematic still, needs substantial work.
89: /*
90: /* Revision 1.3 2000/11/09 23:35:04 smullyan
91: /* log added to every Java file, with the help of python. Lock stealing
92: /* implemented, and treatment of locks made more robust.
93: /* */
|