本文整理匯總了Java中com.google.gwt.user.client.ui.TextBox.addStyleName方法的典型用法代碼示例。如果您正苦於以下問題:Java TextBox.addStyleName方法的具體用法?Java TextBox.addStyleName怎麽用?Java TextBox.addStyleName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.gwt.user.client.ui.TextBox
的用法示例。
在下文中一共展示了TextBox.addStyleName方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: initAppShare
import com.google.gwt.user.client.ui.TextBox; //導入方法依賴的package包/類
/**
* Helper method called by constructor to initialize the report section
*/
private void initAppShare() {
final HTML sharePrompt = new HTML();
sharePrompt.setHTML(MESSAGES.gallerySharePrompt());
sharePrompt.addStyleName("primary-prompt");
final TextBox urlText = new TextBox();
urlText.addStyleName("action-textbox");
urlText.setText(Window.Location.getHost() + MESSAGES.galleryGalleryIdAction() + app.getGalleryAppId());
urlText.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
urlText.selectAll();
}
});
appSharePanel.add(sharePrompt);
appSharePanel.add(urlText);
}
示例2: addGallerySearchTab
import com.google.gwt.user.client.ui.TextBox; //導入方法依賴的package包/類
/**
* Creates the GUI components for search tab.
*
* @param searchApp: the FlowPanel that search tab will reside.
*/
private void addGallerySearchTab(FlowPanel searchApp) {
// Add search GUI
FlowPanel searchPanel = new FlowPanel();
final TextBox searchText = new TextBox();
searchText.addStyleName("gallery-search-textarea");
Button sb = new Button(MESSAGES.gallerySearchForAppsButton());
searchPanel.add(searchText);
searchPanel.add(sb);
searchPanel.addStyleName("gallery-search-panel");
searchApp.add(searchPanel);
appSearchContent.addStyleName("gallery-search-results");
searchApp.add(appSearchContent);
searchApp.addStyleName("gallery-search");
sb.addClickHandler(new ClickHandler() {
// @Override
public void onClick(ClickEvent event) {
gallery.FindApps(searchText.getText(), 0, NUMAPPSTOSHOW, 0, true);
}
});
}
示例3: setKeyPatternPanelView
import com.google.gwt.user.client.ui.TextBox; //導入方法依賴的package包/類
private void setKeyPatternPanelView() {
keyPatternText = new TextBox();
keyPatternText.addStyleName(AdminConstants.GWT_ADVANCED_KV_TEXT_BOX);
keyPatternField = new ListBox();
keyPatternField.setWidth("98%");
keyPatternPanel.add(keyPatternText);
useExistingKey.setValue(Boolean.FALSE);
useExistingKey.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> arg0) {
if (arg0.getValue().equals(Boolean.TRUE)) {
keyPatternValidateButton.setEnabled(Boolean.FALSE);
keyPatternPanel.remove(keyPatternText);
keyPatternPanel.add(keyPatternField);
} else {
keyPatternValidateButton.setEnabled(Boolean.TRUE);
keyPatternPanel.remove(keyPatternField);
keyPatternPanel.add(keyPatternText);
}
}
});
}
示例4: RenameInputBox
import com.google.gwt.user.client.ui.TextBox; //導入方法依賴的package包/類
@Inject
public RenameInputBox(PromiseProvider promiseProvider, KeyBindingAgent keyBindingAgent) {
super(true, true);
this.promiseProvider = promiseProvider;
valueTextBox = new TextBox();
CharCodeWithModifiers keyBinding = keyBindingAgent.getKeyBinding("LS.rename");
keyDigest = keyBinding.getKeyDigest();
valueTextBox.addStyleName("orionCodenvy");
setWidget(valueTextBox);
}
示例5: LoginWidget
import com.google.gwt.user.client.ui.TextBox; //導入方法依賴的package包/類
public LoginWidget(AsyncCallback<Void> logincb, AsyncCallback<Void> logoutcb) {
this.resize(1, 2);
this.getCellFormatter().setHorizontalAlignment(0, 1, HasHorizontalAlignment.ALIGN_RIGHT);
this.addStyleName("easyvote-LoginWidget");
LoginHandler handler = new LoginHandler();
whoAmIPanel = new HorizontalPanel();
whoAmIPanel.setVisible(false);
userIdLabel = new Label();
userIdLabel.addStyleName("LoginWidget-component");
whoAmIPanel.add(userIdLabel);
logoutButton = new Button("Logout");
logoutButton.addStyleName("LoginWidget-logoutButton");
logoutButton.addClickHandler(new LogoutHandler());
whoAmIPanel.add(logoutButton);
setWidget(0, 1, whoAmIPanel);
inputPanel = new FlowPanel();
loginCallback = logincb;
logoutCallback = logoutcb;
nameField = new TextBox();
nameField.setText("VoterID");
nameField.addStyleName("LoginWidget-component");
nameField.addKeyUpHandler(handler);
inputPanel.add(nameField);
passField = new PasswordTextBox();
passField.setText("Password");
passField.addKeyUpHandler(handler);
passField.addStyleName("LoginWidget-component");
inputPanel.add(passField);
sendButton = new Button("Login");
sendButton.addClickHandler(handler);
inputPanel.add(sendButton);
this.setWidget(0, 0, inputPanel);
}