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


Java Beans.isDesignTime方法代碼示例

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


在下文中一共展示了Beans.isDesignTime方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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: onLoad

import java.beans.Beans; //導入方法依賴的package包/類
@Override
public void onLoad() {
	tabPanel.selectTab(0);

	if (!Beans.isDesignTime()) {
		Storage s = Storage.getLocalStorageIfSupported();

		if (s != null) {

			for (int i = 0; i < s.getLength(); i++) {
				String key = s.key(i);

				if ((key != null) && key.startsWith(STORAGE_KEY)) {
					String name = key.substring(STORAGE_KEY.length());
					storageList.addItem(name, key);
				}
			}
		}
	}
}
 
開發者ID:dawg6,項目名稱:dhcalc,代碼行數:21,代碼來源:SavePanel.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: createMetaRuleset

import java.beans.Beans; //導入方法依賴的package包/類
@Override
protected MetaRuleset createMetaRuleset(Class type)
{
  MetaRuleset m = super.createMetaRuleset(type);
  // Trinidad-2014 : Converters may have id specified in the tld, but it isn't supported
  if (Beans.isDesignTime())
    m.ignore("id");
  m.addRule(StringArrayPropertyTagRule.Instance);
  m.addRule(ValueExpressionTagRule.Instance);
  m.addRule(LocalePropertyTagRule.Instance);
  m.addRule (TimezonePropertyTagRule.Instance);
  return m;
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:14,代碼來源:TrinidadConverterHandler.java

示例5: _getSkinPregenerator

import java.beans.Beans; //導入方法依賴的package包/類
private static SkinPregenerator _getSkinPregenerator()
{
  if (Beans.isDesignTime())
  {
    return _NOOP_PREGENERATOR;
  }

  return new AllVariantsSkinPregenerator();
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:10,代碼來源:SkinPregenerationUtils.java

示例6: 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

示例7: isDesignTime

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Returns if design time is turned on for a Container in {@link IContainerWrapperCommon}.
 * 
 * @param cw The container to set design time for. <code>null</code> is legal will return <code>true</code> if there is at
 *            least one <code>ContainerWrapper</code> (or <code>null</code>) that have design time
 *            turned on.
 * @return If design time is set for <code>cw</code>.
 */
public boolean isDesignTime(IContainerWrapperCommon cw) {
    if (dtMap == null) {
        return hasBeans && Beans.isDesignTime();
    }

    if (cw != null && dtMap.containsKey(cw.getComponent()) == false) {
        cw = null;
    }

    final Boolean b = dtMap.get(cw != null ? cw.getComponent() : null);
    return b != null && b;
}
 
開發者ID:jo-source,項目名稱:jo-widgets,代碼行數:21,代碼來源:LayoutUtilCommon.java

示例8: 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

示例9: getString

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * Retrieve a string according to the key and the current Locale.
 * @param key the string's key
 * @return the according string in the current user language.
 */
public static String getString(String key) {
	try {
		ResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;
		return bundle.getString(key);
	} catch (MissingResourceException e) {
		return "!" + key + "!";
	}
}
 
開發者ID:pja35,項目名稱:p2pEngine,代碼行數:14,代碼來源:Langues.java

示例10: getString

import java.beans.Beans; //導入方法依賴的package包/類
public static String getString(String key) {
	try {
		ResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;
		return bundle.getString(key);
	} catch (MissingResourceException e) {
		return "!" + key + "!";
	}
}
 
開發者ID:pja35,項目名稱:p2pEngine,代碼行數:9,代碼來源:Langues.java

示例11: getString

import java.beans.Beans; //導入方法依賴的package包/類
public static String getString(String key) {
	try {
		ResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;
		return bundle.getString(key);
	}
	catch (MissingResourceException e) {
		return "!" + key + "!";
	}
}
 
開發者ID:Pyeroh,項目名稱:mobarenahelper,代碼行數:10,代碼來源:Messages.java

示例12: 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

示例13: getString

import java.beans.Beans; //導入方法依賴的package包/類
public static String getString(String key) {
    try {
        ResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;
        return bundle.getString(key);
    } catch (MissingResourceException e) {
        return "!" + key + "!";
    }
}
 
開發者ID:tjumyk,項目名稱:sevenwonders,代碼行數:9,代碼來源:LocalMessages.java

示例14: getString

import java.beans.Beans; //導入方法依賴的package包/類
/**
 * 
 * @param key key for the locale
 * @param param Optional, value to replace the $PARAM placeholder with, if that exists
 * @return
 * @author pchr
 */
public static String getString(String key, Object param) {
	try {
		ResourceBundle bundle = Beans.isDesignTime() ? loadBundle() : RESOURCE_BUNDLE;
		
		String value = bundle.getString( key );
		if ( param == null ) {
			param = "";
		}
		
		return value.replace( "$PARAM", (CharSequence) param );
	} catch (MissingResourceException e) {
		return "!" + key + "!";
	}
}
 
開發者ID:LePhil,項目名稱:Bibliotheca,代碼行數:22,代碼來源:Messages.java

示例15: getString

import java.beans.Beans; //導入方法依賴的package包/類
public static String getString(final String key) {
    String returnValue;

    try {
        final ResourceBundle bundle = Beans.isDesignTime() ? Messages.loadBundle() : Messages.RESOURCE_BUNDLE;
        returnValue = bundle.getString(key);
    } catch (final MissingResourceException e) {
        returnValue = '!' + key + '!';
    }

    return returnValue;
}
 
開發者ID:ribeirux,項目名稱:jalphanode,代碼行數:13,代碼來源:Messages.java


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