本文整理汇总了Java中java.awt.peer.FileDialogPeer.setFilenameFilter方法的典型用法代码示例。如果您正苦于以下问题:Java FileDialogPeer.setFilenameFilter方法的具体用法?Java FileDialogPeer.setFilenameFilter怎么用?Java FileDialogPeer.setFilenameFilter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.peer.FileDialogPeer
的用法示例。
在下文中一共展示了FileDialogPeer.setFilenameFilter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setFilenameFilter
import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
* Sets the filename filter used by this dialog.
*
* @param filter The new filename filter for this file dialog box.
*/
public synchronized void
setFilenameFilter(FilenameFilter filter)
{
this.filter = filter;
if (peer != null)
{
FileDialogPeer f = (FileDialogPeer) peer;
f.setFilenameFilter (filter);
}
}
示例2: setFilenameFilter
import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
* Sets the filename filter for this file dialog window to the
* specified filter.
* Filename filters do not function in Sun's reference
* implementation for Microsoft Windows.
*
* @param filter the specified filter
* @see java.io.FilenameFilter
* @see java.awt.FileDialog#getFilenameFilter
*/
public synchronized void setFilenameFilter(FilenameFilter filter) {
this.filter = filter;
FileDialogPeer peer = (FileDialogPeer)this.peer;
if (peer != null) {
peer.setFilenameFilter(filter);
}
}
示例3: setFilenameFilter
import java.awt.peer.FileDialogPeer; //导入方法依赖的package包/类
/**
* Sets the filename filter for this file dialog window to the
* specified filter.
* Filename filters do not function in Sun's reference
* implementation for Microsoft Windows.
*
* @param filter the specified filter
* @see java.io.FilenameFilter
* @see java.awt.FileDialog#getFilenameFilter
*/
public synchronized void setFilenameFilter(FilenameFilter filter) {
this.filter = filter;
FileDialogPeer peer = (FileDialogPeer)this.peer;
if (peer != null) {
peer.setFilenameFilter(filter);
}
}