本文整理汇总了Java中org.gwtbootstrap3.client.ui.CheckBox.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java CheckBox.setValue方法的具体用法?Java CheckBox.setValue怎么用?Java CheckBox.setValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.gwtbootstrap3.client.ui.CheckBox
的用法示例。
在下文中一共展示了CheckBox.setValue方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: insert
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
@Override
public ColumnListEditor.View insert(final int index,
final DataColumnDefEditor.View columnEditorView,
final boolean selected, final boolean enabled,
final String altText) {
final CheckBox selectedInput = new CheckBox();
selectedInput.getElement().getStyle().setCursor(Style.Cursor.POINTER);
selectedInput.getElement().getStyle().setTop(-7, Style.Unit.PX);
selectedInput.setEnabled(enabled);
selectedInput.setValue(selected);
selectedInput.setTitle(altText != null ? altText : "");
selectedInput.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
@Override
public void onValueChange(final ValueChangeEvent<Boolean> event) {
presenter.onColumnSelect(index, event.getValue());
}
});
final HorizontalPanel panel = new HorizontalPanel();
panel.setWidth("100%");
panel.add(selectedInput);
panel.add(columnEditorView.asWidget());
container.insert(panel, index);
return this;
}
示例2: checkBoxEditor
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
private Widget checkBoxEditor(final RuleAttribute at,
final boolean isReadOnly) {
final CheckBox box = new CheckBox();
box.setEnabled(!isReadOnly);
if (at.getValue() == null || at.getValue().isEmpty()) {
box.setValue(false);
at.setValue(FALSE_VALUE);
} else {
box.setValue((at.getValue().equals(TRUE_VALUE)));
}
box.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
at.setValue((box.getValue()) ? TRUE_VALUE : FALSE_VALUE);
}
});
return box;
}
示例3: makeEventTypeCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
private Widget makeEventTypeCheckBox(final String eventType,
final Boolean isEnabled) {
final CheckBox chkEventType = new CheckBox(AuditLogEntryCellHelper.getEventTypeDisplayText(eventType));
chkEventType.setValue(Boolean.TRUE.equals(isEnabled));
chkEventType.addValueChangeHandler((ValueChangeEvent<Boolean> event) -> {
auditLog.getAuditLogFilter().getAcceptedTypes().put(eventType,
event.getValue());
});
// BZ-996942: Use one column layout.
chkEventType.setWordWrap(false);
return new Column(ColumnSize.MD_2) {{
add(chkEventType);
}};
}
示例4: showColumnPickerPopup
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
protected void showColumnPickerPopup(final int left,
final int top) {
VerticalPanel popupContent = GWT.create(VerticalPanel.class);
for (final ColumnMeta<T> columnMeta : columnMetaList) {
if (addThisColumnToPopup(columnMeta)) {
final CheckBox checkBox = GWT.create(CheckBox.class);
checkBox.setText((String) columnMeta.getHeader().getValue());
checkBox.setValue(columnMeta.isVisible());
checkBox.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
public void onValueChange(ValueChangeEvent<Boolean> booleanValueChangeEvent) {
boolean visible = booleanValueChangeEvent.getValue();
if (visible) {
dataGrid.insertColumn(getVisibleColumnIndex(columnMeta),
columnMeta.getColumn(),
columnMeta.getHeader());
} else {
dataGrid.removeColumn(columnMeta.getColumn());
}
columnMeta.setVisible(visible);
adjustColumnWidths();
}
});
popupContent.add(checkBox);
}
}
addResetButtom(left,
top,
popupContent);
configureColorPickerPopup(left,
top,
popupContent);
}
示例5: addUseRowNumberCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
public CheckBox addUseRowNumberCheckBox(AttributeCol52 attributeColumn,
boolean isEditable,
ClickHandler clickHandler) {
final CheckBox chkUseRowNumber = new CheckBox(GuidedDecisionTableConstants.INSTANCE.UseRowNumber());
chkUseRowNumber.setValue(attributeColumn.isUseRowNumber());
chkUseRowNumber.setEnabled(isEditable);
chkUseRowNumber.addClickHandler(clickHandler);
add(chkUseRowNumber);
return chkUseRowNumber;
}
示例6: addReverseOrderCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
public CheckBox addReverseOrderCheckBox(AttributeCol52 attributeColumn,
boolean isEditable,
ClickHandler clickHandler) {
final CheckBox chkReverseOrder = new CheckBox(GuidedDecisionTableConstants.INSTANCE.ReverseOrder());
chkReverseOrder.setValue(attributeColumn.isReverseOrder());
chkReverseOrder.setEnabled(attributeColumn.isUseRowNumber() && isEditable);
chkReverseOrder.addClickHandler(clickHandler);
add(chkReverseOrder);
return chkReverseOrder;
}
示例7: addHideColumnCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
public CheckBox addHideColumnCheckBox(AttributeCol52 attributeColumn,
ClickHandler clickHandler) {
final CheckBox chkHideColumn = new CheckBox(new StringBuilder(GuidedDecisionTableConstants.INSTANCE.HideThisColumn())
.append(GuidedDecisionTableConstants.COLON)
.toString());
chkHideColumn.setValue(attributeColumn.isHideColumn());
chkHideColumn.addClickHandler(clickHandler);
add(chkHideColumn);
return chkHideColumn;
}
示例8: addCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
public void addCheckBox(CheckBox checkBox) {
body.add(checkBox);
checkBox.setValue(true);
}
示例9: getContent
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
@Override
public Widget getContent() {
if (position == null) {
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Bottom(),
String.valueOf(this.model.rhs.length));
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Top(),
"0");
for (int i = 1; i < model.rhs.length; i++) {
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Line0(i),
String.valueOf(i));
}
} else {
//if position is fixed, we just add one element to the drop down.
positionCbo.addItem(String.valueOf(position));
positionCbo.setSelectedIndex(0);
}
if (oracle.getDSLConditions().size() == 0 && oracle.getFactTypes().length == 0) {
layoutPanel.addRow(new HTML("<div class='highlight'>" + GuidedRuleEditorResources.CONSTANTS.NoModelTip() + "</div>"));
}
//only show the drop down if we are not using fixed position.
if (position == null) {
HorizontalPanel hp0 = new HorizontalPanel();
hp0.add(new HTML(GuidedRuleEditorResources.CONSTANTS.PositionColon()));
hp0.add(positionCbo);
hp0.add(new InfoPopup(GuidedRuleEditorResources.CONSTANTS.PositionColon(),
GuidedRuleEditorResources.CONSTANTS.ActionPositionExplanation()));
layoutPanel.addRow(hp0);
layoutPanel.addRow(new HTML("<hr/>"));
}
choices = makeChoicesListBox();
choicesPanel.add(choices);
layoutPanel.addRow(choicesPanel);
//DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL)
if (ruleModeller.isDSLEnabled()) {
CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
chkOnlyDisplayDSLConditions.setText(GuidedRuleEditorResources.CONSTANTS.OnlyDisplayDSLActions());
chkOnlyDisplayDSLConditions.setValue(onlyShowDSLStatements);
chkOnlyDisplayDSLConditions.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
public void onValueChange(ValueChangeEvent<Boolean> event) {
onlyShowDSLStatements = event.getValue();
choicesPanel.setWidget(makeChoicesListBox());
}
});
layoutPanel.addRow(chkOnlyDisplayDSLConditions);
}
return layoutPanel;
}
示例10: getContent
import org.gwtbootstrap3.client.ui.CheckBox; //导入方法依赖的package包/类
@Override
public Widget getContent() {
if (position == null) {
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Bottom(),
String.valueOf(this.model.lhs.length));
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Top(),
"0");
for (int i = 1; i < model.lhs.length; i++) {
positionCbo.addItem(GuidedRuleEditorResources.CONSTANTS.Line0(i),
String.valueOf(i));
}
} else {
//if position is fixed, we just add one element to the drop down.
positionCbo.addItem(String.valueOf(position));
positionCbo.setSelectedIndex(0);
}
if (oracle.getDSLConditions().size() == 0 && oracle.getFactTypes().length == 0) {
layoutPanel.addRow(new HTML("<div class='highlight'>" + GuidedRuleEditorResources.CONSTANTS.NoModelTip() + "</div>"));
}
//only show the drop down if we are not using fixed position.
if (position == null) {
HorizontalPanel hp0 = new HorizontalPanel();
hp0.add(new HTML(GuidedRuleEditorResources.CONSTANTS.PositionColon()));
hp0.add(positionCbo);
hp0.add(new InfoPopup(GuidedRuleEditorResources.CONSTANTS.PositionColon(),
GuidedRuleEditorResources.CONSTANTS.ConditionPositionExplanation()));
layoutPanel.addRow(hp0);
layoutPanel.addRow(new HTML("<hr/>"));
}
choices = makeChoicesListBox();
choicesPanel.add(choices);
layoutPanel.addRow(choicesPanel);
//DSL might be prohibited (e.g. editing a DRL file. Only DSLR files can contain DSL)
if (ruleModeller.isDSLEnabled()) {
CheckBox chkOnlyDisplayDSLConditions = new CheckBox();
chkOnlyDisplayDSLConditions.setText(GuidedRuleEditorResources.CONSTANTS.OnlyDisplayDSLConditions());
chkOnlyDisplayDSLConditions.setValue(onlyShowDSLStatements);
chkOnlyDisplayDSLConditions.addValueChangeHandler(new ValueChangeHandler<Boolean>() {
public void onValueChange(ValueChangeEvent<Boolean> event) {
onlyShowDSLStatements = event.getValue();
choicesPanel.setWidget(makeChoicesListBox());
}
});
layoutPanel.addRow(chkOnlyDisplayDSLConditions);
}
return layoutPanel;
}