author | ohair |
Wed, 06 Apr 2011 22:06:11 -0700 | |
changeset 9035 | 1255eb81cc2f |
parent 8513 | 101b3095ff5a |
child 9766 | bf57566e576d |
permissions | -rw-r--r-- |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
1 |
/* |
9035
1255eb81cc2f
7033660: Update copyright year to 2011 on any files changed in 2011
ohair
parents:
8513
diff
changeset
|
2 |
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
4 |
* |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
10 |
* |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
15 |
* accompanied this code). |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
16 |
* |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
20 |
* |
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
24 |
*/ |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
25 |
package sun.awt.X11; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
26 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
27 |
import java.awt.Dialog; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
28 |
import java.awt.FileDialog; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
29 |
import java.awt.peer.FileDialogPeer; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
30 |
import java.io.File; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
31 |
import java.io.FilenameFilter; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
32 |
import javax.swing.SwingUtilities; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
33 |
import javax.swing.SwingWorker; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
34 |
import sun.awt.AWTAccessor; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
35 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
36 |
/** |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
37 |
* FileDialogPeer for the GtkFileChooser. |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
38 |
* |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
39 |
* @author Costantino Cerbo (c.cerbo@gmail.com) |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
40 |
*/ |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
41 |
class GtkFileDialogPeer extends XDialogPeer implements FileDialogPeer { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
42 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
43 |
private FileDialog fd; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
44 |
|
7150
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
45 |
// A pointer to the native GTK FileChooser widget |
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
46 |
private volatile long widget = 0L; |
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
47 |
|
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
48 |
public GtkFileDialogPeer(FileDialog fd) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
49 |
super((Dialog) fd); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
50 |
this.fd = fd; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
51 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
52 |
|
7150
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
53 |
private static native void initIDs(); |
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
54 |
static { |
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
55 |
initIDs(); |
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
56 |
} |
6c95b4f80a72
6960655: GTKFileDialogPeer shouldn't be a singletone
anthony
parents:
6644
diff
changeset
|
57 |
|
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
58 |
private native void run(String title, int mode, String dir, String file, |
8513
101b3095ff5a
7009114: GTK FileDialog lies about it's Bounds
dcherepanov
parents:
7243
diff
changeset
|
59 |
FilenameFilter filter, boolean isMultipleMode, int x, int y); |
7243 | 60 |
private native void quit(); |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
61 |
|
7243 | 62 |
@Override |
63 |
public native void toFront(); |
|
64 |
||
8513
101b3095ff5a
7009114: GTK FileDialog lies about it's Bounds
dcherepanov
parents:
7243
diff
changeset
|
65 |
@Override |
101b3095ff5a
7009114: GTK FileDialog lies about it's Bounds
dcherepanov
parents:
7243
diff
changeset
|
66 |
public native void setBounds(int x, int y, int width, int height, int op); |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
67 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
68 |
/** |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
69 |
* Called exclusively by the native C code. |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
70 |
*/ |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
71 |
private void setFileInternal(String directory, String[] filenames) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
72 |
AWTAccessor.FileDialogAccessor accessor = AWTAccessor |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
73 |
.getFileDialogAccessor(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
74 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
75 |
if (filenames == null) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
76 |
accessor.setDirectory(fd, null); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
77 |
accessor.setFile(fd, null); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
78 |
accessor.setFiles(fd, null, null); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
79 |
} else { |
6644
ee35bd1e91f9
6987233: FileDialog.getDirectory() should add a trainling slash when GTK FileDialog is used
anthony
parents:
5506
diff
changeset
|
80 |
// Fix 6987233: add the trailing slash if it's absent |
ee35bd1e91f9
6987233: FileDialog.getDirectory() should add a trainling slash when GTK FileDialog is used
anthony
parents:
5506
diff
changeset
|
81 |
accessor.setDirectory(fd, directory + |
ee35bd1e91f9
6987233: FileDialog.getDirectory() should add a trainling slash when GTK FileDialog is used
anthony
parents:
5506
diff
changeset
|
82 |
(directory.endsWith(File.separator) ? |
ee35bd1e91f9
6987233: FileDialog.getDirectory() should add a trainling slash when GTK FileDialog is used
anthony
parents:
5506
diff
changeset
|
83 |
"" : File.separator)); |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
84 |
accessor.setFile(fd, filenames[0]); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
85 |
accessor.setFiles(fd, directory, filenames); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
86 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
87 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
88 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
89 |
/** |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
90 |
* Called exclusively by the native C code. |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
91 |
*/ |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
92 |
private boolean filenameFilterCallback(String fullname) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
93 |
if (fd.getFilenameFilter() == null) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
94 |
// no filter, accept all. |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
95 |
return true; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
96 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
97 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
98 |
File filen = new File(fullname); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
99 |
return fd.getFilenameFilter().accept(new File(filen.getParent()), |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
100 |
filen.getName()); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
101 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
102 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
103 |
@Override |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
104 |
public void setVisible(boolean b) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
105 |
XToolkit.awtLock(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
106 |
try { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
107 |
if (b) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
108 |
Thread t = new Thread() { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
109 |
public void run() { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
110 |
GtkFileDialogPeer.this.run(fd.getTitle(), fd.getMode(), |
8513
101b3095ff5a
7009114: GTK FileDialog lies about it's Bounds
dcherepanov
parents:
7243
diff
changeset
|
111 |
fd.getDirectory(), fd.getFile(), fd.getFilenameFilter(), fd.isMultipleMode(), |
101b3095ff5a
7009114: GTK FileDialog lies about it's Bounds
dcherepanov
parents:
7243
diff
changeset
|
112 |
fd.getX(), fd.getY()); |
5444
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
113 |
fd.setVisible(false); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
114 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
115 |
}; |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
116 |
t.start(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
117 |
} else { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
118 |
quit(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
119 |
fd.setVisible(false); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
120 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
121 |
} finally { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
122 |
XToolkit.awtUnlock(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
123 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
124 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
125 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
126 |
@Override |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
127 |
public void dispose() { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
128 |
quit(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
129 |
super.dispose(); |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
130 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
131 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
132 |
@Override |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
133 |
public void setDirectory(String dir) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
134 |
// We do not implement this method because we |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
135 |
// have delegated to FileDialog#setDirectory |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
136 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
137 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
138 |
@Override |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
139 |
public void setFile(String file) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
140 |
// We do not implement this method because we |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
141 |
// have delegated to FileDialog#setFile |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
142 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
143 |
|
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
144 |
@Override |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
145 |
public void setFilenameFilter(FilenameFilter filter) { |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
146 |
// We do not implement this method because we |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
147 |
// have delegated to FileDialog#setFilenameFilter |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
148 |
} |
f7c5aeb82a14
6913179: The java.awt.FileDialog should use native GTK file chooser on linux distros
anthony
parents:
diff
changeset
|
149 |
} |