本文整理了Java中com.google.gwt.user.client.ui.ListBox.getSelectedIndex()
方法的一些代码示例,展示了ListBox.getSelectedIndex()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListBox.getSelectedIndex()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.ListBox
类名称:ListBox
方法名:getSelectedIndex
[英]Gets the currently-selected item. If multiple items are selected, this method will return the first selected item ( #isItemSelected(int)can be used to query individual items).
[中]获取当前选定的项。如果选择了多个项目,此方法将返回第一个选择的项目(#isItemSelected(int)可用于查询单个项目)。
代码示例来源: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: 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: 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.eclipse.che.plugin/che-plugin-git-ext-git
/** {@inheritDoc} */
@NotNull
@Override
public String getRepositoryUrl() {
int index = repository.getSelectedIndex();
return repository.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.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-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: dennisjzh/GwtMobile-UI
@Override
public void onChange(ChangeEvent event) {
int index = _listBox.getSelectedIndex();
String value = _listBox.getValue(index);
ValueChangeEvent.fire(this, value);
}
代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client
public void onChange( ChangeEvent event ) {
ListBox box = (ListBox) event.getSource();
panel.remove( box );
if ( box.getSelectedIndex() > 0 ) {
onChangeSelection( box.getValue( box.getSelectedIndex() ) );
}
}
};
代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client
public void onChange( ChangeEvent event ) {
String selected = box.getValue( box.getSelectedIndex() );
String selectedText = box.getItemText( box.getSelectedIndex() );
OperatorSelection selection = new OperatorSelection( selected,
selectedText );
operatorChanged( selection );
ValueChangeEvent.fire( source,
selection );
}
} );
代码示例来源: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 ) );
}
}
} );
内容来源于网络,如有侵权,请联系作者删除!