javax.swing.JFileChooser.setFileView()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(175)

本文整理了Java中javax.swing.JFileChooser.setFileView()方法的一些代码示例,展示了JFileChooser.setFileView()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFileChooser.setFileView()方法的具体详情如下:
包路径:javax.swing.JFileChooser
类名称:JFileChooser
方法名:setFileView

JFileChooser.setFileView介绍

暂无

代码示例

代码示例来源:origin: org.netbeans.api/org-openide-filesystems

chooser.setFileView(new CustomFileView(new BadgeIconProvider(badger),
    chooser.getFileSystemView()));

代码示例来源:origin: stackoverflow.com

MyFileView m=new MyFileView(table,new ImageIcon("diricon.png"));
JFileChooser jf=new JFileChooser();
jf.setFileView(m);
jf.showOpenDialog(this);

代码示例来源:origin: de.schlichtherle.truezip/truezip-file

public TFileChooser(@CheckForNull TFile currentDirectory,
          @CheckForNull TFileSystemView fileSystemView) {
  super(  currentDirectory,
      null != fileSystemView ? fileSystemView : new TFileSystemView());
  super.setFileView(new TFileView(super.getFileView()));
  //super.setDoubleBuffered(false);
}

代码示例来源:origin: stackoverflow.com

final JFileChooser  fileDialog = new JFileChooser(directorylock);
fileDialog.setFileView(new FileView() {
   @Override
   public Boolean isTraversable(File f) {

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-api-remote

public static JFileChooser createProjectChooser(ExecutionEnvironment execEnv,
      String titleText, String description, String buttonText, String initialPath) {
    JFileChooser fileChooser;
//        if (execEnv.isLocal()) {
//            fileChooser = ProjectChooser.projectChooser();
//            fileChooser.getAccessibleContext().setAccessibleDescription(description);
//            fileChooser.setDialogTitle(titleText);
//            fileChooser.setApproveButtonText(buttonText);
//            if (initialPath != null) {
//                fileChooser.setCurrentDirectory(new File(initialPath));
//            }
//        } else {
      fileChooser = (JFileChooserEx) createFileChooser(execEnv,
             titleText, buttonText, JFileChooser.DIRECTORIES_ONLY, null, initialPath, true);
      fileChooser.setFileView(new ProjectSelectionFileView(fileChooser));
    //}
    return fileChooser;
    
  }

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-cnd-api-remote-ui

public static JFileChooser createProjectChooser(ExecutionEnvironment execEnv,
      String titleText, String description, String buttonText, String initialPath) {
    JFileChooser fileChooser;
//        if (execEnv.isLocal()) {
//            fileChooser = ProjectChooser.projectChooser();
//            fileChooser.getAccessibleContext().setAccessibleDescription(description);
//            fileChooser.setDialogTitle(titleText);
//            fileChooser.setApproveButtonText(buttonText);
//            if (initialPath != null) {
//                fileChooser.setCurrentDirectory(new File(initialPath));
//            }
//        } else {
      fileChooser = (JFileChooserEx) createFileChooser(execEnv,
             titleText, buttonText, JFileChooser.DIRECTORIES_ONLY, null, initialPath, true);
      fileChooser.setFileView(new ProjectSelectionFileView(fileChooser));
    //}
    return fileChooser;
    
  }

代码示例来源:origin: stackoverflow.com

fc.setFileView(view);

代码示例来源:origin: raydac/netbeans-mmd-plugin

private void menuOpenProjectActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuOpenProjectActionPerformed
 final JFileChooser fileChooser = new JFileChooser();
 fileChooser.setFileView(new FileView() {
  private Icon KNOWLEDGE_FOLDER_ICO = null;
  private Icon OTHER_FOLDER_ICO = null;

代码示例来源:origin: apache/ctakes

_piperChooser.setFileView( new PiperFileView() );
_parmChooser.setFileFilter( new FileNameExtensionFilter( "Pipeline Definition (Piper) Parameter File", CLI_EXTENSION ) );
_parmChooser.setFileView( new PiperFileView() );
String cwdPath = Paths.get( "" ).toAbsolutePath().toFile().getPath();
if ( cwdPath.isEmpty() ) {

代码示例来源:origin: stackoverflow.com

setFileView(new ThumbnailView());

代码示例来源:origin: stackoverflow.com

final JFileChooser  fileDialog = new JFileChooser(directorylock);
fileDialog.setFileView(new FileView() {
   @Override
   public Boolean isTraversable(File f) {

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-j2me-cdc-project

/** Factory method for project chooser
 */
public static JFileChooser createProjectChooser() {
  ProjectManager.getDefault().clearNonProjectCache(); // #41882
  
  JFileChooser chooser = new ProjectFileChooser();
  chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY );
  if ("GTK".equals(javax.swing.UIManager.getLookAndFeel().getID())) { // NOI18N
    // see BugTraq #5027268
    chooser.putClientProperty("GTKFileChooser.showDirectoryIcons", Boolean.TRUE); // NOI18N
    //chooser.putClientProperty("GTKFileChooser.showFileIcons", Boolean.TRUE); // NOI18N
  }
    //#61789 on old macosx (jdk 1.4.1) these two method need to be called in this order.
  chooser.setAcceptAllFileFilterUsed( false );
  chooser.setFileFilter( ProjectDirFilter.INSTANCE );
  File currDir = ProjectChooser.getProjectsFolder();
  FileUtil.preventFileChooserSymlinkTraversal(chooser, currDir);
  chooser.setFileView( new ProjectFileView( chooser.getFileSystemView() ) );
  return chooser;
}

代码示例来源:origin: apache/ctakes

MainPanel2() {
 super( new BorderLayout() );
 final JSplitPane logSplit = new PositionedSplitPane( JSplitPane.VERTICAL_SPLIT );
 logSplit.setTopComponent( createMainPanel() );
 logSplit.setBottomComponent( LoggerPanel.createLoggerPanel() );
 logSplit.setDividerLocation( 0.6d );
 add( createToolBar(), BorderLayout.NORTH );
 add( logSplit, BorderLayout.CENTER );
 SwingUtilities.invokeLater( new ButtonIconLoader() );
 _chooser.setFileFilter( new FileNameExtensionFilter( "Pipeline Definition (Piper) File", "piper" ) );
 _chooser.setFileView( new PiperFileView() );
 createNewPiper();
}

代码示例来源:origin: JChemPaint/jchempaint

chooser.setFileView(new JCPFileView());

代码示例来源:origin: org.netbeans.modules/org-netbeans-modules-javafx2-project

jarFileChooser.setFileView(new JARFileView());
jarFileChooser.setPreferredSize(new Dimension(400, 300));
jarFileChooser.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));

代码示例来源:origin: eu.agrosense.client/import

chooser.setFileView(new FileView() {
  @Override
  public Icon getIcon(File f) {

代码示例来源:origin: nl.cloudfarming.client/import

chooser.setFileView(new FileView() {
  @Override
  public Icon getIcon(File f) {

代码示例来源:origin: JChemPaint/jchempaint

chooser.setFileFilter(chooser.getChoosableFileFilters()[0]);
chooser.setFileView(new JCPFileView());
if(jcpPanel.isAlreadyAFile()!=null)
  chooser.setSelectedFile(jcpPanel.isAlreadyAFile());

代码示例来源:origin: JChemPaint/jchempaint

chooser.setSelectedFile(jcpPanel.getLastOpenedFile());
chooser.setFileView(new JCPFileView());

代码示例来源:origin: Mine-and-blade-admin/Battlegear2

fc.setAcceptAllFileFilterUsed(false);
if(FcLoadImages){
  fc.setFileView(new ImageFileViewer());
  ImagePreviewPanel preview = new ImagePreviewPanel();
  fc.setAccessory(preview);

相关文章

JFileChooser类方法