コード例 #1
0
 @Override
 public void setReadOnly(boolean readOnly) {
   this.readOnly = readOnly;
   addPropertyButton.setEnabled(!readOnly);
   newPropertyValueTextBox.setReadOnly(readOnly);
   newPropertyNameTextBox.setReadOnly(readOnly);
 }
コード例 #2
0
 @Override
 public void setReadOnly(boolean readOnly) {
   address_street.setReadOnly(readOnly);
   address_num.setReadOnly(readOnly);
   address_cp.setReadOnly(readOnly);
   address_city.setReadOnly(readOnly);
   address_country.setReadOnly(readOnly);
 }
コード例 #3
0
 @Override
 public void setReadOnly(boolean readOnly) {
   persistenceUnitTextBox.setReadOnly(readOnly);
   persistenceProviderTextBox.setReadOnly(readOnly);
   datasourceTextBox.setReadOnly(readOnly);
   transactionTypeJTARadioButton.setEnabled(!readOnly);
   transactionTypeResourceLocalRadioButton.setEnabled(!readOnly);
   persistenceUnitProperties.setReadOnly(readOnly);
   persistenceUnitClasses.setReadOnly(readOnly);
 }
  private Widget createValuePairItem(
      final Annotation annotation,
      final AnnotationValuePairDefinition valuePairDefinition,
      final AnnotationSource annotationSource) {
    final Row valuePairRow = new Row();
    final FormGroup formGroup = new FormGroup();
    valuePairRow.add(formGroup);

    final FormLabel formLabel = new FormLabel();
    formLabel.addStyleName(ColumnSize.MD_3.getCssName());
    formLabel.setText(valuePairDefinition.getName());
    formGroup.add(formLabel);

    final Column column = new Column(ColumnSize.MD_9);
    formGroup.add(column);
    final TextBox content = new TextBox();
    column.add(content);
    final String valuePairString =
        getValuePairStringValue(annotation, valuePairDefinition, annotationSource);
    content.setText(valuePairString);
    content.setReadOnly(true);
    content.setTitle(valuePairString);

    final Button editButton =
        new Button(
            Constants.INSTANCE.advanced_domain_annotation_list_editor_action_edit(),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                presenter.onEditValuePair(annotation, valuePairDefinition.getName());
              }
            });
    editButton.setEnabled(!readonly);
    editButton.setIcon(IconType.EDIT);

    final Button clearButton =
        new Button(
            Constants.INSTANCE.advanced_domain_annotation_list_editor_action_clear(),
            new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                presenter.onClearValuePair(annotation, valuePairDefinition.getName());
              }
            });
    clearButton.setEnabled(!readonly);
    clearButton.setIcon(IconType.ERASER);

    final FormGroup formGroupButton = new FormGroup();
    formGroupButton.add(editButton);
    formGroupButton.add(clearButton);
    final Column columnButton = new Column(ColumnSize.MD_9);
    columnButton.setOffset(ColumnOffset.MD_3);
    columnButton.add(formGroupButton);
    valuePairRow.add(columnButton);

    return valuePairRow;
  }
コード例 #5
0
 @Override
 public void setReadOnly(boolean readOnly) {
   department_name.setReadOnly(readOnly);
   department_address.setReadOnly(readOnly);
   department_description.setReadOnly(readOnly);
 }
コード例 #6
0
 public void setReadOnly(final boolean readOnly) {
   textBox.setReadOnly(readOnly);
 }