本文整理汇总了Java中com.google.gwt.user.client.ui.TextArea.setSize方法的典型用法代码示例。如果您正苦于以下问题:Java TextArea.setSize方法的具体用法?Java TextArea.setSize怎么用?Java TextArea.setSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.TextArea
的用法示例。
在下文中一共展示了TextArea.setSize方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: OriginalPanel
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
public OriginalPanel() {
setSize("100%", "100%");
setSpacing(5);
Label title = new Label(appConstants.importTextTitle());
add(title);
setCellWidth(title,"100%");
setCellHeight(title,"1%");
textArea = new TextArea();
textArea.addChangeListener(this);
textArea.setSize("100%","100%");
add(textArea);
setCellWidth(textArea,"100%");
setCellHeight(textArea,"99%");
}
示例2: init
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
protected void init(String msg, String title) {
this.setTitle("stdErr");
this.setGlassEnabled(true);
HTML closeButton = new HTML("X");
closeButton.setSize("10px", "10px");
closeButton.setStyleName("closebtn");
closeButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
StdPanel.this.hide();
}
});
ScrollPanel scvp = new ScrollPanel();
VerticalPanel verticalPanel = new VerticalPanel();
verticalPanel.add(closeButton);
verticalPanel.setCellHeight(closeButton, "30px");
verticalPanel.setStyleName("vpanel");
HTML desc = new HTML(title);
desc.setStyleName("popupTitle");
verticalPanel.add(desc);
verticalPanel.setCellHeight(desc, "30px");
TextArea label = new TextArea();
label.setText(msg);
label.setReadOnly(true);
label.setSize("650px", "400px");
verticalPanel.add(label);
scvp.add(verticalPanel);
this.add(scvp);
this.setStyleName("loading_container");
this.center();
this.show();
}
示例3: ConsoleDialog
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
public ConsoleDialog(ConsoleDialogListener listener) {
super(false, true);
this.listener = listener;
VerticalPanel dialogContents = new VerticalPanel();
dialogContents.setSpacing(4);
setWidget(dialogContents);
console = new TextArea();
console.setReadOnly(true);
int width= Window.getClientWidth();
int height= Window.getClientHeight();
console.setSize(width*2/3 + "px", height*2/3 + "px");
console.addStyleName(Utils.sandboxStyle.consoleArea());
okButton = new Button("Ok");
addButton(okButton);
dialogContents.add(console);
okButton.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
hide();
if (ConsoleDialog.this.listener != null) {
ConsoleDialog.this.listener.onOk(rpcCallSucceded && consoleSessionSucceded);
}
}
});
okButton.setEnabled(false);
}
示例4: TextAreaInputField
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
/**
* Use this constructor only when you are subclassing TextAreaFieldWidget and need
* the special case provided by the willEncapsulate parameter.
* @param fieldDef the FieldDef that is the Model for this TextAreaFieldWidget
* @param willEncapsulate this parameter should be true only if you are subclassing
* text box and plan to wrap it in another widget. If true, you must call
* initWidget() in the subclass and TextAreaFieldWidget will not call it.
* This parameter is rarely used
*/
protected TextAreaInputField(FieldDef fieldDef, boolean willEncapsulate) {
_fieldDef = fieldDef;
_textArea = new TextArea();
_textArea.setSize("250px", "135px");
addHandlers();
if (!willEncapsulate)initWidget(_textArea);
_textArea.setTitle(_fieldDef.getShortDesc());
if (_fieldDef.getDefaultValueAsString() != null) {
_textArea.setText(_fieldDef.getDefaultValueAsString());
}
}
示例5: PlotEditor
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
public PlotEditor(Model mod) {
this.model = mod;
setSize("100%", "100%");
plot = new TextArea();
plot.setSize("100%", "100%");
plot.setText(model.getPlot());
plot.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
model.updatePlot(plot.getText().trim(), plotListener);
}
});
add(plot);
setCellHeight(plot,"100%");
setCellWidth(plot,"100%");
plotListener = new PlotListener() {
public void refreshAll() {
plot.setText(model.getPlot());
}
public void update(String pl) {
plot.setText(pl);
}
public void updateBookRules(String rules) {
}
public void updatePlayerRules(String rules) {
}
public void updateCommercialText(String text) {
}
public void updateDemoInfoText(String text) {
}
};
model.addPlotListener(plotListener);
}
示例6: AppScreen
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
public AppScreen()
{
verticalPanel = new VerticalPanel();
initWidget(verticalPanel);
verticalPanel.setWidth("100%");
verticalPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_TOP);
verticalPanel.setSpacing(0);
topBar = new TopBar();
verticalPanel.add(topBar);
loginScreen = new LoginScreen();
verticalPanel.add(loginScreen);
flexTable = new FlexTable();
flexTable.setWidth("100%");
int row = 0; int col = 0;
verticalPanel.add(flexTable);
row = 0; col = 0;
horizontalPanel = new HorizontalPanel();
horizontalPanel.setSpacing(4);
flexTable.setWidget(row, col, horizontalPanel);
btnMe = new Button("me");
horizontalPanel.add(btnMe);
btnMe.setWidth("110px");
btnMe.setStyleName(css.buttonsStyle());
btnAccessToken = new Button("Access Token");
horizontalPanel.add(btnAccessToken);
btnAccessToken.setWidth("110px");
btnAccessToken.setStyleName(css.buttonsStyle());
btnClear = new Button("Clear");
btnClear.setText("Clear Log");
horizontalPanel.add(btnClear);
btnClear.setWidth("110px");
btnClear.setStyleName(css.buttonsStyle());
lblLoggedInAs = new Label(" ");
lblLoggedInAs.setWordWrap(false);
horizontalPanel.add(lblLoggedInAs);
btnAbout = new Button("About...");
horizontalPanel.add(btnAbout);
btnAbout.setWidth("110px");
btnAbout.setStyleName(css.buttonsStyle());
authProviderImage = new Image("1x1.png");
authProviderImage.setAltText("Logged in using");
horizontalPanel.add(authProviderImage);
row = 1; col = 0;
scrollPanel = new ScrollPanel();
scrollPanel.scrollToBottom();
flexTable.setWidget(row, col, scrollPanel);
scrollPanel.setWidth("100%");
textArea = new TextArea();
scrollPanel.setWidget(textArea);
textArea.setSize("99%", "400px");
flexTable.getCellFormatter().setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_LEFT);
flexTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP);
}
示例7: getWrappedHtml
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
private Widget getWrappedHtml(String text) {
TextArea ta = new TextArea();
ta.setText(text);
ta.setSize("700px", "100px");
return ta;
}
示例8: onRender
import com.google.gwt.user.client.ui.TextArea; //导入方法依赖的package包/类
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
createPanel(SHOPNAME, Resources.constants.Shop_name(), new TextBox());
createPanel(SHOPTITLE, Resources.constants.Shop_title(), new TextBox());
createPanel(SHOPDESC, Resources.constants.Shop_desc(), new TextBox());
createPanel(SHOPKEYWORDS, Resources.constants.shop_keywords(), new TextBox());
ListBox country = new ListBox();
country.addItem(Resources.constants.select_notice());
country.addItem("中国", "1");
country.setSelectedIndex(1);
createPanel(SHOPCOUNTRY, Resources.constants.shop_country(), country);
createPanel(SHOPPROVINCE, Resources.constants.shop_province(), province);
createPanel(SHOPCITY, Resources.constants.shop_city(), city);
createPanel(SHOPADDRESS, Resources.constants.shop_address(), new TextBox());
createPanel(QQ, Resources.constants.qq(), new TextBox());
createPanel(WW, Resources.constants.ww(), new TextBox());
createPanel(SKYPE, Resources.constants.skype(), new TextBox());
createPanel(YM, Resources.constants.ym(), new TextBox());
createPanel(MSN, Resources.constants.msn(), new TextBox());
createPanel(SERVICEEMAIL, Resources.constants.service_email(), new TextBox());
createPanel(SERVICEPHONE, Resources.constants.service_phone(), new TextBox());
ListBox closed = new ListBox();
closed.addItem(Resources.constants.no(), "0");
closed.addItem(Resources.constants.yes(), "1");
closed.setSelectedIndex(0);
createPanel(SHOPCLOSED,Resources.constants.shop_closed(),closed);
TextArea closeComment = new TextArea();
closeComment.setSize("500", "100");
createPanel(CLOSECOMMENT, Resources.constants.close_comment(), closeComment);
createPanel(SHOPLOGO, Resources.constants.shop_logo(), new FileUploader());
ListBox licensed = new ListBox();
licensed.addItem(Resources.constants.no(), "0");
licensed.addItem(Resources.constants.yes(), "1");
licensed.setSelectedIndex(0);
createPanel(LICENSED,Resources.constants.licensed(),licensed);
TextArea userNotice = new TextArea();
userNotice.setSize("500", "100");
createPanel(USERNOTICE, Resources.constants.user_notice(), userNotice);
TextArea shopNotice = new TextArea();
shopNotice.setSize("500", "100");
createPanel(SHOPNOTICE, Resources.constants.shop_notice(), shopNotice);
province.addChangeListener(new ChangeListener() {
public void onChange(Widget sender) {
showRegion(city, province.getSelectedIndex(),"0");
}
});
}