当前位置: 首页>>代码示例>>Java>>正文


Java FileDialogPeer.setDirectory方法代码示例

本文整理汇总了Java中java.awt.peer.FileDialogPeer.setDirectory方法的典型用法代码示例。如果您正苦于以下问题:Java FileDialogPeer.setDirectory方法的具体用法?Java FileDialogPeer.setDirectory怎么用?Java FileDialogPeer.setDirectory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.awt.peer.FileDialogPeer的用法示例。


在下文中一共展示了FileDialogPeer.setDirectory方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setDirectory

import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
  * Sets the directory for this file dialog.
  *
  * @param dir The new directory for this file dialog.
  */
public synchronized void
setDirectory(String dir)
{
  this.dir = dir;
  if (peer != null)
    {
      FileDialogPeer f = (FileDialogPeer) peer;
      f.setDirectory (dir);
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:16,代码来源:FileDialog.java

示例2: setDirectory

import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
 * Sets the directory of this file dialog window to be the
 * specified directory. Specifying a <code>null</code> or an
 * invalid directory implies an implementation-defined default.
 * This default will not be realized, however, until the user
 * has selected a file. Until this point, <code>getDirectory()</code>
 * will return the value passed into this method.
 * <p>
 * Specifying "" as the directory is exactly equivalent to
 * specifying <code>null</code> as the directory.
 *
 * @param     dir   the specified directory
 * @see       java.awt.FileDialog#getDirectory
 */
public void setDirectory(String dir) {
    this.dir = (dir != null && dir.equals("")) ? null : dir;
    FileDialogPeer peer = (FileDialogPeer)this.peer;
    if (peer != null) {
        peer.setDirectory(this.dir);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:FileDialog.java

示例3: setDirectory

import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
 * Sets the directory of this file dialog window to be the
 * specified directory. Specifying a {@code null} or an
 * invalid directory implies an implementation-defined default.
 * This default will not be realized, however, until the user
 * has selected a file. Until this point, {@code getDirectory()}
 * will return the value passed into this method.
 * <p>
 * Specifying "" as the directory is exactly equivalent to
 * specifying {@code null} as the directory.
 *
 * @param     dir   the specified directory
 * @see       java.awt.FileDialog#getDirectory
 */
public void setDirectory(String dir) {
    this.dir = (dir != null && dir.equals("")) ? null : dir;
    FileDialogPeer peer = (FileDialogPeer)this.peer;
    if (peer != null) {
        peer.setDirectory(this.dir);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:22,代码来源:FileDialog.java

示例4: setDirectory

import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
    * Sets the directory of this file dialog window to be the
    * specified directory. Specifying a <code>null</code> or an
    * invalid directory implies an implementation-defined default.
    * This default will not be realized, however, until the user
    * has selected a file. Until this point, <code>getDirectory()</code>
    * will return the value passed into this method.
    * <p>
    * Specifying "" as the directory is exactly equivalent to
    * specifying <code>null</code> as the directory.
    *
    * @param     dir   the specified directory
    * @see       java.awt.FileDialog#getDirectory
    */
   public void setDirectory(String dir) {
       this.dir = (dir != null && dir.equals("")) ? null : dir;
FileDialogPeer peer = (FileDialogPeer)this.peer;
if (peer != null) {
    peer.setDirectory(this.dir);
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:22,代码来源:FileDialog.java


注:本文中的java.awt.peer.FileDialogPeer.setDirectory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。