List of usage examples for com.google.gwt.user.client.ui HasText HasText
HasText
From source file:cc.kune.chat.client.KuneHablarSignals.java
License:GNU Affero Public License
/** * Instantiates a new kune hablar signals. * * @param kuneEventBus/*from w ww . java 2s.c o m*/ * the kune event bus * @param session * the session * @param hablar * the hablar * @param action * the action * @param privateStorageManager * the private storage manager * @param i18n * the i18n * @param downUtils * the down utils * @param chatIcon */ public KuneHablarSignals(final EventBus kuneEventBus, final XmppSession session, final Hablar hablar, final ChatClientAction action, final PrivateStorageManager privateStorageManager, final I18nTranslationService i18n, final ClientFileDownloadUtils downUtils, IsWidget chatIcon) { this.chatIcon = chatIcon; final HablarEventBus hablarEventBus = hablar.getEventBus(); final PrivateStorageManager storageManager = privateStorageManager; final HasText titleDisplay = new HasText() { @Override public String getText() { return Window.getTitle(); } @Override public void setText(final String text) { Window.setTitle(text); } }; final SignalPreferences preferences = new SignalPreferences(); final UnattendedPagesManager manager = new UnattendedPagesManager(hablarEventBus, BrowserFocusHandler.getInstance()); new KuneBrowserFocusManager(kuneEventBus, hablarEventBus, manager, BrowserFocusHandler.getInstance()); new UnattendedPresenter(hablarEventBus, preferences, manager, titleDisplay); new KuneUnattendedPresenter(kuneEventBus, hablarEventBus, preferences, manager, chatIcon); final NotificationManager notificationManager = new NotificationManager(hablarEventBus, preferences); // notificationManager.addNotifier((BrowserPopupHablarNotifier) // GWT.create(BrowserPopupHablarNotifier.class), // true); notificationManager.addNotifier(new KuneChatNotifier(i18n, downUtils, kuneEventBus), true); final SignalsPreferencesPresenter preferencesPage = new SignalsPreferencesPresenter(session, storageManager, hablarEventBus, preferences, new SignalsPreferencesWidget(), notificationManager); hablar.addPage(preferencesPage, UserContainer.ROL); }
From source file:com.surevine.chat.view.client.security.ui.SecurityLabelWidget.java
License:Open Source License
/** * Gets the display text element.// w w w. j a v a 2s . c om * * @return The display text. */ public HasText getDisplayText() { return new HasText() { public String getText() { return label.getInnerText(); } public void setText(final String text) { label.setInnerText(text); } }; }
From source file:org.cee.webreader.client.ui.News.java
License:Apache License
@Override public HasText getSiteNameLabel() { return new HasText() { @Override// www.j a v a2 s . com public void setText(String text) { } @Override public String getText() { return null; } }; }
From source file:org.obiba.opal.web.gwt.app.client.administration.database.edit.mongo.MongoDatabaseModalView.java
License:Open Source License
@Override public HasText getProperties() { return new HasText() { @Override//from w ww . ja v a 2 s. c om public String getText() { return properties.getText(); } @Override public void setText(String text) { properties.setText(text); if (!Strings.isNullOrEmpty(text)) { advancedOptions.setOpen(true); } } }; }
From source file:org.obiba.opal.web.gwt.app.client.administration.database.edit.sql.SqlDatabaseModalView.java
License:Open Source License
@Override public HasText getDriver() { return new HasText() { @Override//from w ww. j a v a 2 s . co m public String getText() { int selectedIndex = driver.getSelectedIndex(); return selectedIndex < 0 ? null : driver.getValue(selectedIndex); } @Override public void setText(@Nullable String text) { selectedDriver = text; int count = driver.getItemCount(); for (int i = 0; i < count; i++) { if (driver.getValue(i).equals(text)) { driver.setSelectedIndex(i); break; } } } }; }
From source file:org.obiba.opal.web.gwt.app.client.administration.datashield.view.DataShieldPackageCreateView.java
License:Open Source License
@Override public HasText getName() { return new HasText() { @Override//from www . j av a2 s .c om public String getText() { return allPkg.getValue() ? DATASHIELD_ALL_PKG : name.getText(); } @Override public void setText(String text) { } }; }
From source file:org.obiba.opal.web.gwt.app.client.administration.identifiers.view.CopySystemIdentifiersModalView.java
License:Open Source License
@Override public HasText getTable() { return new HasText() { @Override/*w w w . j av a 2 s . c o m*/ public String getText() { return tableChooser.getSelectedValue(); } @Override public void setText(String text) { } }; }
From source file:org.obiba.opal.web.gwt.app.client.magma.datasource.presenter.CsvDatasourceFormPresenter.java
License:Open Source License
private HasText getSelectedFile() { if (selectedFile == null) { selectedFile = new HasText() { @Override//w w w. j a v a 2 s .c o m public String getText() { return csvFileSelectionPresenter.getSelectedFile(); } @Override public void setText(String text) { // do nothing } }; } return selectedFile; }
From source file:org.obiba.opal.web.gwt.app.client.validator.RequiredTextValidator.java
License:Open Source License
public RequiredTextValidator(final HasValue<String> hasValue, String errorMessageKey) { this(new HasText() { @Override/*w w w . ja va2 s .c o m*/ public String getText() { return hasValue.getValue(); } @Override public void setText(String text) { hasValue.setValue(text); } }, errorMessageKey); }
From source file:org.opencms.ade.galleries.client.ui.CmsGalleryDialog.java
License:Open Source License
/** * Creates a tab text accessor for a given text.<p> * /*from ww w . j av a 2 s .c o m*/ * @param pos the index of the tab * * @return the tab text accessor for the tab at index pos */ protected HasText getTabTextAccessor(final int pos) { HasText tabText = new HasText() { /** * @see com.google.gwt.user.client.ui.HasText#getText() */ public String getText() { return m_tabbedPanel.getTabText(pos); } /** * @see com.google.gwt.user.client.ui.HasText#setText(java.lang.String) */ public void setText(String text) { m_tabbedPanel.setTabText(pos, text); } }; return tabText; }