下面列出了怎么用javax.swing.filechooser.FileView的API类实例代码及写法,或者点击链接到github查看源代码。
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Maps {@code JFileChooser.getFileView()} through queue
*/
public FileView getFileView() {
return (runMapping(new MapAction<FileView>("getFileView") {
@Override
public FileView map() {
return ((JFileChooser) getSource()).getFileView();
}
}));
}
/**
* Maps {@code JFileChooser.setFileView(FileView)} through queue
*/
public void setFileView(final FileView fileView) {
runMapping(new MapVoidAction("setFileView") {
@Override
public void map() {
((JFileChooser) getSource()).setFileView(fileView);
}
});
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
/**
* Invokes the <code>getFileView</code> method on each UI handled by this object.
*
* @return the value obtained from the first UI, which is
* the UI obtained from the default <code>LookAndFeel</code>
*/
public FileView getFileView(JFileChooser a) {
FileView returnValue =
((FileChooserUI) (uis.elementAt(0))).getFileView(a);
for (int i = 1; i < uis.size(); i++) {
((FileChooserUI) (uis.elementAt(i))).getFileView(a);
}
return returnValue;
}
@Override
public void updateUI ( @NotNull final C component )
{
// Removing all files filter
if ( component.isAcceptAllFileFilterUsed () )
{
component.removeChoosableFileFilter ( component.getAcceptAllFileFilter () );
}
// Update file view as file chooser was probably deserialized
if ( component.getFileSystemView () == null )
{
component.setFileSystemView ( FileSystemView.getFileSystemView () );
}
// Updating component UI
super.updateUI ( component );
// Updating UI file view for this file chooser
final FileView fileView = component.getUI ().getFileView ( component );
ReflectUtils.setFieldValueSafely ( component, "uiFileView", fileView );
// Adding all files filter
if ( component.isAcceptAllFileFilterUsed () )
{
component.addChoosableFileFilter ( component.getAcceptAllFileFilter () );
}
}
@Override
public FileView getFileView(final JFileChooser fc) {
return getFileView();
}
@Override
public FileView getFileView( JFileChooser fc ) {
return fileView;
}
@Override
public FileView getFileView(JFileChooser fc) {
return fileView;
}
@Override
public FileView getFileView ( final JFileChooser fc )
{
return fileView;
}
public FileView getFileView(JFileChooser fc) {
return fileView;
}
@Override
public FileView getFileView(JFileChooser fc) {
return this.fileView;
}
@Override
public FileView getFileView ( @NotNull final JFileChooser fc )
{
return fileView;
}
/**
* Returns a file view.
* @param fc the file chooser
* @return a file view
*/
public abstract FileView getFileView(JFileChooser fc);
/**
* Returns a file view.
* @param fc the file chooser
* @return a file view
*/
public abstract FileView getFileView(JFileChooser fc);
/**
* use custom <code>FileView</code>
*
* @see LuckFileView
* @return <code>FileView</code>
*/
public FileView getFileView(JFileChooser fc)
{
return fileView;
}