src/share/classes/javax/swing/plaf/basic/BasicFileChooserUI.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1998, 2013, 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
--- 1,7 ----
/*
! * 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,759 ****
--- 750,760 ----
/**
* 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,811 ****
--- 793,814 ----
}
/**
* 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,824 ****
--- 818,828 ----
}
/**
* 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,1141 ****
--- 1127,1147 ----
}
/**
* 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,1293 ****
--- 1290,1300 ----
/**
* 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.
*