本文整理匯總了Java中org.fest.swing.annotation.RunsInCurrentThread類的典型用法代碼示例。如果您正苦於以下問題:Java RunsInCurrentThread類的具體用法?Java RunsInCurrentThread怎麽用?Java RunsInCurrentThread使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RunsInCurrentThread類屬於org.fest.swing.annotation包,在下文中一共展示了RunsInCurrentThread類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: validateFileToChoose
import org.fest.swing.annotation.RunsInCurrentThread; //導入依賴的package包/類
@RunsInCurrentThread
private static <FileObject> void validateFileToChoose(VFSJFileChooser<FileObject> fileChooser, FileObject file) {
VFSJFileChooser.SELECTION_MODE mode = fileChooser.getFileSelectionMode();
boolean isFolder = fileChooser.getFileSystemView().isDirectory(file);
if (mode == VFSJFileChooser.SELECTION_MODE.FILES_ONLY && isFolder)
throw cannotSelectFile(file, "the file chooser cannot open directories");
if (mode == VFSJFileChooser.SELECTION_MODE.DIRECTORIES_ONLY && !isFolder)
throw cannotSelectFile(file, "the file chooser can only open directories");
}
示例2: isMatching
import org.fest.swing.annotation.RunsInCurrentThread; //導入依賴的package包/類
/** Returns true if the given tag is the one we seek */
@RunsInCurrentThread
protected abstract boolean isMatching(@NotNull XmlTag tag);
示例3: isRectangleVisible
import org.fest.swing.annotation.RunsInCurrentThread; //導入依賴的package包/類
@RunsInCurrentThread
private static boolean isRectangleVisible(final VNumber vNumber, final Rectangle r)
{
final Rectangle visible = vNumber.getVisibleRect();
return visible.contains(r.x, r.y);
}