Examples of EditTextCell


Examples of com.google.gwt.cell.client.EditTextCell

            @Override
            public String getValue( final EnumRow enumRow ) {
                return "";
            }
        };
        final Column<EnumRow, String> factNameColumn = new Column<EnumRow, String>( new EditTextCell() ) {
            @Override
            public String getValue( final EnumRow enumRow ) {
                return enumRow.getFactName();
            }
        };
        final Column<EnumRow, String> fieldNameColumn = new Column<EnumRow, String>( new EditTextCell() ) {
            @Override
            public String getValue( final EnumRow enumRow ) {
                return enumRow.getFieldName();
            }
        };
        final Column<EnumRow, String> contextColumn = new Column<EnumRow, String>( new EditTextCell() ) {
            @Override
            public String getValue( final EnumRow enumRow ) {
                return enumRow.getContext();
            }
        };
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

                attributeCellTable.redraw();
            }
        } );

        //Partial Score column
        final EditTextCell partialScoreCell = new EditTextCell();
        final Column<Attribute, String> partialScoreColumn = new Column<Attribute, String>( partialScoreCell ) {
            public String getValue( final Attribute attribute ) {
                return "" + attribute.getPartialScore();
            }
        };
        partialScoreColumn.setFieldUpdater( new FieldUpdater<Attribute, String>() {
            public void update( int index,
                                Attribute object,
                                String value ) {
                try {
                    double d = Double.parseDouble( value );
                    object.setPartialScore( d );
                } catch ( Exception e1 ) {
                    partialScoreCell.clearViewData( object );
                }
                attributeCellTable.redraw();
            }
        } );

        //Reason Code column
        final Column<Attribute, String> reasonCodeColumn = new Column<Attribute, String>( new EditTextCell() ) {
            public String getValue( final Attribute attribute ) {
                return attribute.getReasonCode();
            }
        };
        reasonCodeColumn.setFieldUpdater( new FieldUpdater<Attribute, String>() {
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

        public String getValue(Dto object) {
          return String.valueOf(object.get(fieldName));
        }
      };
    } else {
      return new Column<Dto, String>(new EditTextCell()) {
        @Override
        public String getValue(Dto object) {
          return String.valueOf(object.get(fieldName));
        }
      };
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

    // init editor
    editor = new CellTable<PropertyUpdateInfo>();
    editor.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.ENABLED);

    {
      final EditTextCell cell = new EditTextCell();
      Column<PropertyUpdateInfo, String> column = new Column<PropertyUpdateInfo, String>(cell) {
        @Override
        public String getValue(PropertyUpdateInfo entry) {
          return isNullOrEmpty(entry.getNewName()) ? entry.getName() : entry.getNewName();
        }
      };
     
      column.setFieldUpdater(new FieldUpdater<PropertyUpdateInfo, String>() {
        @Override
        public void update(int index, PropertyUpdateInfo entry, String value) {          
          if (isValid(entry, value)) {
            entry.setNewName(value);
            dataProvider.refresh();
          } else {
            // restore old value
            cell.clearViewData(entry);
            editor.redraw();           
          }
        }
       
        private boolean isValid(PropertyUpdateInfo entry, String value) {
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

    }
   
    // blob key hash
    {
      SortableColumn<BlobInfoDTO, String> column =
        new SortableColumn<BlobInfoDTO, String>(new EditTextCell()) {
        @Override
        public String getValue(BlobInfoDTO o) {     
          return o.getBlobKeyStr();
        }
      };
     
      column.setFieldUpdater(new FieldUpdater<BlobInfoDTO, String>() {
        @Override
        public void update(int index, BlobInfoDTO object, String value) {
          // do nothing, simply provide a way for users to copy value
        }
      });
     
      blobInfoTable.addColumn(column,  SafeHtmlUtils.fromSafeConstant("Key String<br/>(click to select)"));
      blobInfoTable.setColumnWidth(column, "100pt");
    }
   
    // md5 hash
    {
      SortableColumn<BlobInfoDTO, String> column =
        new SortableColumn<BlobInfoDTO, String>(new EditTextCell()) {
        @Override
        public String getValue(BlobInfoDTO o) {     
          return o.getMd5Hash();
        }
      };
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

        col.setSortable(true);
        return col;
    }

    private Column<T, String> createTextColumn() {
        Column<T, String> col = new Column<T, String>(new EditTextCell()) {

            @Override
            public String getValue(T t) {
                return presenter.getText(t);
            }
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

                    attributeCellTable.redraw();
                }
            } );
        }
        //Partial Score column
        final EditTextCell partialScoreCell = new EditTextCell();
        final Column<Attribute, String> partialScoreColumn = new Column<Attribute, String>( partialScoreCell ) {
            public String getValue( final Attribute attribute ) {
                return "" + attribute.getPartialScore();
            }
        };
        partialScoreColumn.setFieldUpdater( new FieldUpdater<Attribute, String>() {
            public void update( int index,
                                Attribute object,
                                String value ) {
                try {
                    double d = Double.parseDouble( value );
                    object.setPartialScore( d );
                } catch ( Exception e1 ) {
                    partialScoreCell.clearViewData( object );
                }
                attributeCellTable.redraw();
            }
        } );

        //Reason Code column
        final Column<Attribute, String> reasonCodeColumn = new Column<Attribute, String>( new EditTextCell() ) {
            public String getValue( final Attribute attribute ) {
                return attribute.getReasonCode();
            }
        };
        reasonCodeColumn.setFieldUpdater( new FieldUpdater<Attribute, String>() {
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

                attributeCellTable.redraw();
            }
        } );

        //Partial Score column
        final EditTextCell partialScoreCell = new EditTextCell();
        final Column<Attribute, String> partialScoreColumn = new Column<Attribute, String>( partialScoreCell ) {
            public String getValue( final Attribute attribute ) {
                return "" + attribute.getPartialScore();
            }
        };
        partialScoreColumn.setFieldUpdater( new FieldUpdater<Attribute, String>() {
            public void update( int index,
                                Attribute object,
                                String value ) {
                try {
                    double d = Double.parseDouble( value );
                    object.setPartialScore( d );
                } catch ( Exception e1 ) {
                    partialScoreCell.clearViewData( object );
                }
                attributeCellTable.redraw();
            }
        } );

        //Reason Code column
        final Column<Attribute, String> reasonCodeColumn = new Column<Attribute, String>( new EditTextCell() ) {
            public String getValue( final Attribute attribute ) {
                return attribute.getReasonCode();
            }
        };
        reasonCodeColumn.setFieldUpdater( new FieldUpdater<Attribute, String>() {
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

            {
                return "";
            }
        };

         Column<EnumRow,String> columnFirst = new Column<EnumRow, String>(new EditTextCell()) {


            @Override
            public String getValue(EnumRow enumRow) {
                return enumRow.getFactName();
            }
        } ;
        Column<EnumRow,String> columnSecond = new Column<EnumRow, String>(new EditTextCell()) {


            @Override
            public String getValue(EnumRow enumRow) {
                return enumRow.getFieldName();
            }
        } ;
        Column<EnumRow,String> columnThird = new Column<EnumRow, String>(new EditTextCell()) {


            @Override
            public String getValue(EnumRow enumRow) {
                return enumRow.getContext();
View Full Code Here

Examples of com.google.gwt.cell.client.EditTextCell

    cellTable.addColumn(checkColumn, SafeHtmlUtils.fromSafeConstant("<br/>"));
    cellTable.setColumnWidth(checkColumn, 40, Unit.PX);

    // First name.
    Column<ContactInfo, String> firstNameColumn = new Column<ContactInfo, String>(
        new EditTextCell()) {
      @Override
      public String getValue(ContactInfo object) {
        return object.getFirstName();
      }
    };
    firstNameColumn.setSortable(true);
    sortHandler.setComparator(firstNameColumn, new Comparator<ContactInfo>() {
      public int compare(ContactInfo o1, ContactInfo o2) {
        return o1.getFirstName().compareTo(o2.getFirstName());
      }
    });
    cellTable.addColumn(firstNameColumn, constants.cwCellTableColumnFirstName());
    firstNameColumn.setFieldUpdater(new FieldUpdater<ContactInfo, String>() {
      public void update(int index, ContactInfo object, String value) {
        // Called when the user changes the value.
        object.setFirstName(value);
        ContactDatabase.get().refreshDisplays();
      }
    });
    cellTable.setColumnWidth(firstNameColumn, 20, Unit.PCT);

    // Last name.
    Column<ContactInfo, String> lastNameColumn = new Column<ContactInfo, String>(
        new EditTextCell()) {
      @Override
      public String getValue(ContactInfo object) {
        return object.getLastName();
      }
    };
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.