本文整理匯總了Java中java.beans.Beans.setGuiAvailable方法的典型用法代碼示例。如果您正苦於以下問題:Java Beans.setGuiAvailable方法的具體用法?Java Beans.setGuiAvailable怎麽用?Java Beans.setGuiAvailable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類java.beans.Beans
的用法示例。
在下文中一共展示了Beans.setGuiAvailable方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: test
import java.beans.Beans; //導入方法依賴的package包/類
private static void test(String[] path) {
try {
Beans.setDesignTime(true);
Beans.setGuiAvailable(true);
Introspector.setBeanInfoSearchPath(path);
PropertyEditorManager.setEditorSearchPath(path);
} catch (SecurityException exception) {
throw new Error("unexpected security exception", exception);
}
}
示例2: main
import java.beans.Beans; //導入方法依賴的package包/類
public static void main(String[] args) throws InterruptedException {
if (Beans.isGuiAvailable() == GraphicsEnvironment.isHeadless()) {
throw new Error("unexpected GuiAvailable property");
}
Beans.setGuiAvailable(!Beans.isGuiAvailable());
ThreadGroup group = new ThreadGroup("$$$");
Thread thread = new Thread(group, new TestGuiAvailable());
thread.start();
thread.join();
}
示例3: testSetGuiAvailable
import java.beans.Beans; //導入方法依賴的package包/類
public void testSetGuiAvailable() {
boolean value = Beans.isGuiAvailable();
try {
Beans.setGuiAvailable(true);
assertTrue(Beans.isGuiAvailable());
Beans.setGuiAvailable(false);
assertFalse(Beans.isGuiAvailable());
} finally {
Beans.setGuiAvailable(value);
}
}
示例4: testSetGuiAvailable
import java.beans.Beans; //導入方法依賴的package包/類
public void testSetGuiAvailable() {
boolean value = Beans.isGuiAvailable();
try {
Beans.setGuiAvailable(true);
assertTrue(Beans.isGuiAvailable());
Beans.setGuiAvailable(false);
assertFalse(Beans.isGuiAvailable());
} finally {
Beans.setGuiAvailable(value);
}
}
示例5: testBeansSetGuiAvailable
import java.beans.Beans; //導入方法依賴的package包/類
public Result testBeansSetGuiAvailable() {
try {
ssetUp();
Beans.setGuiAvailable(true);
return failed("SecurityException wasn't throw");
} catch (SecurityException e) {
return passed();
}
}