本文整理匯總了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");
}
});
}