Skip to content

Commit

Permalink
Added:
Browse files Browse the repository at this point in the history
- preview window (enabled/disabled by showpreview property)

- thumbnails in the list (enabled disabled by showthumbnails property)

- asynchronous loading of preview and thumbnails

- saving of most preferences (window positions/sizes)

- selectable thumbnails size (thumbnailwidth, thumbnailheight
properties)

- reorderable list (buttons and left-right arrows)

- deletable list (button and delete/backspace)

- options menu (contributed by Dolan Halbrook)

- disabling Drag&Drop while uploading; reorganized top frame (Dolan Halbrook)
  • Loading branch information
Pierre-Luc Paour committed Jul 30, 2002
1 parent 7403fee commit 6ff3a94
Show file tree
Hide file tree
Showing 4 changed files with 1,358 additions and 625 deletions.
2 changes: 1 addition & 1 deletion com/gallery/GalleryRemote/AboutBox.java
Expand Up @@ -67,7 +67,7 @@ public void initComponents() throws Exception {
jLabel2.setText("Version:");
jLabel2.setHorizontalAlignment(javax.swing.JLabel.RIGHT);

jLabelVersion.setSize(new java.awt.Dimension(130, 20));
jLabelVersion.setSize(new java.awt.Dimension(200, 20));
jLabelVersion.setLocation(new java.awt.Point(120, 80));
jLabelVersion.setVisible(true);
jLabelVersion.setVerticalAlignment(javax.swing.JLabel.TOP);
Expand Down
31 changes: 14 additions & 17 deletions com/gallery/GalleryRemote/AddFileDialog.java
Expand Up @@ -26,36 +26,33 @@
import javax.swing.JFileChooser;
import java.io.File;

public class AddFileDialog {


static File[] addFiles(Component parent) {
public class AddFileDialog
{
public static File currentDirectory = null;

static File[] addFiles(Component parent)
{
JFileChooser fc = new JFileChooser();

fc.addChoosableFileFilter(new GalleryFileFilter());
fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
fc.setMultiSelectionEnabled(true);

if (currentDirectory != null)
{
fc.setCurrentDirectory(currentDirectory);
}

int retval = fc.showDialog(parent, "Add");
if (retval != JFileChooser.CANCEL_OPTION) {

File[] files = fc.getSelectedFiles();
if (retval != JFileChooser.CANCEL_OPTION)
{
currentDirectory = fc.getCurrentDirectory();

//Iterator iter = Arrays.asList(files).iterator();
//while (iter.hasNext()) {
// File file = (File) iter.next();
// System.out.println(file.getAbsolutePath());
//}
File[] files = fc.getSelectedFiles();

return files;

}


return null;
}



}

0 comments on commit 6ff3a94

Please sign in to comment.