本文整理了Java中com.google.gwt.user.client.ui.CheckBox.<init>()
方法的一些代码示例,展示了CheckBox.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.<init>()
方法的具体详情如下:
包路径:com.google.gwt.user.client.ui.CheckBox
类名称:CheckBox
方法名:<init>
[英]Creates a check box with no label.
[中]创建不带标签的复选框。
代码示例来源:origin: stackoverflow.com
final CheckBox chk1 = new CheckBox("chk 1");
final CheckBox chk2 = new CheckBox("chk 2");
代码示例来源:origin: stackoverflow.com
final LinearLayout attractedTo = (LinearLayout) findViewById(R.id.register_attracted_to);
final CheckBox male = new CheckBox(this);
male.setText("Male");
male.setTextColor(getResources().getColor(R.color.foreground_text));
attractedTo.addView(male);
final CheckBox female = new CheckBox(this);
female.setText("Female");
female.setTextColor(getResources().getColor(R.color.foreground_text));
attractedTo.addView(female);
代码示例来源:origin: stackoverflow.com
public void init(){
TableLayout ll = (TableLayout) findViewById(R.id.displayLinear);
for (int i = 0; i <2; i++) {
TableRow row= new TableRow(this);
TableRow.LayoutParams lp = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT);
row.setLayoutParams(lp);
checkBox = new CheckBox(this);
tv = new TextView(this);
addBtn = new ImageButton(this);
addBtn.setImageResource(R.drawable.add);
minusBtn = new ImageButton(this);
minusBtn.setImageResource(R.drawable.minus);
qty = new TextView(this);
checkBox.setText("hello");
qty.setText("10");
row.addView(checkBox);
row.addView(minusBtn);
row.addView(qty);
row.addView(addBtn);
ll.addView(row,i);
}
}
代码示例来源:origin: stackoverflow.com
EntityModel<Account> accModel = new EntityModel<Account>(Account.class, id);
add(new CheckBox("cb", new PropertyModel<Boolean>(accModel, "enabled")){
protected boolean wantOnSelectionChangedNotifications() {
return true;
}
});
代码示例来源:origin: kaaproject/kaa
/**
* Instantiates a new CtlSchemasViewImpl.
*/
public CtlSchemasViewImpl() {
super(true);
if (displayShowHigherLevelScopeCheckBox()) {
showHigherScopeCheckBox = new CheckBox(Utils.constants.displayHigherScopes());
showHigherScopeCheckBox.addStyleName(Utils.kaaAdminStyle.bAppContentTitle());
Element.as(showHigherScopeCheckBox.getElement().getChild(0))
.getStyle().setMarginRight(10, Unit.PX);
showHigherScopeCheckBox.setValue(defaultShowHigherLevelScopes());
appendToolbarWidget(showHigherScopeCheckBox);
}
}
代码示例来源:origin: stackoverflow.com
setGraphic(null);
} else if (item instanceof Boolean) {
CheckBox checkBox = new CheckBox();
checkBox.setSelected((boolean) item);
setGraphic(checkBox);
代码示例来源:origin: kaaproject/kaa
detailsTable.setWidget(idx, 1, maxSchemaVersion);
confirmDelivery = new CheckBox();
confirmDelivery.setWidth("100%");
Label confirmDeliveryLabel = new Label(Utils.constants.confirmDelivery());
代码示例来源:origin: kaaproject/kaa
name.addInputHandler(this);
mandatory = new CheckBox();
mandatory.setWidth("100%");
Label mandatoryLabel = new Label(Utils.constants.mandatory());
代码示例来源:origin: kaaproject/kaa
profileFiltersLabel = new Label(Utils.constants.profileFilters());
profileFiltersLabel.addStyleName(Utils.kaaAdminStyle.bAppContentTitleLabel());
includeDeprecatedProfileFilters = new CheckBox(Utils.constants.includeDeprecated());
setCheckBoxStyle(includeDeprecatedProfileFilters);
Label configurationsLabel = new Label(Utils.constants.configurations());
configurationsLabel.addStyleName(Utils.kaaAdminStyle.bAppContentTitleLabel());
includeDeprecatedConfigurations = new CheckBox(Utils.constants.includeDeprecated());
setCheckBoxStyle(includeDeprecatedConfigurations);
代码示例来源:origin: stackoverflow.com
CheckBox[] cbs = new CheckBox[20]; // Number varies..
for(int i=0; i<20; i++){
cbs[i] = new CheckBox(this);
ll.addView(cb);
cbs.setText("Test");
}
代码示例来源:origin: de.esoco/gewt
/***************************************
* {@inheritDoc}
*/
@Override
@SuppressWarnings("unchecked")
public W createWidget(Component rComponent, StyleData rStyle)
{
return (W) new com.google.gwt.user.client.ui.CheckBox();
}
}
代码示例来源:origin: stackoverflow.com
@FXML
public MenuButton menuButton;
......
CheckBox cb0 = new CheckBox("x");
CustomMenuItem item0 = new CustomMenuItem(cb0);
CheckBox cb1 = new CheckBox("y");
CustomMenuItem item1 = new CustomMenuItem(cb1);
item0.setHideOnClick(false);
item1.setHideOnClick(false);
menuButton.getItems().setAll(item0,item1);
代码示例来源:origin: stackoverflow.com
treeTable.addGeneratedColumn("generated", new ColumnGenerator() {
@Override
public Component generateCell(Table source, final Object itemId, Object columnId){
// Get the object associated with the row
Object Objet = source.getItem(itemId);
//Missing casting instruction
if(your condition to check to render a CheckBox()){
return new CheckBox();
}
return new Label("your text");
}
代码示例来源:origin: stackoverflow.com
CheckBox alternateTextCheck = new CheckBox("Show alternate text");
alternateTextCheck.selectedProperty().addListener(new ChangeListener<Boolean>() {
@Override public void changed(ObservableValue<? extends Boolean> selected, Boolean oldValue, Boolean newValue) {
代码示例来源:origin: stackoverflow.com
private CheckBox checkBox;
public BooleanCell() {
checkBox = new CheckBox();
checkBox.setDisable(true);
checkBox.selectedProperty().addListener(new ChangeListener<Boolean> () {
代码示例来源:origin: stackoverflow.com
checkBox = new CheckBox();
checkBox.setSelected(getBoolean());
checkBox.setMinWidth(this.getWidth() - this.getGraphicTextGap() * 2);
代码示例来源:origin: org.jboss.errai/errai-bus
final CheckBox showFurtherErrors = new CheckBox();
showFurtherErrors.setValue(showErrors);
showFurtherErrors.setText("Show further errors");
代码示例来源:origin: stackoverflow.com
@Override
public void initGUI() {
key = new CheckBox();
key.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
//Something happens here
}
});
代码示例来源:origin: stackoverflow.com
final List <CheckBox> cbs = new ArrayList<CheckBox>();
for(int i = 0; i < 5; i++){
CheckBox cb = new CheckBox(this);
cb.setText("Apple" + (i + 1));
cbs.add(cb);
ll3.addView(cbs.get(i));
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
public MagnoliaTableHead() {
super();
selectAll = new CheckBox();
selectAll.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(ValueChangeEvent<Boolean> event) {
client.updateVariable(paintableId, "selectAll", event.getValue(), true);
}
});
selectAll.addStyleName("v-select-all");
}
内容来源于网络,如有侵权,请联系作者删除!