src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -750,10 +750,11 @@
/**
* Creates a new folder.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class NewFolderAction extends AbstractAction {
protected NewFolderAction() {
super(FilePane.ACTION_NEW_FOLDER);
}
public void actionPerformed(ActionEvent e) {
@@ -792,20 +793,22 @@
}
/**
* Acts on the "home" key event or equivalent event.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class GoHomeAction extends AbstractAction {
protected GoHomeAction() {
super("Go Home");
}
public void actionPerformed(ActionEvent e) {
JFileChooser fc = getFileChooser();
changeDirectory(fc.getFileSystemView().getHomeDirectory());
}
}
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class ChangeToParentDirectoryAction extends AbstractAction {
protected ChangeToParentDirectoryAction() {
super("Go Up");
putValue(Action.ACTION_COMMAND_KEY, FilePane.ACTION_CHANGE_TO_PARENT_DIRECTORY);
}
@@ -815,10 +818,11 @@
}
/**
* Responds to an Open or Save request
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class ApproveSelectionAction extends AbstractAction {
protected ApproveSelectionAction() {
super(FilePane.ACTION_APPROVE_SELECTION);
}
public void actionPerformed(ActionEvent e) {
@@ -1123,19 +1127,21 @@
}
/**
* Responds to a cancel request.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class CancelSelectionAction extends AbstractAction {
public void actionPerformed(ActionEvent e) {
getFileChooser().cancelSelection();
}
}
/**
* Rescans the files in the current directory
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
protected class UpdateAction extends AbstractAction {
public void actionPerformed(ActionEvent e) {
JFileChooser fc = getFileChooser();
fc.setCurrentDirectory(fc.getFileSystemView().createFileObject(getDirectoryName()));
fc.rescanCurrentDirectory();
@@ -1284,10 +1290,11 @@
/**
* Data transfer support for the file chooser. Since files are currently presented
* as a list, the list support is reused with the added flavor of DataFlavor.javaFileListFlavor
*/
+ @SuppressWarnings("serial") // JDK-implementation class
static class FileTransferHandler extends TransferHandler implements UIResource {
/**
* Create a Transferable to use as the source for a data transfer.
*