本文整理汇总了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);
}