本文整理汇总了Java中org.gwtbootstrap3.client.ui.CheckBox类的典型用法代码示例。如果您正苦于以下问题:Java CheckBox类的具体用法?Java CheckBox怎么用?Java CheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CheckBox类属于org.gwtbootstrap3.client.ui包,在下文中一共展示了CheckBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createDomElement
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Override
public CheckBoxDOMElement createDomElement(final GridLayer gridLayer,
final GridWidget gridWidget,
final GridBodyCellRenderContext context) {
final CheckBox widget = createWidget();
final CheckBoxDOMElement e = new CheckBoxDOMElement(widget,
gridLayer,
gridWidget);
widget.addClickHandler(new ClickHandler() {
@Override
public void onClick(final ClickEvent event) {
e.flush(widget.getValue());
gridLayer.batch();
}
});
return e;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:18,代码来源:CheckBoxDOMElementFactory.java
示例2: 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;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:26,代码来源:ColumnListEditorView.java
示例3: 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;
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:RuleAttributeWidget.java
示例4: hideMetadataClickHandler
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
ClickHandler hideMetadataClickHandler(final GuidedDecisionTableModellerView.Presenter modeller,
final CheckBox chkHideColumn,
final MetadataCol52 metaDataColumn) {
return event -> {
final MetadataCol52 editedColumn = metaDataColumn.cloneColumn();
editedColumn.setHideColumn(chkHideColumn.getValue());
try {
modeller.getActiveDecisionTable().updateColumn(metaDataColumn, editedColumn);
} catch (ModelSynchronizer.VetoException veto) {
showGenericVetoMessage();
}
};
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:18,代码来源:ColumnsPagePresenter.java
示例5: 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);
}};
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:17,代码来源:AuditLogViewImpl.java
示例6: testMakeMetaDataWidgetWhenDecisionTableIsEditable
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Test
public void testMakeMetaDataWidgetWhenDecisionTableIsEditable() {
final HorizontalPanel expectedHorizontalPanel = mock(HorizontalPanel.class);
final ColumnLabelWidget columnLabelWidget = mock(ColumnLabelWidget.class);
final CheckBox hideColumnCheckBox = mock(CheckBox.class);
final DeleteColumnManagementAnchorWidget deleteColumnManagementAnchorWidget = mock(DeleteColumnManagementAnchorWidget.class);
final boolean isEditable = true;
doReturn(expectedHorizontalPanel).when(presenter).makeHorizontalPanel();
doReturn(columnLabelWidget).when(presenter).makeColumnLabel(metadataColumn);
doReturn(hideColumnCheckBox).when(presenter).hideColumnCheckBox(modeller, metadataColumn);
doReturn(deleteColumnManagementAnchorWidget).when(presenter).deleteMetaDataColumnAnchor(modeller, metadataColumn);
doReturn(isEditable).when(modeller).isActiveDecisionTableEditable();
final HorizontalPanel actualHorizontalPanel = presenter.makeMetaDataWidget(modeller, metadataColumn);
verify(actualHorizontalPanel).setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
verify(actualHorizontalPanel).add(columnLabelWidget);
verify(actualHorizontalPanel).add(hideColumnCheckBox);
verify(actualHorizontalPanel).add(deleteColumnManagementAnchorWidget);
assertEquals(expectedHorizontalPanel, actualHorizontalPanel);
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:25,代码来源:ColumnsPagePresenterTest.java
示例7: testMakeMetaDataWidgetWhenDecisionTableIsNotEditable
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Test
public void testMakeMetaDataWidgetWhenDecisionTableIsNotEditable() {
final HorizontalPanel expectedHorizontalPanel = mock(HorizontalPanel.class);
final ColumnLabelWidget columnLabelWidget = mock(ColumnLabelWidget.class);
final CheckBox hideColumnCheckBox = mock(CheckBox.class);
final DeleteColumnManagementAnchorWidget deleteColumnManagementAnchorWidget = mock(DeleteColumnManagementAnchorWidget.class);
final boolean isEditable = false;
doReturn(expectedHorizontalPanel).when(presenter).makeHorizontalPanel();
doReturn(columnLabelWidget).when(presenter).makeColumnLabel(metadataColumn);
doReturn(hideColumnCheckBox).when(presenter).hideColumnCheckBox(modeller, metadataColumn);
doReturn(deleteColumnManagementAnchorWidget).when(presenter).deleteMetaDataColumnAnchor(modeller, metadataColumn);
doReturn(isEditable).when(modeller).isActiveDecisionTableEditable();
final HorizontalPanel actualHorizontalPanel = presenter.makeMetaDataWidget(modeller, metadataColumn);
verify(actualHorizontalPanel).setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
verify(actualHorizontalPanel).add(columnLabelWidget);
verify(actualHorizontalPanel).add(hideColumnCheckBox);
verify(actualHorizontalPanel, never()).add(deleteColumnManagementAnchorWidget);
assertEquals(expectedHorizontalPanel, actualHorizontalPanel);
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:25,代码来源:ColumnsPagePresenterTest.java
示例8: testHideColumnCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Test
public void testHideColumnCheckBox() {
final CheckBox expectedCheckBox = mock(CheckBox.class);
final ClickHandler clickHandler = mock(ClickHandler.class);
final boolean isHideColumn = true;
doReturn(isHideColumn).when(metadataColumn).isHideColumn();
doReturn(expectedCheckBox).when(presenter).makeCheckBox(eq("HideThisColumn:"));
doReturn(clickHandler).when(presenter).hideMetadataClickHandler(modeller, expectedCheckBox, metadataColumn);
final CheckBox actualCheckBox = presenter.hideColumnCheckBox(modeller, metadataColumn);
verify(expectedCheckBox).setValue(isHideColumn);
verify(expectedCheckBox).addClickHandler(clickHandler);
assertEquals(expectedCheckBox, actualCheckBox);
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:ColumnsPagePresenterTest.java
示例9: testHideMetadataClickHandlerWhenVetoExceptionIsNotRaised
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Test
public void testHideMetadataClickHandlerWhenVetoExceptionIsNotRaised() throws Exception {
final MetadataCol52 clone = mock(MetadataCol52.class);
final CheckBox checkBox = mock(CheckBox.class);
final ClickEvent clickEvent = mock(ClickEvent.class);
final GuidedDecisionTableView.Presenter activeDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
doReturn(activeDecisionTable).when(modeller).getActiveDecisionTable();
doReturn(clone).when(metadataColumn).cloneColumn();
final ClickHandler clickHandler = presenter.hideMetadataClickHandler(modeller, checkBox, metadataColumn);
clickHandler.onClick(clickEvent);
verify(clone).setHideColumn(checkBox.getValue());
verify(activeDecisionTable).updateColumn(metadataColumn, clone);
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:19,代码来源:ColumnsPagePresenterTest.java
示例10: testHideMetadataClickHandlerWhenVetoExceptionIsRaised
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Test
public void testHideMetadataClickHandlerWhenVetoExceptionIsRaised() throws Exception {
final MetadataCol52 clone = mock(MetadataCol52.class);
final CheckBox checkBox = mock(CheckBox.class);
final ClickEvent clickEvent = mock(ClickEvent.class);
final GuidedDecisionTableView.Presenter activeDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
doReturn(activeDecisionTable).when(modeller).getActiveDecisionTable();
doReturn(clone).when(metadataColumn).cloneColumn();
doThrow(ModelSynchronizer.VetoException.class).when(activeDecisionTable).updateColumn(metadataColumn, clone);
doNothing().when(presenter).showGenericVetoMessage();
final ClickHandler clickHandler = presenter.hideMetadataClickHandler(modeller, checkBox, metadataColumn);
clickHandler.onClick(clickEvent);
verify(clone).setHideColumn(checkBox.getValue());
verify(presenter).showGenericVetoMessage();
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:21,代码来源:ColumnsPagePresenterTest.java
示例11: 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);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:36,代码来源:UberfireColumnPicker.java
示例12: WiresGridsDemoViewImpl
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Inject
public WiresGridsDemoViewImpl(final ListBox zoom,
final ListBox basicRendererSelector,
final CheckBox chkShowMerged,
final Button btnAppendRow,
final Button btnDeleteRow,
final TranslationService translationService) {
this.zoom = zoom;
this.basicRendererSelector = basicRendererSelector;
this.chkShowMerged = chkShowMerged;
this.btnAppendRow = btnAppendRow;
this.btnDeleteRow = btnDeleteRow;
this.translationService = translationService;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:15,代码来源:WiresGridsDemoViewImpl.java
示例13: CheckBoxDOMElement
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
public CheckBoxDOMElement(final CheckBox widget,
final GridLayer gridLayer,
final GridWidget gridWidget) {
super(widget,
gridLayer,
gridWidget);
final Style style = widget.getElement().getStyle();
style.setMarginTop(0,
Style.Unit.PX);
style.setMarginLeft(2,
Style.Unit.PX);
style.setWidth(SIZE,
Style.Unit.PX);
style.setHeight(SIZE,
Style.Unit.PX);
// --- Workaround for BS2 ---
style.setPosition(Style.Position.RELATIVE);
style.setPaddingTop(0,
Style.Unit.PX);
style.setPaddingBottom(0,
Style.Unit.PX);
style.setProperty("WebkitBoxSizing",
"border-box");
style.setProperty("MozBoxSizing",
"border-box");
style.setProperty("boxSizing",
"border-box");
style.setProperty("lineHeight",
"normal");
// --- End workaround ---
getContainer().setWidget(widget);
}
开发者ID:kiegroup,项目名称:appformer,代码行数:35,代码来源:CheckBoxDOMElement.java
示例14: ensureDomEventHandlers
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
public void ensureDomEventHandlers(final CheckBox checkBox) {
checkBox.addChangeHandler(new ChangeHandler() {
@Override
public void onChange(ChangeEvent event) {
ValueChangeEvent.fire(checkBox, checkBox.getValue());
}
});
}
开发者ID:gwtbootstrap3,项目名称:gwtbootstrap3,代码行数:11,代码来源:CheckBoxImpl.java
示例15: ensureDomEventHandlers
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
@Override
public void ensureDomEventHandlers(final CheckBox checkBox) {
checkBox.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
ValueChangeEvent.fire(checkBox, checkBox.getValue());
}
});
}
开发者ID:gwtbootstrap3,项目名称:gwtbootstrap3,代码行数:12,代码来源:CheckBoxImplIE8.java
示例16: 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;
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:11,代码来源:AttributeColumnConfigRowView.java
示例17: 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;
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:11,代码来源:AttributeColumnConfigRowView.java
示例18: 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;
}
开发者ID:kiegroup,项目名称:drools-wb,代码行数:11,代码来源:AttributeColumnConfigRowView.java
示例19: EnumValuePairOptionEditorViewImpl
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
public EnumValuePairOptionEditorViewImpl() {
checkBox = new CheckBox( );
checkBox.addClickHandler( new ClickHandler() {
@Override
public void onClick( ClickEvent event ) {
presenter.onValueChange();
}
} );
}
开发者ID:kiegroup,项目名称:kie-wb-common,代码行数:10,代码来源:EnumValuePairOptionEditorViewImpl.java
示例20: addCheckBox
import org.gwtbootstrap3.client.ui.CheckBox; //导入依赖的package包/类
public void addCheckBox(CheckBox checkBox) {
body.add(checkBox);
checkBox.setValue(true);
}
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:5,代码来源:InventoryDatasetPanel.java
注:本文中的org.gwtbootstrap3.client.ui.CheckBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论