Java 类com.google.gwt.user.client.ui.ValueListBox 实例源码

项目:gerrit    文件:AccessSectionEditor.java   
public AccessSectionEditor(ProjectAccess access) {
  projectAccess = access;
  permissionSelector = new ValueListBox<>(new PermissionNameRenderer(access.getCapabilities()));
  permissionSelector.addValueChangeHandler(
      new ValueChangeHandler<String>() {
        @Override
        public void onValueChange(ValueChangeEvent<String> event) {
          if (!AdminConstants.I.addPermission().equals(event.getValue())) {
            onAddPermission(event.getValue());
          }
        }
      });

  initWidget(uiBinder.createAndBindUi(this));
  permissions = ListEditor.of(new PermissionEditorSource());
}
项目:kaa    文件:EventClassViewImpl.java   
@Override
protected void initDetailsTable() {
  super.initDetailsTable();

  this.eventClassTypeName = new ValueListBox<String>();
  this.eventClassTypeName.addValueChangeHandler(new ValueChangeHandler<String>() {
    @Override
    public void onValueChange(ValueChangeEvent<String> event) {
      EventClassViewImpl.this.fireChanged();
    }
  });
  this.eventClassTypeName.setWidth("100%");

  Label label = new Label("Class type");
  label.addStyleName(this.avroUiStyle.requiredField());
  detailsTable.setWidget(4, 0, label);

  this.detailsTable.setWidget(4, 1, this.eventClassTypeName);

}
项目:samplegwt    文件:PersonEditor.java   
private void initPersonalTitle() {
    personalTitleListBox = new ValueListBox<PersonalTitle>(new Renderer<PersonalTitle>() {

        @Override
        public String render(PersonalTitle object) {
            return object != null ? object.toString() : "";
        }

        @Override
        public void render(PersonalTitle object, Appendable appendable)
                throws IOException {
            appendable.append(render(object));
        }
    });
    List<PersonalTitle> titles = new ArrayList<PersonalTitle>();
    titles.add(null);
    titles.addAll(Arrays.asList(PersonalTitle.values()));
    personalTitleListBox.setAcceptableValues(titles);
}
项目:kaa    文件:ApplicationActivity.java   
@Override
protected void onEntityRetrieved() {
  if (!create) {
    detailsView.setTitle(entity.getName());
    detailsView.getApplicationToken().setValue(entity.getApplicationToken());
  }
  detailsView.getApplicationName().setValue(entity.getName());

  final ValueListBox<String> serviceNames = this.detailsView.getCredentialsServiceName();
  if (serviceNames != null) {
    KaaAdmin.getDataSource().getCredentialsServiceNames(new AsyncCallback<List<String>>() {

      @Override
      public void onFailure(Throwable caught) {
        Utils.handleException(caught, ApplicationActivity.this.detailsView);
      }

      @Override
      public void onSuccess(List<String> result) {
        if (result != null && !result.isEmpty()) {
          serviceNames.setValue(result.get(0));
        }
        ApplicationActivity.this.detailsView.getCredentialsServiceName()
            .setAcceptableValues(result);
      }
    });
    serviceNames.setValue(this.entity.getCredentialsServiceName());
  }
}
项目:kaa    文件:EventClassActivity.java   
@Override
protected void onEntityRetrieved() {
  super.onEntityRetrieved();
  ValueListBox<String> eventClassTypes = this.detailsView.getEventClassTypes();
  if (eventClassTypes != null) {
    List<String> eventClassTypeList = new ArrayList<>();
    for (EventClassType eventClassType : EventClassType.values()) {
      eventClassTypeList.add(eventClassType.name());
    }
    EventClassActivity.this.detailsView
        .getEventClassTypes()
        .setAcceptableValues(eventClassTypeList);
  }

  if (place.getCtlSchemaId() != null) {
    KaaAdmin.getDataSource().getLastCtlSchemaReferenceDto(place.getCtlSchemaId(),
        new AsyncCallback<CtlSchemaReferenceDto>() {

          @Override
          public void onFailure(Throwable caught) {
            Utils.handleException(caught, EventClassActivity.this.detailsView);
          }

          @Override
          public void onSuccess(CtlSchemaReferenceDto ctlSchemaReferenceDto) {
            detailsView.getCtlSchemaReference().setValue(ctlSchemaReferenceDto);
            detailsView.getName().setValue(place.getNameEc());
            place.setCtlSchemaId(null);
          }
        });
  }
}
项目:sandbox-frame    文件:ChangeKaaHostViewImpl.java   
@Override
public ValueListBox<LogLevel> getLevelListBox() {
    return levelListBox;
}
项目:gerrit    文件:RangeBox.java   
List() {
  list = new ValueListBox<>(rangeRenderer);
  initWidget(list);
}
项目:GWTModelWeight    文件:UVPackDataEditor.java   
@Ignore
public <T> ValueListBox<T> createToStringListBox(){
    return createToStringListBox(null,null);
}
项目:kaa    文件:UpdateUserConfigViewImpl.java   
@Override
public ValueListBox<SchemaInfoDto> getConfigurationSchemaInfo() {
  return configurationSchemaInfo;
}
项目:kaa    文件:GetUserConfigViewImpl.java   
@Override
public ValueListBox<SchemaInfoDto> getConfigurationSchemaInfo() {
  return configurationSchemaInfo;
}
项目:kaa    文件:BasePluginViewImpl.java   
@Override
public ValueListBox<PluginInfoDto> getPluginInfo() {
  return pluginInfo;
}
项目:kaa    文件:ApplicationViewImpl.java   
@Override
protected void initDetailsTable() {
  applicationName = new KaaAdminSizedTextBox(DEFAULT_TEXTBOX_SIZE, editable);
  applicationName.setWidth("100%");
  Label titleLabel = new Label(Utils.constants.title());
  if (editable) {
    titleLabel.addStyleName(avroUiStyle.requiredField());
  }
  detailsTable.setWidget(0, 0, titleLabel);
  detailsTable.setWidget(0, 1, applicationName);

  applicationName.addInputHandler(this);
  applicationName.setFocus(true);

  if (!create) {
    applicationToken = new KaaAdminSizedTextBox(DEFAULT_TEXTBOX_SIZE * 2, false);
    applicationToken.setWidth("100%");
    applicationToken.setEnabled(false);
    applicationToken.setReadOnly(true);

    Label tokenLabel = new Label(Utils.constants.appToken());
    detailsTable.setWidget(2, 0, tokenLabel);
    detailsTable.setWidget(2, 1, applicationToken);
  }

  if (KaaAdmin.isDevMode()) {
    generateSdkButton = new Button(Utils.constants.generateSdk());
    detailsTable.setWidget(3, 0, generateSdkButton);
  } else {
    this.credentialsServiceName = new ValueListBox<String>();
    this.credentialsServiceName.addValueChangeHandler(new ValueChangeHandler<String>() {
      @Override
      public void onValueChange(ValueChangeEvent<String> event) {
        ApplicationViewImpl.this.fireChanged();
      }
    });
    this.credentialsServiceName.setWidth("100%");

    Label label = new Label(Utils.constants.credentialsService());
    label.addStyleName(this.avroUiStyle.requiredField());

    this.detailsTable.setWidget(3, 0, label);
    this.detailsTable.setWidget(3, 1, this.credentialsServiceName);
  }
}
项目:kaa    文件:ApplicationViewImpl.java   
@Override
public ValueListBox<String> getCredentialsServiceName() {
  return this.credentialsServiceName;
}
项目:kaa    文件:CtlSchemaViewImpl.java   
@Override
public ValueListBox<Integer> getVersion() {
  return version;
}
项目:kaa    文件:EventClassViewImpl.java   
@Override
public ValueListBox<String> getEventClassTypes() {
  return eventClassTypeName;
}
项目:kaa    文件:AddSdkProfileViewImpl.java   
@Override
public ValueListBox<VersionDto> getConfigurationSchemaVersion() {
  return configurationSchemaVersion;
}
项目:kaa    文件:AddSdkProfileViewImpl.java   
@Override
public ValueListBox<VersionDto> getProfileSchemaVersion() {
  return profileSchemaVersion;
}
项目:kaa    文件:AddSdkProfileViewImpl.java   
@Override
public ValueListBox<VersionDto> getNotificationSchemaVersion() {
  return notificationSchemaVersion;
}
项目:kaa    文件:AddSdkProfileViewImpl.java   
@Override
public ValueListBox<VersionDto> getLogSchemaVersion() {
  return logSchemaVersion;
}
项目:kaa    文件:AddSdkProfileViewImpl.java   
@Override
public ValueListBox<UserVerifierDto> getDefaultUserVerifier() {
  return defaultUserVerifier;
}
项目:kaa    文件:LogAppenderViewImpl.java   
@Override
public ValueListBox<Integer> getMinSchemaVersion() {
  return minSchemaVersion;
}
项目:kaa    文件:LogAppenderViewImpl.java   
@Override
public ValueListBox<Integer> getMaxSchemaVersion() {
  return maxSchemaVersion;
}
项目:kaa    文件:SendNotificationViewImpl.java   
@Override
public ValueListBox<SchemaInfoDto> getNotificationSchemaInfo() {
  return notificationSchemaInfo;
}
项目:gwtmockito    文件:GwtMockitoTestRunner.java   
/**
 * Returns a collection of classes whose non-abstract methods should always be replaced with
 * no-ops. By default, this list includes {@link Composite}, {@link DOM} {@link UIObject},
 * {@link Widget}, {@link Image}, and most subclasses of {@link Panel}. It will also include any
 * classes specified via the {@link WithClassesToStub} annotation on the test class. This makes
 * it much safer to test code that uses or extends these types.
 * <p>
 * This list can be customized via {@link WithClassesToStub} or by defining a new test runner
 * extending {@link GwtMockitoTestRunner} and overriding this method. This allows users to
 * explicitly stub out particular classes that are causing problems in tests. If you override this
 * method, you will probably want to retain the classes that are stubbed here by doing something
 * like this:
 *
 * <pre>
 * &#064;Override
 * protected Collection&lt;Class&lt;?&gt;&gt; getClassesToStub() {
 *   Collection&lt;Class&lt;?&gt;&gt; classes = super.getClassesToStub();
 *   classes.add(MyBaseWidget.class);
 *   return classes;
 * }
 * </pre>
 *
 * @return a collection of classes whose methods should be stubbed with no-ops while running tests
 */
protected Collection<Class<?>> getClassesToStub() {
  Collection<Class<?>> classes = new LinkedList<Class<?>>();
  classes.add(Composite.class);
  classes.add(DOM.class);
  classes.add(UIObject.class);
  classes.add(Widget.class);

  classes.add(DataGrid.class);
  classes.add(HTMLTable.class);
  classes.add(Image.class);

  classes.add(AbsolutePanel.class);
  classes.add(CellList.class);
  classes.add(CellPanel.class);
  classes.add(CellTable.class);
  classes.add(ComplexPanel.class);
  classes.add(DeckLayoutPanel.class);
  classes.add(DeckPanel.class);
  classes.add(DecoratorPanel.class);
  classes.add(DockLayoutPanel.class);
  classes.add(DockPanel.class);
  classes.add(FlowPanel.class);
  classes.add(FocusPanel.class);
  classes.add(HorizontalPanel.class);
  classes.add(HTMLPanel.class);
  classes.add(LayoutPanel.class);
  classes.add(Panel.class);
  classes.add(PopupPanel.class);
  classes.add(RenderablePanel.class);
  classes.add(ResizeLayoutPanel.class);
  classes.add(SimpleLayoutPanel.class);
  classes.add(SimplePanel.class);
  classes.add(SplitLayoutPanel.class);
  classes.add(StackPanel.class);
  classes.add(VerticalPanel.class);
  classes.add(ValueListBox.class);

  WithClassesToStub annotation = unitTestClass.getAnnotation(WithClassesToStub.class);
  if (annotation != null) {
    classes.addAll(Arrays.asList(annotation.value()));
  }

  return classes;
}
项目:gwtmockito    文件:GwtMockitoTest.java   
@Test
@SuppressWarnings("unused")
public void shouldBeAbleToCreateValueListBox() {
  new ValueListBox<Object>();
}
项目:sandbox-frame    文件:ChangeKaaHostView.java   
ValueListBox<LogLevel> getLevelListBox();
项目:kaa    文件:SendNotificationView.java   
ValueListBox<SchemaInfoDto> getNotificationSchemaInfo();
项目:kaa    文件:BasePluginView.java   
ValueListBox<PluginInfoDto> getPluginInfo();
项目:kaa    文件:CtlSchemaView.java   
public ValueListBox<Integer> getVersion();
项目:kaa    文件:ApplicationView.java   
ValueListBox<String> getCredentialsServiceName();
项目:kaa    文件:LogAppenderView.java   
ValueListBox<Integer> getMinSchemaVersion();
项目:kaa    文件:LogAppenderView.java   
ValueListBox<Integer> getMaxSchemaVersion();
项目:kaa    文件:GetUserConfigView.java   
ValueListBox<SchemaInfoDto> getConfigurationSchemaInfo();
项目:kaa    文件:EventClassView.java   
ValueListBox<String> getEventClassTypes();
项目:kaa    文件:AddSdkProfileView.java   
ValueListBox<VersionDto> getConfigurationSchemaVersion();
项目:kaa    文件:AddSdkProfileView.java   
ValueListBox<VersionDto> getProfileSchemaVersion();
项目:kaa    文件:AddSdkProfileView.java   
ValueListBox<VersionDto> getNotificationSchemaVersion();
项目:kaa    文件:AddSdkProfileView.java   
ValueListBox<VersionDto> getLogSchemaVersion();
项目:kaa    文件:AddSdkProfileView.java   
ValueListBox<UserVerifierDto> getDefaultUserVerifier();
项目:kaa    文件:UpdateUserConfigView.java   
ValueListBox<SchemaInfoDto> getConfigurationSchemaInfo();