com.google.gwt.user.client.ui.ListBox.getValue()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中com.google.gwt.user.client.ui.ListBox.getValue()方法的一些代码示例,展示了ListBox.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListBox.getValue()方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.ListBox
类名称:ListBox
方法名:getValue

ListBox.getValue介绍

[英]Gets the value associated with the item at a given index.
[中]获取与给定索引处的项关联的值。

代码示例

代码示例来源:origin: com.google.gwt/gwt-servlet

/**
 * Gets the value for currently selected item. If multiple items are selected,
 * this method will return the value of the first selected item.
 *
 * @return the value for selected item, or {@code null} if none is selected
 */
public String getSelectedValue() {
 int index = getSelectedIndex();
 return index == -1 ? null : getValue(index);
}

代码示例来源:origin: net.wetheinter/gwt-user

/**
 * Gets the value for currently selected item. If multiple items are selected,
 * this method will return the value of the first selected item.
 *
 * @return the value for selected item, or {@code null} if none is selected
 */
public String getSelectedValue() {
 int index = getSelectedIndex();
 return index == -1 ? null : getValue(index);
}

代码示例来源:origin: org.jboss.ballroom/widgets

private String getSelectedValue() {
  int selectedIndex = listBox.getSelectedIndex();
  if(selectedIndex>=0)
    return listBox.getValue(selectedIndex);
  else
    return "";
}

代码示例来源:origin: org.uberfire/uberfire-wires-core-grids

@Override
  protected String getValue() {
    if (widget != null) {
      return widget.getValue(widget.getSelectedIndex());
    }
    return null;
  }
}

代码示例来源:origin: com.vaadin.external.gwt/gwt-user

/**
 * Gets the value for currently selected item. If multiple items are selected,
 * this method will return the value of the first selected item.
 *
 * @return the value for selected item, or {@code null} if none is selected
 */
public String getSelectedValue() {
 int index = getSelectedIndex();
 return index == -1 ? null : getValue(index);
}

代码示例来源:origin: org.eclipse.che.plugin/che-plugin-git-ext-git

/** {@inheritDoc} */
@NotNull
@Override
public String getRepositoryUrl() {
 int index = repository.getSelectedIndex();
 return repository.getValue(index);
}

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addActionSetField( v,
              Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addCallMethod( v,
            Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addCallMethod( v,
            Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addNewFact( f,
          Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addNewCE( ce,
         Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-dtable-editor-client

public void onClick( ClickEvent event ) {
  final String txtValue = lb.getValue( lb.getSelectedIndex() );
  Boolean boolValue = ( txtValue.equals( "" ) ? null : txtValue.equals( "true" ) );
  value.setBooleanValue( boolValue );
}

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addNewDSLRhs( sen,
           Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addNewFCE( ce,
          Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: net.sf.javaprinciples.client/client-presentation

@Override
  public void onChange(ChangeEvent event)
  {
    int index = input.getSelectedIndex();
    String value = index != -1 ? input.getValue(index) : null;
    listener.valueChanged(value);
  }
});

代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt

@Deprecated
public static EIURI getSelectedUri(final ListBox listBox) {
  final EIURI selectedUri = EIURI.create( listBox.getValue( listBox.getSelectedIndex() ) );
  return selectedUri;
}

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addRetract( v,
          Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void execute() {
    addNewDSLLhs( sen,
           Integer.parseInt( positionCbo.getValue( positionCbo.getSelectedIndex() ) ) );
    hide();
  }
} );

代码示例来源:origin: org.kie.guvnor/guvnor-guided-dtable-editor-client

public void onChange( ChangeEvent event ) {
  int index = workItemsListBox.getSelectedIndex();
  if ( index >= 0 ) {
    String selectedWorkItemName = workItemsListBox.getValue( index );
    editingCol.setWorkItemDefinition( workItemDefinitionsMap.get( selectedWorkItemName ) );
    showWorkItemParameters();
    center();
  }
}

代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client

public void onChange( ChangeEvent event ) {
    ListBox lb = (ListBox) event.getSource();
    int index = lb.getSelectedIndex();
    if ( index > 0 ) {
      ExpressionBuilder.this.makeDirty();
      startPointChange( lb.getValue( index ) );
    }
  }
} );

相关文章