当前位置: 首页>>代码示例>>Java>>正文


Java Visibility.dontUseGui方法代码示例

本文整理汇总了Java中java.beans.Visibility.dontUseGui方法的典型用法代码示例。如果您正苦于以下问题:Java Visibility.dontUseGui方法的具体用法?Java Visibility.dontUseGui怎么用?Java Visibility.dontUseGui使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.beans.Visibility的用法示例。


在下文中一共展示了Visibility.dontUseGui方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: dontUseGui

import java.beans.Visibility; //导入方法依赖的package包/类
/**
 * notify this instance that it may no longer render a GUI.
 */

public synchronized void dontUseGui() {
    if (okToUseGui) {
        okToUseGui = false;

        // lets also tell the Children that can that they may not use their GUI's
        synchronized(children) {
            for (Iterator i = children.keySet().iterator(); i.hasNext();) {
                Visibility v = getChildVisibility(i.next());

                if (v != null) v.dontUseGui();
           }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:BeanContextSupport.java

示例2: dontUseGui

import java.beans.Visibility; //导入方法依赖的package包/类
/**
 * notify this instance that it may no longer render a GUI.
 */

public synchronized void dontUseGui() {
    if (okToUseGui) {
        okToUseGui = false;

        // lets also tell the Children that can that they may not use their GUI's
        synchronized(children) {
            for (Iterator<Object> i = children.keySet().iterator(); i.hasNext();) {
                Visibility v = getChildVisibility(i.next());

                if (v != null) v.dontUseGui();
           }
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:BeanContextSupport.java

示例3: dontUseGui

import java.beans.Visibility; //导入方法依赖的package包/类
/**
    * notify this instance that it may no longer render a GUI.
    */

   public synchronized void dontUseGui() {
if (okToUseGui) {
    okToUseGui = false;

    // lets also tell the Children that can that they may not use their GUI's
    synchronized(children) {
        for (Iterator i = children.keySet().iterator(); i.hasNext();) {
	    Visibility v = getChildVisibility(i.next());

	    if (v != null) v.dontUseGui();
       }
    }
}
   }
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:19,代码来源:BeanContextSupport.java

示例4: dontUseGui

import java.beans.Visibility; //导入方法依赖的package包/类
public synchronized void dontUseGui() {
    // Command this BeanContext and its children not to use GUI
    this.okToUseGui = false;

    for (Iterator it = iterator(); it.hasNext();) {
        Object next = it.next();
        Visibility vis = getChildVisibility(next);

        if (vis != null) {
            vis.dontUseGui();
        }
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:14,代码来源:BeanContextSupport.java

示例5: add

import java.beans.Visibility; //导入方法依赖的package包/类
public boolean add(Object targetChild) {

        // We must synchronize on BeanContext.globalHierarchyLock
        synchronized (BeanContext.globalHierarchyLock) {

            // Validate some values and states to check if we can proceed
            if (!addChecks(targetChild)) {
                return false;
            }

            try {

                // If child is an instance of BeanContextChild or
                // BeanContextProxy,
                // invoke setBeanContext() method on this child
                // and register BeanContext with its child
                // on PropertyChangeListener and VetoableChangeListener.
                BeanContextChild ch = getChildBeanContextChild(targetChild);

                if (ch != null) {
                    ch.setBeanContext(getBeanContextPeer());
                    ch.addPropertyChangeListener(BEAN_CONTEXT, this.pcl);
                    ch.addVetoableChangeListener(BEAN_CONTEXT, this.vcl);
                }
            } catch (PropertyVetoException e) {

                // Throw IllegalStateException, if PropertyVetoException occurs
                throw new IllegalStateException(Messages.getString(
                        "beans.30", targetChild, e.getMessage())); //$NON-NLS-1$
            }

            // If child implements Visibility,
            // set an appropriate type of ability to render GUI
            Visibility vis = getChildVisibility(targetChild);

            if (vis != null) {
                if (this.okToUseGui) {
                    vis.okToUseGui();
                } else {
                    vis.dontUseGui();
                }
            }

            // Check if this child implements Serializable and increase
            // the number of serializable children of the BeanContext
            if (getChildSerializable(targetChild) != null) {
                this.serializable++;
            }

            // Finally add child to the collection
            addChild(targetChild);
        }

        return true;
    }
 
开发者ID:freeVM,项目名称:freeVM,代码行数:56,代码来源:BeanContextSupport.java


注:本文中的java.beans.Visibility.dontUseGui方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。