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


Java BeanContextSupport.setDesignTime方法代码示例

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


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

示例1: integrateFlow

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
private void integrateFlow(Vector beans, Vector connections) {
  java.awt.Color bckC = getBackground();
  m_bcSupport = new BeanContextSupport();
  m_bcSupport.setDesignTime(true);

  // register this panel as a property change listener with each
  // bean
  for (int i = 0; i < beans.size(); i++) {
    BeanInstance tempB = (BeanInstance) beans.elementAt(i);
    if (tempB.getBean() instanceof Visible) {
      ((Visible) (tempB.getBean())).getVisual().addPropertyChangeListener(
          this);

      // A workaround to account for JPanel's with their default
      // background colour not being serializable in Apple's JRE
      ((Visible) (tempB.getBean())).getVisual().setBackground(bckC);
      ((JComponent) (tempB.getBean())).setBackground(bckC);
    }
    if (tempB.getBean() instanceof BeanCommon) {
      ((BeanCommon) (tempB.getBean())).setLog(m_logPanel);
    }
    if (tempB.getBean() instanceof BeanContextChild) {
      m_bcSupport.add(tempB.getBean());
    }
  }
  BeanInstance.setBeanInstances(beans, m_beanLayout);
  BeanConnection.setConnections(connections);
  m_beanLayout.revalidate();
  m_beanLayout.repaint();
}
 
开发者ID:williamClanton,项目名称:jbossBA,代码行数:31,代码来源:KnowledgeFlowApp.java

示例2: setUp

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
/**
 * Adding the components and initialization
 * 
 * @see java.beans.beancontext.BeanContextSupport#add(Object)
 * @see java.beans.beancontext.BeanContextSupport#setDesignTime(boolean)
 * @see java.beans.beancontext.BeanContextSupport#setLocale(Locale)
 */
protected void setUp() throws Exception {
    context = new BeanContextSupport();
    context.add(bean);
    context.setDesignTime(true);
    context.setLocale(new Locale("rus"));

    for (int i = 0; i < 100; i++) {
        beans[i] = new BeanContextSupport();
        context.add(beans[i]);
    }
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:19,代码来源:BeanContextTest.java

示例3: integrateFlow

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
protected void integrateFlow(Vector<Object> beans,
  Vector<BeanConnection> connections, boolean replace,
  boolean notReplaceAndSourcedFromBinary) {
  java.awt.Color bckC = getBackground();
  m_bcSupport = new BeanContextSupport();
  m_bcSupport.setDesignTime(true);

  // register this panel as a property change listener with each
  // bean
  for (int i = 0; i < beans.size(); i++) {
    BeanInstance tempB = (BeanInstance) beans.elementAt(i);
    if (tempB.getBean() instanceof Visible) {
      ((Visible) (tempB.getBean())).getVisual().addPropertyChangeListener(
        this);

      // A workaround to account for JPanel's with their default
      // background colour not being serializable in Apple's JRE
      ((Visible) (tempB.getBean())).getVisual().setBackground(bckC);
      ((JComponent) (tempB.getBean())).setBackground(bckC);
    }
    if (tempB.getBean() instanceof BeanCommon) {
      ((BeanCommon) (tempB.getBean())).setLog(m_logPanel);
    }
    if (tempB.getBean() instanceof BeanContextChild) {
      m_bcSupport.add(tempB.getBean());
    }
  }

  if (replace) {
    BeanInstance.setBeanInstances(beans, m_beanLayout,
      m_mainKFPerspective.getCurrentTabIndex());
    BeanConnection.setConnections(connections,
      m_mainKFPerspective.getCurrentTabIndex());
  } else if (notReplaceAndSourcedFromBinary) {
    BeanInstance.appendBeans(m_beanLayout, beans,
      m_mainKFPerspective.getCurrentTabIndex());
    BeanConnection.appendConnections(connections,
      m_mainKFPerspective.getCurrentTabIndex());
  }
  revalidate();
  m_beanLayout.revalidate();
  m_beanLayout.repaint();
  notifyIsDirty();

  m_selectAllB.setEnabled(BeanInstance.getBeanInstances(
    m_mainKFPerspective.getCurrentTabIndex()).size() > 0);
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:48,代码来源:KnowledgeFlowApp.java

示例4: newFlow

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
protected void newFlow() {
  m_newFlowBut.setEnabled(false);

  String user = m_viewer.getUser();
  String password = m_viewer.getPassword();
  String uRL = m_viewer.getURL();
  String query = m_viewer.getQuery();

  if (query == null) {
    query = "";
  }

  try {
    DatabaseLoader dbl = new DatabaseLoader();
    dbl.setUser(user);
    dbl.setPassword(password);
    dbl.setUrl(uRL);
    dbl.setQuery(query);

    BeanContextSupport bc = new BeanContextSupport();
    bc.setDesignTime(true);

    Loader loaderComp = new Loader();
    bc.add(loaderComp);
    loaderComp.setLoader(dbl);

    KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();
    m_mainPerspective.addTab("DBSource");

    // The process of creating a BeanInstance integrates will result
    // in it integrating itself into the flow in the specified tab
    new BeanInstance(m_mainPerspective.getBeanLayout(m_mainPerspective
      .getNumTabs() - 1), loaderComp, 50, 50,
      m_mainPerspective.getNumTabs()
      - 1);

    // Vector<Object> beans = BeanInstance.getBeanInstances(m_mainPerspective
    // .getNumTabs() - 1);
    // Vector<BeanConnection> connections = BeanConnection
    // .getConnections(m_mainPerspective.getNumTabs() - 1);
    // singleton.integrateFlow(beans, connections, true, false);
    singleton.setActivePerspective(0); // switch back to the main perspective

    m_newFlowBut.setEnabled(true);

  } catch (Exception ex) {
    ex.printStackTrace();
  }
}
 
开发者ID:mydzigear,项目名称:repo.kmeanspp.silhouette_score,代码行数:50,代码来源:SQLViewerPerspective.java

示例5: integrateFlow

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
protected void integrateFlow(Vector beans, Vector connections, boolean replace,
    boolean notReplaceAndSourcedFromBinary) {
  java.awt.Color bckC = getBackground();
  m_bcSupport = new BeanContextSupport();
  m_bcSupport.setDesignTime(true);

  // register this panel as a property change listener with each
  // bean
  for (int i = 0; i < beans.size(); i++) {
    BeanInstance tempB = (BeanInstance)beans.elementAt(i);
    if (tempB.getBean() instanceof Visible) {
      ((Visible)(tempB.getBean())).getVisual().
      addPropertyChangeListener(this);

      // A workaround to account for JPanel's with their default
      // background colour not being serializable in Apple's JRE
      ((Visible)(tempB.getBean())).getVisual().
      setBackground(bckC);
      ((JComponent)(tempB.getBean())).setBackground(bckC);
    }
    if (tempB.getBean() instanceof BeanCommon) {
      ((BeanCommon)(tempB.getBean())).setLog(m_logPanel);
    }
    if (tempB.getBean() instanceof BeanContextChild) {
      m_bcSupport.add(tempB.getBean());
    }
  }

  if (replace) {
    BeanInstance.setBeanInstances(beans, m_beanLayout, 
        m_mainKFPerspective.getCurrentTabIndex());
    BeanConnection.setConnections(connections, 
        m_mainKFPerspective.getCurrentTabIndex());
  } else if (notReplaceAndSourcedFromBinary){
    BeanInstance.appendBeans(m_beanLayout, beans, 
        m_mainKFPerspective.getCurrentTabIndex());
    BeanConnection.appendConnections(connections, 
        m_mainKFPerspective.getCurrentTabIndex());
  }
  revalidate();
  m_beanLayout.revalidate();
  m_beanLayout.repaint();
  notifyIsDirty();

  m_selectAllB.setEnabled(BeanInstance.
      getBeanInstances(m_mainKFPerspective.getCurrentTabIndex()).size() > 0);    
}
 
开发者ID:dsibournemouth,项目名称:autoweka,代码行数:48,代码来源:KnowledgeFlowApp.java

示例6: newFlow

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
protected void newFlow() {
  m_newFlowBut.setEnabled(false);
  
  String user = m_viewer.getUser();
  String password = m_viewer.getPassword();
  String uRL = m_viewer.getURL();
  String query = m_viewer.getQuery();
  
  if (query == null) {
    query = "";
  }
  
  try {
    DatabaseLoader dbl = new DatabaseLoader();
    dbl.setUser(user);
    dbl.setPassword(password);
    dbl.setUrl(uRL);
    dbl.setQuery(query);
    
    BeanContextSupport bc = new BeanContextSupport();
    bc.setDesignTime(true);
    
    Loader loaderComp = new Loader();
    bc.add(loaderComp);
    loaderComp.setLoader(dbl);
    
    KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();      
    m_mainPerspective.addTab("DBSource");
    BeanInstance beanI = 
      new BeanInstance(m_mainPerspective.getBeanLayout(m_mainPerspective.getNumTabs() - 1),
          loaderComp, 50, 50, m_mainPerspective.getNumTabs() - 1);
    Vector beans = BeanInstance.getBeanInstances(m_mainPerspective.getNumTabs() - 1);
    Vector connections = BeanConnection.getConnections(m_mainPerspective.getNumTabs() - 1);
    singleton.integrateFlow(beans, connections, true, false);
    singleton.setActivePerspective(0); // switch back to the main perspective                  
    
    m_newFlowBut.setEnabled(true);
    
  } catch (Exception ex) {
    ex.printStackTrace();
  }
}
 
开发者ID:dsibournemouth,项目名称:autoweka,代码行数:43,代码来源:SQLViewerPerspective.java

示例7: newFlow

import java.beans.beancontext.BeanContextSupport; //导入方法依赖的package包/类
protected void newFlow() {
  m_newFlowBut.setEnabled(false);

  String user = m_viewer.getUser();
  String password = m_viewer.getPassword();
  String uRL = m_viewer.getURL();
  String query = m_viewer.getQuery();

  if (query == null) {
    query = "";
  }

  try {
    DatabaseLoader dbl = new DatabaseLoader();
    dbl.setUser(user);
    dbl.setPassword(password);
    dbl.setUrl(uRL);
    dbl.setQuery(query);

    BeanContextSupport bc = new BeanContextSupport();
    bc.setDesignTime(true);

    Loader loaderComp = new Loader();
    bc.add(loaderComp);
    loaderComp.setLoader(dbl);

    KnowledgeFlowApp singleton = KnowledgeFlowApp.getSingleton();
    m_mainPerspective.addTab("DBSource");
    /*
     * BeanInstance beanI = new
     * BeanInstance(m_mainPerspective.getBeanLayout(m_mainPerspective
     * .getNumTabs() - 1), loaderComp, 50, 50, m_mainPerspective.getNumTabs()
     * - 1);
     */
    Vector<Object> beans = BeanInstance.getBeanInstances(m_mainPerspective
      .getNumTabs() - 1);
    Vector<BeanConnection> connections = BeanConnection
      .getConnections(m_mainPerspective.getNumTabs() - 1);
    singleton.integrateFlow(beans, connections, true, false);
    singleton.setActivePerspective(0); // switch back to the main perspective

    m_newFlowBut.setEnabled(true);

  } catch (Exception ex) {
    ex.printStackTrace();
  }
}
 
开发者ID:umple,项目名称:umple,代码行数:48,代码来源:SQLViewerPerspective.java


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