Revision 2165 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.swing/org.gvsig.tools.swing.impl/src/main/java/org/gvsig/tools/swing/impl/pickercontroller/BytearrayPickerControllerImpl.java
BytearrayPickerControllerImpl.java | ||
---|---|---|
1 | 1 |
package org.gvsig.tools.swing.impl.pickercontroller; |
2 | 2 |
|
3 | 3 |
import java.awt.event.ActionEvent; |
4 |
import java.awt.event.ActionListener; |
|
5 | 4 |
import java.io.File; |
6 | 5 |
import java.net.URL; |
7 | 6 |
import javax.swing.ImageIcon; |
8 | 7 |
import javax.swing.JButton; |
9 | 8 |
import javax.swing.JFileChooser; |
10 |
import javax.swing.JTextField;
|
|
9 |
import javax.swing.text.JTextComponent;
|
|
11 | 10 |
import org.apache.commons.io.FileUtils; |
12 | 11 |
import org.apache.commons.lang3.ArrayUtils; |
13 | 12 |
import org.gvsig.tools.ToolsLocator; |
... | ... | |
28 | 27 |
extends AbstractPickerController<byte[]> |
29 | 28 |
{ |
30 | 29 |
|
31 |
private final JTextField jtext;
|
|
30 |
private final JTextComponent jtext;
|
|
32 | 31 |
private final JButton btnUpload; |
33 | 32 |
private final JButton btnDownload; |
34 | 33 |
|
... | ... | |
37 | 36 |
private final File initialPath; |
38 | 37 |
|
39 | 38 |
public BytearrayPickerControllerImpl( |
40 |
JTextField jtext,
|
|
39 |
JTextComponent jtext,
|
|
41 | 40 |
JButton btnUpload, |
42 | 41 |
JButton btnDownload, |
43 | 42 |
String fileChooserID, |
... | ... | |
51 | 50 |
|
52 | 51 |
this.btnDownload.setText(""); |
53 | 52 |
this.btnDownload.setIcon(this.getIcon("picker-bytearray-download")); |
54 |
this.btnDownload.addActionListener(new ActionListener() { |
|
55 |
@Override |
|
56 |
public void actionPerformed(ActionEvent e) { |
|
57 |
doDownload(); |
|
58 |
} |
|
53 |
this.btnDownload.addActionListener((ActionEvent e) -> { |
|
54 |
doDownload(); |
|
59 | 55 |
}); |
60 | 56 |
this.btnUpload.setText(""); |
61 | 57 |
this.btnUpload.setIcon(this.getIcon("picker-bytearray-upload")); |
62 |
this.btnUpload.addActionListener(new ActionListener() { |
|
63 |
@Override |
|
64 |
public void actionPerformed(ActionEvent e) { |
|
65 |
doUpload(); |
|
66 |
} |
|
58 |
this.btnUpload.addActionListener((ActionEvent e) -> { |
|
59 |
doUpload(); |
|
67 | 60 |
}); |
68 | 61 |
|
69 | 62 |
this.jtext.setEditable(false); |
Also available in: Unified diff