本文整理汇总了Java中com.google.gwt.user.client.ui.TextBox.setStyleName方法的典型用法代码示例。如果您正苦于以下问题:Java TextBox.setStyleName方法的具体用法?Java TextBox.setStyleName怎么用?Java TextBox.setStyleName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.TextBox
的用法示例。
在下文中一共展示了TextBox.setStyleName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
protected void init(){
//Panel information
this.setWidget(0,0,url);
urlTB = new TextBox();
urlTB.setStyleName("bda-etlpanel-textbox");
this.setWidget(0,1,urlTB);
this.setWidget(1,0,user);
userTB = new TextBox();
userTB.setStyleName("bda-etlpanel-textbox");
this.setWidget(1,1,userTB);
this.setWidget(2,0,password);
passwordTB = new TextBox();
passwordTB.setStyleName("bda-etlpanel-textbox");
this.setWidget(2,1,passwordTB);
}
示例2: FileTextBox
import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
/**
* File textBox
*/
public FileTextBox() {
textBox = new TextBox();
textBox.addKeyUpHandler(new KeyUpHandler() {
@Override
public void onKeyUp(KeyUpEvent event) {
switch (event.getNativeKeyCode()) {
case (char) KeyCodes.KEY_ENTER:
switch (action) {
case ACTION_RENAME:
if (textBox.getText().length() > 0) {
Main.get().mainPanel.desktop.browser.fileBrowser.rename(textBox.getText());
} else {
Main.get().mainPanel.desktop.browser.fileBrowser.hideRename();
}
break;
}
Main.get().mainPanel.enableKeyShorcuts(); // Enables general keys applications
break;
case (char) KeyCodes.KEY_ESCAPE:
switch (action) {
case ACTION_RENAME:
Main.get().mainPanel.desktop.browser.fileBrowser.hideRename();
break;
}
Main.get().mainPanel.enableKeyShorcuts(); // Enables general keys applications
break;
}
}
});
textBox.setVisibleLength(20);
textBox.setStyleName("okm-FileBrowser-TextBox");
initWidget(textBox);
}
示例3: init
import com.google.gwt.user.client.ui.TextBox; //导入方法依赖的package包/类
/**
* Init UI
* @param editable Wheather is editable
*/
protected void init(boolean editable){
initGridHead( 3 );
inCountBox = new TextBox();
outCountBox = new TextBox();
inCountBox.setText( "" +widget.getInNodeShapes().size() );
outCountBox.setText( "" + widget.getOutNodeShapes().size());
paramsGrid.setVisible(true);
paramsGrid.setWidget( 1 , 0, new Label("Input File Number"));
paramsGrid.setWidget( 1, 1, new Label("Int"));
paramsGrid.setWidget( 1, 2, inCountBox );
inCountBox.setSize("95%", "100%");
inCountBox.setStyleName("okTextbox");
inCountBox.setEnabled(editable);
inCountBox.setTabIndex(0);
paramsGrid.setWidget( 2 , 0, new Label("Output File Number"));
paramsGrid.setWidget( 2, 1, new Label("Int"));
paramsGrid.setWidget( 2 , 2, outCountBox );
outCountBox.setSize("95%", "100%");
outCountBox.setStyleName("okTextbox");
outCountBox.setEnabled(editable);
outCountBox.setTabIndex(1);
scriptArea = new TextArea();
scriptArea.setText( widget.getProgramConf().getScriptContent());
this.add( paramsGrid );
this.add( new Label("Script"));
this.add( scriptArea );
}