當前位置: 首頁>>代碼示例>>Java>>正文


Java Beans.setDesignTime方法代碼示例

本文整理匯總了Java中java.beans.Beans.setDesignTime方法的典型用法代碼示例。如果您正苦於以下問題:Java Beans.setDesignTime方法的具體用法?Java Beans.setDesignTime怎麽用?Java Beans.setDesignTime使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.Beans的用法示例。


在下文中一共展示了Beans.setDesignTime方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: MVMapElement

import java.beans.Beans; //導入方法依賴的package包/類
MVMapElement(TLDataObject dataObject) {
    // Hack
    if (Beans.isDesignTime()) {
        Beans.setDesignTime(false);
    }
    this.dataObject = dataObject;

    glPanel = new TLMapGLPanel(dataObject.getDatabase().getMap(), dataObject.getDatabase());

    slider = new TLSlider(dataObject.getDatabase());

    elementPanel = new JPanel(new BorderLayout());
    elementPanel.add(glPanel, BorderLayout.CENTER);
    elementPanel.add(slider, BorderLayout.PAGE_END);

    ActionMap map = new ActionMap();
    map.put("save", SystemAction.get(SaveAction.class));
    elementPanel.setActionMap(map);

    lookupContent = new InstanceContent();
    lookup = new ProxyLookup(dataObject.getLookup(), new AbstractLookup(lookupContent));
}
 
開發者ID:kefik,項目名稱:Pogamut3,代碼行數:23,代碼來源:MVMapElement.java

示例2: 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);
    }
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:11,代碼來源:Test4080522.java

示例3: MapGLPanel

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Create a panel for 
 * @param caps
 * @param map
 * @param log
 */
protected MapGLPanel(GLCapabilities caps, IUnrealMap map, Logger log) {
    super(caps);

    if (Beans.isDesignTime()) {
        Beans.setDesignTime(false);
    }

    this.map = map;
    this.logger = log;

    Location mapFocus = new Location(
            map.getBox().getCenterX(),
            map.getBox().getCenterY(),
            map.getBox().getCenterZ());
    // Stuff for controlling viewpoint in map
    mapViewpoint = new MapViewpoint();
    mapController = new MapController(this, mapViewpoint, mapFocus);
    mapController.registerListeners();

    // Create renderers
    mapRenderer = new MapRenderer(map, lastGLName++);
    agentRenderes = new GLRendererCollection<IRenderableUTAgent>();
    environmentRenderer = new EnvironmentRenderer(mapViewpoint, agentRenderes, mapRenderer);

    // Add listener so this level is rendered
    this.addGLEventListener(environmentRenderer);

    // Listen for changes in viewpoint
    mapViewpoint.addViewpointListener(this);

    // Set initial position of view + thanks to listener display
    mapViewpoint.setFromViewedBox(map.getBox());

}
 
開發者ID:kefik,項目名稱:Pogamut3,代碼行數:41,代碼來源:MapGLPanel.java

示例4: main

import java.beans.Beans; //導入方法依賴的package包/類
public static void main(String[] args) throws InterruptedException {
    if (Beans.isDesignTime()) {
        throw new Error("unexpected DesignTime property");
    }
    Beans.setDesignTime(!Beans.isDesignTime());
    ThreadGroup group = new ThreadGroup("$$$");
    Thread thread = new Thread(group, new TestDesignTime());
    thread.start();
    thread.join();
}
 
開發者ID:lambdalab-mirror,項目名稱:jdk8u-jdk,代碼行數:11,代碼來源:TestDesignTime.java

示例5: testSetDesignTime

import java.beans.Beans; //導入方法依賴的package包/類
public void testSetDesignTime() {
    boolean value = Beans.isDesignTime();
    try {
        Beans.setDesignTime(true);
        assertTrue(Beans.isDesignTime());

        Beans.setDesignTime(false);
        assertFalse(Beans.isDesignTime());
    } finally {
        Beans.setDesignTime(value);
    }
}
 
開發者ID:shannah,項目名稱:cn1,代碼行數:13,代碼來源:BeansTest.java

示例6: testSetDesignTime

import java.beans.Beans; //導入方法依賴的package包/類
public void testSetDesignTime() {
    boolean value = Beans.isDesignTime();
    try {
        Beans.setDesignTime(true);
        assertTrue(Beans.isDesignTime());
        
        Beans.setDesignTime(false);
        assertFalse(Beans.isDesignTime());
    } finally {
        Beans.setDesignTime(value);
    }
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:13,代碼來源:BeansTest.java

示例7: testBeansSetDesignTime

import java.beans.Beans; //導入方法依賴的package包/類
public Result testBeansSetDesignTime() {
    try {
        ssetUp();
        Beans.setDesignTime(true);
        return failed("SecurityException wasn't throw");
    } catch (SecurityException e) {
        return passed();
    }
}
 
開發者ID:freeVM,項目名稱:freeVM,代碼行數:10,代碼來源:CheckPropertiesAccessTest.java

示例8: install

import java.beans.Beans; //導入方法依賴的package包/類
static void install() {
    //Thanks to Scott Kovatch from Apple for this fix - enabling the preferences menu
    //requires that Beans.isDesignTime() be false
    boolean wasDesignTime = Beans.isDesignTime();
    
    try {
        Beans.setDesignTime (false);

        al = new NbApplicationAdapter();
        Application.getApplication().addApplicationListener(al);
        Application.getApplication().setEnabledAboutMenu(true);
        Application.getApplication().setEnabledPreferencesMenu(true);
    } finally {
        Beans.setDesignTime(wasDesignTime);
    }
    /*
    WindowManager.getDefault().addWindowSystemListener(new WindowSystemListener() {

        
        @Override
        public void beforeLoad(WindowSystemEvent event) {
            WindowManager.getDefault().removeWindowSystemListener(this);
            try {
                FullScreenUtilities.setWindowCanFullScreen(WindowManager.getDefault().getMainWindow(), true);
            } catch( ThreadDeath td ) {
                throw td;
            } catch( Throwable e ) {
                Logger.getLogger(NbApplicationAdapter.class.getName()).log(Level.FINE, 
                        "Error while setting up full screen support.", e );//NOI18N
            }
        }

        @Override
        public void afterLoad(WindowSystemEvent event) {
        }

        @Override
        public void beforeSave(WindowSystemEvent event) {
        }

        @Override
        public void afterSave(WindowSystemEvent event) {
        }
    });
    */
}
 
開發者ID:JockiHendry,項目名稱:ireport-fork,代碼行數:47,代碼來源:NbApplicationAdapter.java


注:本文中的java.beans.Beans.setDesignTime方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。