Package com.google.gwt.user.client.ui

Examples of com.google.gwt.user.client.ui.HasText


        Object widgetValue =
            Convert.toWidgetValue(widget, propertyTypes.get(property).getType(), newValue, converter);
        hv.setValue(widgetValue);
      }
      else if (widget instanceof HasText) {
        HasText ht = (HasText) widget;
        Object widgetValue =
            Convert.toWidgetValue(String.class, propertyTypes.get(property).getType(), newValue, converter);
        ht.setText((String) widgetValue);
      }
    }

    firePropertyChangeEvent(property, oldValue, newValue);
  }
View Full Code Here


public class LoadViewMock implements Display {
  private final HasText indicator;
  private boolean visible = false;

  public LoadViewMock() {
    this.indicator = new HasText() {
      private String text = "";

      @Override
      public void setText(String text) {
        this.text  = text;
View Full Code Here

    this.viewMock.showLoadingIndicator(false);
    expectLastCall();
    this.viewMock.showLoadingIndicator(true);
    expectLastCall();
   
    final HasText h = new HasText() {
      private String text = "";
      @Override
      public void setText(final String text) {
        this.text = text;
      }
View Full Code Here

                (HasValidationResult) this.getWidget(row, DOC_COLUMN);
        panel.setValidationResult(status);
    }

    public void updateLastTranslatedInfo(int row, AuditInfo lastTranslated) {
        HasText label = (HasText) this.getWidget(row, LAST_TRANSLATED_COLUMN);
        label.setText(getAuditInfo(lastTranslated));
    }
View Full Code Here

            graph.setVisible(true);

            Image loading = (Image) panel.getWidget(1);
            loading.setVisible(false);

            HasText translated = (HasText) this.getWidget(row, COMPLETE_COLUMN);
            HasText untranslated =
                    (HasText) this.getWidget(row, INCOMPLETE_COLUMN);

            graph.setStatOption(statsByWords);

            String locale =
                    userWorkspaceContext.getWorkspaceContext().getWorkspaceId()
                            .getLocaleId().toString();
            TranslationStatistics wordStats =
                    stats.getStats(locale, StatUnit.WORD);

            if (statsByWords) {
                translated.setText(String.valueOf(wordStats
                        .getTranslatedAndApproved()));
                untranslated.setText(String.valueOf(wordStats.getIncomplete()));
            } else {

                TranslationStatistics msgStats =
                        stats.getStats(locale, StatUnit.MESSAGE);

                translated.setText(String.valueOf(msgStats
                        .getTranslatedAndApproved()));
                untranslated.setText(String.valueOf(msgStats.getIncomplete()));
            }

            HasText remainingHour =
                    (HasText) this.getWidget(row, REMAINING_COLUMN);
            remainingHour.setText(messages.statusBarLabelHours(TextFormatUtil
                    .formatHours(wordStats.getRemainingHours())));
        }
    }
View Full Code Here

        FlowPanel panel = (FlowPanel) this.getWidget(row, STATS_COLUMN);

        TransUnitCountBar graph = (TransUnitCountBar) panel.getWidget(0);
        graph.setStatOption(statsByWords);

        HasText completed = (HasText) this.getWidget(row, COMPLETE_COLUMN);
        HasText incomplete = (HasText) this.getWidget(row, INCOMPLETE_COLUMN);

        if (statsByWords) {
            completed.setText(String.valueOf(graph.getWordsApproved()
                    + graph.getWordsTranslated()));
            incomplete.setText(String.valueOf(graph.getWordsUntranslated()
                    + graph.getWordsDraft()));
        } else {
            completed.setText(String.valueOf(graph.getUnitApproved()
                    + graph.getUnitTranslated()));
            incomplete.setText(String.valueOf(graph.getUnitUntranslated()
                    + graph.getUnitDraft()));
        }
    }
View Full Code Here

      Object widgetValue =
          Convert.toWidgetValue(widget, propertyTypes.get(property).getType(), newValue, converters.get(property));
      hv.setValue(widgetValue, true);
    }
    else if (widget instanceof HasText) {
      HasText ht = (HasText) widget;
      Object widgetValue =
          Convert
              .toWidgetValue(String.class, propertyTypes.get(property).getType(), newValue, converters.get(property));
      ht.setText((String) widgetValue);
    }

    knownValues.put(property, newValue);
    PropertyChangeEvent<P> event = new PropertyChangeEvent<P>(proxy, property, oldValue, newValue);
    propertyChangeHandlerSupport.notifyHandlers(event);
View Full Code Here

              Convert.toWidgetValue(widget, propertyTypes.get(property).getType(), value, converters.get(property));
          hasValue.setValue(widgetValue);
        }
      }
      else if (widget instanceof HasText) {
        HasText hasText = (HasText) widget;
        value = initialState.getInitialValue(proxy.get(property), hasText.getText());
        if (initialState == InitialState.FROM_MODEL) {
          Object widgetValue =
              Convert.toWidgetValue(String.class, propertyTypes.get(property).getType(), value, converters
                  .get(property));
          hasText.setText((String) widgetValue);
        }
      }
      if (initialState == InitialState.FROM_UI) {
        proxy.set(property, value);
      }
View Full Code Here

      Object widgetValue =
          Convert.toWidgetValue(widget, propertyTypes.get(property).getType(), newValue, converters.get(property));
      hv.setValue(widgetValue);
    }
    else if (widget instanceof HasText) {
      HasText ht = (HasText) widget;
      Object widgetValue =
          Convert
              .toWidgetValue(String.class, propertyTypes.get(property).getType(), newValue, converters.get(property));
      ht.setText((String) widgetValue);
    }

    firePropertyChangeEvent(property, oldValue, newValue);
  }
View Full Code Here

        Object widgetValue =
            Convert.toWidgetValue(widget, propertyTypes.get(property).getType(), newValue, converter);
        hv.setValue(widgetValue);
      }
      else if (widget instanceof HasText) {
        HasText ht = (HasText) widget;
        Object widgetValue =
            Convert.toWidgetValue(String.class, propertyTypes.get(property).getType(), newValue, converter);
        ht.setText((String) widgetValue);
      }
    }

    firePropertyChangeEvent(property, oldValue, newValue);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.ui.HasText

Copyright © 2018 www.massapicom. 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.