• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java XulListbox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.pentaho.ui.xul.containers.XulListbox的典型用法代码示例。如果您正苦于以下问题:Java XulListbox类的具体用法?Java XulListbox怎么用?Java XulListbox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



XulListbox类属于org.pentaho.ui.xul.containers包,在下文中一共展示了XulListbox类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testRefreshOptions

import org.pentaho.ui.xul.containers.XulListbox; //导入依赖的package包/类
@Test
public void testRefreshOptions() throws Exception {
  XulListbox connectionBox = mock( XulListbox.class );
  when( document.getElementById( "connection-type-list" ) ).thenReturn( connectionBox );
  when( connectionBox.getSelectedItem() ).thenReturn( "myDb" );
  XulListbox accessBox = mock( XulListbox.class );
  when( document.getElementById( "access-type-list" ) ).thenReturn( accessBox );
  when( accessBox.getSelectedItem() ).thenReturn( "Native" );
  DataHandler dataHandler = mock( DataHandler.class );
  when( xulDomContainer.getEventHandler( "dataHandler" ) ).thenReturn( dataHandler );
  DatabaseInterface dbInterface = mock( DatabaseInterface.class );
  when( dbInterface.getDefaultDatabasePort() ).thenReturn( 5309 );
  DataHandler.connectionMap.put( "myDb", dbInterface );

  XulComponent component = mock( XulComponent.class );
  XulComponent parent = mock( XulComponent.class );
  when( component.getParent() ).thenReturn( parent );
  when( document.getElementById( "database-options-box" ) ).thenReturn( component );
  XulDomContainer fragmentContainer = mock( XulDomContainer.class );
  Document mockDoc = mock( Document.class );
  XulComponent firstChild = mock( XulComponent.class );
  when( mockDoc.getFirstChild() ).thenReturn( firstChild );
  when( fragmentContainer.getDocumentRoot() ).thenReturn( mockDoc );
  when( xulDomContainer.loadFragment( anyString(), any( Object.class ) ) ).thenReturn( fragmentContainer );

  XulTextbox portBox = mock( XulTextbox.class );
  when( document.getElementById( "port-number-text" ) ).thenReturn( portBox );

  fragmentHandler.refreshOptions();

  // Iterate through the other database access types
  when( accessBox.getSelectedItem() ).thenReturn( "JNDI" );
  fragmentHandler.refreshOptions();
  when( accessBox.getSelectedItem() ).thenReturn( "ODBC" );
  fragmentHandler.refreshOptions();
  when( accessBox.getSelectedItem() ).thenReturn( "OCI" );
  fragmentHandler.refreshOptions();
  when( accessBox.getSelectedItem() ).thenReturn( "Plugin" );
  fragmentHandler.refreshOptions();
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:41,代码来源:FragmentHandlerTest.java


示例2: createBindings

import org.pentaho.ui.xul.containers.XulListbox; //导入依赖的package包/类
@Override
protected void createBindings() {
  super.createBindings();
  roleListBox = (XulListbox) document.getElementById( "roles-list" );//$NON-NLS-1$
  systemRoleListBox = (XulListbox) document.getElementById( "system-roles-list" );//$NON-NLS-1$
  applyLogicalRolesButton = (XulButton) document.getElementById( "apply-action-permission" );//$NON-NLS-1$
  applyLogicalSystemRolesButton = (XulButton) document.getElementById( "apply-system-role-action-permission" );//$NON-NLS-1$

  logicalRolesBox = (XulVbox) document.getElementById( "role-action-permissions-vbox" );//$NON-NLS-1$
  logicalSystemRolesBox = (XulVbox) document.getElementById( "system-role-action-permissions-vbox" );//$NON-NLS-1$
  bf.setBindingType( Binding.Type.ONE_WAY );
  // Action based security permissions
  buttonConverter = new BindingConvertor<Integer, Boolean>() {

    @Override
    public Boolean sourceToTarget( Integer value ) {
      if ( value != null && value >= 0 ) {
        return false;
      }
      return true;
    }

    @Override
    public Integer targetToSource( Boolean value ) {
      // TODO Auto-generated method stub
      return null;
    }
  };
  bf.createBinding( roleListBox, "selectedIndex", applyLogicalRolesButton, "disabled", buttonConverter );//$NON-NLS-1$ //$NON-NLS-2$
  bf.createBinding( systemRoleListBox, "selectedIndex", applyLogicalSystemRolesButton, "disabled", buttonConverter );//$NON-NLS-1$ //$NON-NLS-2$
  bf.createBinding( absSecurity, "selectedRole", this, "selectedRoleChanged" );//$NON-NLS-1$ //$NON-NLS-2$
  bf.createBinding( absSecurity, "selectedSystemRole", this, "selectedSystemRoleChanged" );//$NON-NLS-1$ //$NON-NLS-2$
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:34,代码来源:AbsController.java


示例3: getControls

import org.pentaho.ui.xul.containers.XulListbox; //导入依赖的package包/类
protected void getControls() {

    // Not all of these controls are created at the same time.. that's OK, for now, just check
    // each one for null before using.

    dialogDeck = (XulDeck) document.getElementById("dialog-panel-deck"); //$NON-NLS-1$
    deckOptionsBox = (XulListbox) document.getElementById("deck-options-list"); //$NON-NLS-1$
    connectionBox = (XulListbox) document.getElementById("connection-type-list"); //$NON-NLS-1$
    accessBox = (XulListbox) document.getElementById("access-type-list"); //$NON-NLS-1$
    connectionNameBox = (XulTextbox) document.getElementById("connection-name-text"); //$NON-NLS-1$
    hostNameBox = (XulTextbox) document.getElementById("server-host-name-text"); //$NON-NLS-1$
    databaseNameBox = (XulTextbox) document.getElementById("database-name-text"); //$NON-NLS-1$
    portNumberBox = (XulTextbox) document.getElementById("port-number-text"); //$NON-NLS-1$
    userNameBox = (XulTextbox) document.getElementById("username-text"); //$NON-NLS-1$
    passwordBox = (XulTextbox) document.getElementById("password-text"); //$NON-NLS-1$
    dataTablespaceBox = (XulTextbox) document.getElementById("data-tablespace-text"); //$NON-NLS-1$
    indexTablespaceBox = (XulTextbox) document.getElementById("index-tablespace-text"); //$NON-NLS-1$
    serverInstanceBox = (XulTextbox) document.getElementById("instance-text"); //$NON-NLS-1$
    serverNameBox = (XulTextbox) document.getElementById("server-name-text"); //$NON-NLS-1$
    customUrlBox = (XulTextbox) document.getElementById("custom-url-text"); //$NON-NLS-1$
    customDriverClassBox = (XulTextbox) document.getElementById("custom-driver-class-text"); //$NON-NLS-1$
    languageBox = (XulTextbox) document.getElementById("language-text"); //$NON-NLS-1$
    systemNumberBox = (XulTextbox) document.getElementById("system-number-text"); //$NON-NLS-1$
    clientBox = (XulTextbox) document.getElementById("client-text"); //$NON-NLS-1$
    doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById("decimal-separator-check"); //$NON-NLS-1$
    resultStreamingCursorCheck = (XulCheckbox) document.getElementById("result-streaming-check"); //$NON-NLS-1$
    poolingCheck = (XulCheckbox) document.getElementById("use-pool-check"); //$NON-NLS-1$
    clusteringCheck = (XulCheckbox) document.getElementById("use-cluster-check"); //$NON-NLS-1$
    clusterParameterDescriptionLabel = (XulLabel) document.getElementById("cluster-parameter-description-label"); //$NON-NLS-1$
    poolSizeLabel = (XulLabel) document.getElementById("pool-size-label"); //$NON-NLS-1$
    poolSizeBox = (XulTextbox) document.getElementById("pool-size-text"); //$NON-NLS-1$
    maxPoolSizeLabel = (XulLabel) document.getElementById("max-pool-size-label"); //$NON-NLS-1$
    maxPoolSizeBox = (XulTextbox) document.getElementById("max-pool-size-text"); //$NON-NLS-1$
    poolParameterTree = (XulTree) document.getElementById("pool-parameter-tree"); //$NON-NLS-1$
    clusterParameterTree = (XulTree) document.getElementById("cluster-parameter-tree"); //$NON-NLS-1$
    optionsParameterTree = (XulTree) document.getElementById("options-parameter-tree"); //$NON-NLS-1$
    poolingDescription = (XulTextbox) document.getElementById("pooling-description"); //$NON-NLS-1$ 
    poolingParameterDescriptionLabel = (XulLabel) document.getElementById("pool-parameter-description-label"); //$NON-NLS-1$ 
    poolingDescriptionLabel = (XulLabel) document.getElementById("pooling-description-label"); //$NON-NLS-1$ 
    supportBooleanDataType = (XulCheckbox) document.getElementById("supports-boolean-data-type"); //$NON-NLS-1$;
    quoteIdentifiersCheck = (XulCheckbox) document.getElementById("quote-identifiers-check"); //$NON-NLS-1$;
    lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById("force-lower-case-check"); //$NON-NLS-1$;
    upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById("force-upper-case-check"); //$NON-NLS-1$;
    preferredSchemaName = (XulTextbox) document.getElementById("preferred-schema-name-text"); //$NON-NLS-1$;
    sqlBox = (XulTextbox) document.getElementById("sql-text"); //$NON-NLS-1$;
    useIntegratedSecurityCheck = (XulCheckbox) document.getElementById("use-integrated-security-check"); //$NON-NLS-1$;
  }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:48,代码来源:DataHandler.java


示例4: getControls

import org.pentaho.ui.xul.containers.XulListbox; //导入依赖的package包/类
protected void getControls() {

    // Not all of these controls are created at the same time.. that's OK, for now, just check
    // each one for null before using.

    dialogDeck = (XulDeck) document.getElementById( "dialog-panel-deck" );
    deckOptionsBox = (XulListbox) document.getElementById( "deck-options-list" );
    connectionBox = (XulListbox) document.getElementById( "connection-type-list" );
    accessBox = (XulListbox) document.getElementById( "access-type-list" );
    connectionNameBox = (XulTextbox) document.getElementById( "connection-name-text" );
    hostNameBox = (XulTextbox) document.getElementById( "server-host-name-text" );
    databaseNameBox = (XulTextbox) document.getElementById( "database-name-text" );
    portNumberBox = (XulTextbox) document.getElementById( "port-number-text" );
    userNameBox = (XulTextbox) document.getElementById( "username-text" );
    passwordBox = (XulTextbox) document.getElementById( "password-text" );
    dataTablespaceBox = (XulTextbox) document.getElementById( "data-tablespace-text" );
    indexTablespaceBox = (XulTextbox) document.getElementById( "index-tablespace-text" );
    serverInstanceBox = (XulTextbox) document.getElementById( "instance-text" );
    serverNameBox = (XulTextbox) document.getElementById( "server-name-text" );
    customUrlBox = (XulTextbox) document.getElementById( "custom-url-text" );
    customDriverClassBox = (XulTextbox) document.getElementById( "custom-driver-class-text" );
    languageBox = (XulTextbox) document.getElementById( "language-text" );
    systemNumberBox = (XulTextbox) document.getElementById( "system-number-text" );
    clientBox = (XulTextbox) document.getElementById( "client-text" );
    doubleDecimalSeparatorCheck = (XulCheckbox) document.getElementById( "decimal-separator-check" );
    resultStreamingCursorCheck = (XulCheckbox) document.getElementById( "result-streaming-check" );
    webAppName = (XulTextbox) document.getElementById( "web-application-name-text" );
    poolingCheck = (XulCheckbox) document.getElementById( "use-pool-check" );
    clusteringCheck = (XulCheckbox) document.getElementById( "use-cluster-check" );
    clusterParameterDescriptionLabel = (XulLabel) document.getElementById( "cluster-parameter-description-label" );
    poolSizeLabel = (XulLabel) document.getElementById( "pool-size-label" );
    poolSizeBox = (XulTextbox) document.getElementById( "pool-size-text" );
    maxPoolSizeLabel = (XulLabel) document.getElementById( "max-pool-size-label" );
    maxPoolSizeBox = (XulTextbox) document.getElementById( "max-pool-size-text" );
    poolParameterTree = (XulTree) document.getElementById( "pool-parameter-tree" );
    clusterParameterTree = (XulTree) document.getElementById( "cluster-parameter-tree" );
    optionsParameterTree = (XulTree) document.getElementById( "options-parameter-tree" );
    poolingDescription = (XulTextbox) document.getElementById( "pooling-description" );
    poolingParameterDescriptionLabel = (XulLabel) document.getElementById( "pool-parameter-description-label" );
    poolingDescriptionLabel = (XulLabel) document.getElementById( "pooling-description-label" );
    supportBooleanDataType = (XulCheckbox) document.getElementById( "supports-boolean-data-type" );
    supportTimestampDataType = (XulCheckbox) document.getElementById( "supports-timestamp-data-type" );
    quoteIdentifiersCheck = (XulCheckbox) document.getElementById( "quote-identifiers-check" );
    lowerCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-lower-case-check" );
    upperCaseIdentifiersCheck = (XulCheckbox) document.getElementById( "force-upper-case-check" );
    preserveReservedCaseCheck = (XulCheckbox) document.getElementById( "preserve-reserved-case" );
    strictBigNumberInterpretaion = (XulCheckbox) document.getElementById( "strict-bignum-interpretation" );
    preferredSchemaName = (XulTextbox) document.getElementById( "preferred-schema-name-text" );
    sqlBox = (XulTextbox) document.getElementById( "sql-text" );
    useIntegratedSecurityCheck = (XulCheckbox) document.getElementById( "use-integrated-security-check" );
    acceptButton = (XulButton) document.getElementById( "general-datasource-window_accept" );
    cancelButton = (XulButton) document.getElementById( "general-datasource-window_cancel" );
    testButton = (XulButton) document.getElementById( "test-button" );
    noticeLabel = (XulLabel) document.getElementById( "notice-label" );

    if ( portNumberBox != null && serverInstanceBox != null ) {
      if ( Boolean.parseBoolean( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ) ) {
        serverInstanceBox.addPropertyChangeListener( new PropertyChangeListener() {

          @Override
          public void propertyChange( PropertyChangeEvent evt ) {
            if ( "value".equals( evt.getPropertyName() ) ) {
              disablePortIfInstancePopulated();
            }
          }
        } );
      }
    }
  }
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:70,代码来源:DataHandler.java


示例5: setUp

import org.pentaho.ui.xul.containers.XulListbox; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
  dataHandler = new DataHandler();
  xulDomContainer = mock( XulDomContainer.class );

  document = mock( Document.class );
  XulComponent rootElement = mock( XulComponent.class );
  when( document.getRootElement() ).thenReturn( rootElement );

  // Mock the UI components

  accessBox = mock( XulListbox.class );
  when( document.getElementById( "access-type-list" ) ).thenReturn( accessBox );
  connectionBox = mock( XulListbox.class );
  when( document.getElementById( "connection-type-list" ) ).thenReturn( connectionBox );
  connectionNameBox = mock( XulTextbox.class );
  when( document.getElementById( "connection-name-text" ) ).thenReturn( connectionNameBox );
  dialogDeck = mock( XulDeck.class );
  when( document.getElementById( "dialog-panel-deck" ) ).thenReturn( dialogDeck );
  deckOptionsBox = mock( XulListbox.class );
  when( document.getElementById( "deck-options-list" ) ).thenReturn( deckOptionsBox );
  hostNameBox = mock( XulTextbox.class );
  when( document.getElementById( "server-host-name-text" ) ).thenReturn( hostNameBox );
  databaseNameBox = mock( XulTextbox.class );
  when( document.getElementById( "database-name-text" ) ).thenReturn( databaseNameBox );
  portNumberBox = mock( XulTextbox.class );
  when( document.getElementById( "port-number-text" ) ).thenReturn( portNumberBox );
  userNameBox = mock( XulTextbox.class );
  when( document.getElementById( "username-text" ) ).thenReturn( userNameBox );
  passwordBox = mock( XulTextbox.class );
  when( document.getElementById( "password-text" ) ).thenReturn( passwordBox );
  serverInstanceBox = mock( XulTextbox.class );
  when( document.getElementById( "instance-text" ) ).thenReturn( serverInstanceBox );
  when( serverInstanceBox.getValue() ).thenReturn( "instance" );
  when( serverInstanceBox.getAttributeValue( "shouldDisablePortIfPopulated" ) ).thenReturn( "true" );
  webappName = mock( XulTextbox.class );
  when( document.getElementById( "web-application-name-text" ) ).thenReturn( webappName );
  when( webappName.getValue() ).thenReturn( "webappName" );

  messageBox = mock( XulMessageBox.class );
  when( document.createElement( "messagebox" ) ).thenReturn( messageBox );
  when( xulDomContainer.getDocumentRoot() ).thenReturn( document );

  generalDatasourceWindow = mock( XulRoot.class );
  when( generalDatasourceWindow.getRootObject() ).thenReturn( mock( XulComponent.class ) );
  when( document.getElementById( "general-datasource-window" ) ).thenReturn( generalDatasourceWindow );
  dataHandler.setXulDomContainer( xulDomContainer );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:49,代码来源:DataHandlerTest.java



注:本文中的org.pentaho.ui.xul.containers.XulListbox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java TwillRunResources类代码示例发布时间:2022-05-22
下一篇:
Java SingleRootFileSource类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap