本文整理了Java中com.google.gwt.user.client.ui.ListBox.setVisible()
方法的一些代码示例,展示了ListBox.setVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ListBox.setVisible()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.ListBox
类名称:ListBox
方法名:setVisible
[英]Sets the number of items that are visible. If only one item is visible, then the box will be displayed as a drop-down list.
[中]设置可见的项目数。如果只有一个项目可见,则该框将显示为下拉列表。
代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt
@Override
public void onClick(final ClickEvent event) {
providersList.setVisible( true );
}
} );
代码示例来源:origin: bedatadriven/activityinfo
@Override
public void stop() {
operandListBox.setVisible(false);
}
};
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
private void toggleViewElements(final boolean showPredicateElements) {
fieldTextBox.setVisible(showPredicateElements);
predicateFieldDescription.hidden = !showPredicateElements;
fieldList.setVisible(!showPredicateElements);
fieldListDescription.hidden = showPredicateElements;
}
}
代码示例来源:origin: kiegroup/drools-wb
private void toggleViewElements(final boolean showPredicateElements) {
fieldTextBox.setVisible(showPredicateElements);
predicateFieldDescription.hidden = !showPredicateElements;
fieldList.setVisible(!showPredicateElements);
fieldListDescription.hidden = showPredicateElements;
}
}
代码示例来源:origin: org.drools/drools-wb-guided-dtable-editor-client
@Override
public void hidePatternListWhenItIsEmpty() {
patternList.setVisible(patternList.getItemCount() > 1);
}
代码示例来源:origin: org.kie.guvnor/guvnor-commons-ui
private void setTimeVisible( boolean visible ) {
hours.setVisible( visible );
minutes.setVisible( visible );
timeHyphenLabel.setVisible( visible );
timeColonLabel.setVisible( visible );
}
代码示例来源:origin: org.jboss.errai/errai-widgets
public void stopedit() {
listBox.setVisible(false);
wsCellReference.stopedit();
}
}
代码示例来源:origin: kiegroup/drools-wb
@Override
public void hidePatternListWhenItIsEmpty() {
patternList.setVisible(patternList.getItemCount() > 1);
}
代码示例来源:origin: org.kie.guvnor/guvnor-test-scenario-editor-client
public void onChange(ChangeEvent event) {
String s = drop.getValue(drop.getSelectedIndex());
if (s.equals("inc")) { //NON-NLS
sc.setInclusive(true);
add.setVisible(true);
remove.setVisible(true);
box.setVisible(true);
} else if (s.equals("exc")) { //NON-NLS
sc.setInclusive(false);
add.setVisible(true);
remove.setVisible(true);
box.setVisible(true);
} else {
sc.getRules().clear();
box.clear();
box.setVisible(false);
add.setVisible(false);
remove.setVisible(false);
}
}
});
代码示例来源:origin: com.github.jdramaix/gwtchosen
@Override
public void setVisible(boolean visible) {
this.visible = visible;
if (isSupported()) {
GQuery chosenElement = getChosenElement();
if (visible) {
chosenElement.show();
} else {
chosenElement.hide();
}
} else {
super.setVisible(visible);
}
}
代码示例来源:origin: bedatadriven/activityinfo
@Override
public void init(FormField field, FieldValue value) {
operandListBox.setVisible(true);
EnumType type = (EnumType) field.getType();
this.enumItems = type.getValues();
operandListBox.clear();
for (EnumItem enumItem : enumItems) {
operandListBox.addItem(enumItem.getLabel());
}
if(value instanceof EnumValue) {
selectEnumItem(((EnumValue) value));
}
}
代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt
@Override
public void onChange(final ChangeEvent event) {
final EIURI selectedUri = EIURI.create( providersList.getValue( providersList.getSelectedIndex() ) );
final EIEntity selectedEntity = resourceProviderCache.getResourceProvider( selectedUri );
providersList.setVisible( false );
if ( selectedEntity == null || selectedEntity.equals( EIEntity.NULL_ENTITY ) ) {
return;
}
ApplicationState.getInstance().updateApplicationState( Mode.view, selectedEntity, ResourceProvider.BASE_RESOURCE_CONTAINER, selectedEntity );
}
} );
代码示例来源:origin: kiegroup/drools-wb
@Test
public void testEnableTextField() {
view.enablePredicateFieldView();
verify(fieldList).setVisible(false);
verify(fieldTextBox).setVisible(true);
assertTrue(fieldListDescription.hidden);
assertFalse(predicateFieldDescription.hidden);
}
代码示例来源:origin: org.jboss.errai/errai-widgets
public boolean edit(WSGrid.WSCell element) {
wsCellReference = element;
editCellReference = this;
Style s = listBox.getElement().getStyle();
s.setProperty("left", element.getAbsoluteLeft() + "px");
s.setProperty("top", element.getAbsoluteTop() + "px");
listBox.clear();
int i = 0;
for (String v : values) {
listBox.addItem(v);
if (html.getHTML().equals(v)) listBox.setSelectedIndex(i);
i++;
}
listBox.setVisible(true);
listBox.setFocus(true);
return true;
}
代码示例来源:origin: kiegroup/drools-wb
@Test
public void testEnableFieldList() {
view.enableListFieldView();
verify(fieldList).setVisible(true);
verify(fieldTextBox).setVisible(false);
assertFalse(fieldListDescription.hidden);
assertTrue(predicateFieldDescription.hidden);
}
代码示例来源:origin: org.kie.guvnor/guvnor-commons-ui
public WorkItemObjectParameterWidget( PortableObjectParameterDefinition ppd,
IBindingProvider bindingProvider,
boolean isReadOnly ) {
super( ppd,
bindingProvider );
//Setup widget to use bindings
this.parameterName.setText( ppd.getName() );
Set<String> bindings = bindingProvider.getBindings( ppd.getClassName() );
if ( bindings.size() > 0 ) {
lstAvailableBindings.clear();
lstAvailableBindings.addItem( CommonConstants.INSTANCE.Choose() );
lstAvailableBindings.setEnabled( true && !isReadOnly );
lstAvailableBindings.setVisible( true );
int selectedIndex = 0;
for ( String binding : bindings ) {
lstAvailableBindings.addItem( binding );
if ( binding.equals( ppd.getBinding() ) ) {
selectedIndex = lstAvailableBindings.getItemCount() - 1;
}
}
lstAvailableBindings.setSelectedIndex( selectedIndex );
}
}
代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt
private void initWorkflowFilter(final EIEntity filterWorkflowEntity) {
statusFilter.setVisible( true );
statusLabel.setVisible( true );
statusFilter.addItem( genericOption );
for (final WorkflowState state : WorkflowState.values()) {
statusFilter.addItem( state.getLabel(), state.getUri().toString() );
if ( state.getEntity().equals( filterWorkflowEntity ) ) {
statusFilter.setSelectedIndex( statusFilter.getItemCount() - 1 );
}
}
}
代码示例来源:origin: org.kie.guvnor/guvnor-guided-rule-editor-client
public DSLCheckBox( String variableDef,
DSLVariableValue value ) {
resultWidget = new ListBox();
resultWidget.addItem( "true" );
resultWidget.addItem( "false" );
if ( value.getValue().equalsIgnoreCase( "true" ) ) {
resultWidget.setSelectedIndex( 0 );
} else {
resultWidget.setSelectedIndex( 1 );
}
resultWidget.addChangeHandler( new ChangeHandler() {
public void onChange( ChangeEvent event ) {
updateSentence();
makeDirty();
}
} );
resultWidget.setVisible( true );
//Wrap widget within a HorizontalPanel to add a space before and after the Widget
HorizontalPanel hp = new HorizontalPanel();
hp.add( new HTML( " " ) );
hp.add( resultWidget );
hp.add( new HTML( " " ) );
initWidget( hp );
}
代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt
private void initSubTypeFilter(final EIEntity filterTypeEntity) {
resourceTypeFilter.setVisible( false );
resourceTypeLabel.setVisible( false );
classChooser = new SharedClassChooser<OntologyDropdown>(ApplicationState.getInstance().getModelURL(), new OntologyDropdown() );
classChooser.setTextBoxStyle( "formText" );
classChooser.setVisible( false );
filterLabel.setVisible( false );
subTypeFilter.add( classChooser );
subTypeLabel.setVisible( false );
subTypeFilter.setVisible( true );
ClientModelManager.INSTANCE.getClass( ApplicationState.getInstance().getTypeUri(), new ModelRootAsyncCallback<EIClass>() {
@Override
public void onSuccess(final EIClass result) {
filterLabel.setVisible( true );
classChooser.setVisible( true );
classChooser.setClass( result, false );
classChooser.setSelectedEntity( filterTypeEntity );
}
} );
}
代码示例来源:origin: org.eagle-i/eagle-i-datatools-sweet-gwt
providersList.setVisible( false );
if ( resourceProviderCache.isLoading() ) {
providersList.addItem( "loading..." );
内容来源于网络,如有侵权,请联系作者删除!