本文整理汇总了Java中com.google.gwt.user.client.ui.SimpleCheckBox类的典型用法代码示例。如果您正苦于以下问题:Java SimpleCheckBox类的具体用法?Java SimpleCheckBox怎么用?Java SimpleCheckBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SimpleCheckBox类属于com.google.gwt.user.client.ui包,在下文中一共展示了SimpleCheckBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildSpacesList
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
@Override
public void buildSpacesList() {
targetGroupsCheckBoxList.removeAllChildren();
final Map<String, String> spaces = instance.getSpacesMap();
List<String> spaceIds = new ArrayList<String>();
spaceIds.addAll(spaces.keySet());
Comparator<String> compare = new Comparator<String>() {
@Override
public int compare(String o1, String o2) {
String name1 = spaces.get(o1);
String name2 = spaces.get(o2);
return name1.compareToIgnoreCase(name2);
}
};
Collections.sort(spaceIds, compare);
checkBoxes = new HashMap<String, SimpleCheckBox>();
for (String id:spaceIds) {
addSpaceToList(id, spaces.get(id));
}
}
开发者ID:MirrorIP,项目名称:activity-recommendation-app,代码行数:27,代码来源:DiscussionView.java
示例2: updateTargetGroupsList
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public void updateTargetGroupsList() {
Map<String, String> spaces = instance.getSpacesMap();
targetGroupsList.removeAllChildren();
targetSpaces.clear();
StringBuilder builder = new StringBuilder();
for (SimpleCheckBox box:checkBoxes.values()) {
if (box.getValue()) {
Element liElement = Document.get().createLIElement();
liElement.setInnerHTML(spaces.get(box.getFormValue()));
builder.append(spaces.get(box.getFormValue())).append(",");
targetGroupsList.appendChild(liElement);
targetSpaces.add(box.getFormValue());
}
}
if (builder.length() > 0) {
builder.setLength(builder.length()-1);
}
targetGroups = builder.toString();
sendCompleteInformation();
}
开发者ID:MirrorIP,项目名称:activity-recommendation-app,代码行数:22,代码来源:DiscussionView.java
示例3: addSpaceToList
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
private void addSpaceToList(String id, String spaceName) {
Element trElement = Document.get().createTRElement();
Element tdCheckElement = Document.get().createTDElement();
SimpleCheckBox checkBox = SimpleCheckBox.wrap(Document.get().createCheckInputElement());
checkBox.setFormValue(id);
Element tdTitleElement = Document.get().createTDElement();
Element spanElement = Document.get().createSpanElement();
spanElement.setInnerHTML(spaceName);
tdCheckElement.appendChild(checkBox.getElement());
tdTitleElement.appendChild(spanElement);
trElement.appendChild(tdCheckElement);
trElement.appendChild(tdTitleElement);
targetGroupsCheckBoxList.appendChild(trElement);
checkBoxes.put(id, checkBox);
targetSpacesListElements.put(id, trElement);
}
开发者ID:MirrorIP,项目名称:activity-recommendation-app,代码行数:22,代码来源:DiscussionView.java
示例4: Switcher
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public Switcher() {
FlowPanel mainPanel = new FlowPanel();
mainPanel.setStyleName(RESOURCES.switcherCSS().onoffswitch());
final String elementId = DOM.createUniqueId();
checkbox = new SimpleCheckBox();
checkbox.getElement().setId(elementId);
checkbox.setName("onoffswitch");
checkbox.setStyleName(RESOURCES.switcherCSS().onoffswitchCheckbox());
mainPanel.add(checkbox);
Element label = DOM.createLabel();
label.setClassName(RESOURCES.switcherCSS().onoffswitchLabel());
label.setAttribute("for", elementId);
Element inner = DOM.createDiv();
inner.setClassName(RESOURCES.switcherCSS().onoffswitchInner());
label.appendChild(inner);
Element sw = DOM.createDiv();
sw.setClassName(RESOURCES.switcherCSS().onoffswitchSwitch());
label.appendChild(sw);
mainPanel.getElement().appendChild(label);
initWidget(mainPanel);
}
开发者ID:eclipse,项目名称:che,代码行数:29,代码来源:Switcher.java
示例5: setFieldValue
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
protected void setFieldValue(Field f, String value) {
Object field = f.field;
if (value == null)
value = f.defaultValue;
if (field instanceof TextBox)
setFieldValue((TextBox) field, value);
else if (field instanceof IntegerBox)
setFieldValue((IntegerBox) field, value);
else if (field instanceof NumberSpinner)
setFieldValue((NumberSpinner) field, value);
else if (field instanceof LongSpinner)
setFieldValue((LongSpinner) field, value);
else if (field instanceof DoubleSpinner)
setFieldValue((DoubleSpinner) field, value);
else if (field instanceof DoubleBox)
setFieldValue((DoubleBox) field, value);
else if (field instanceof SimpleCheckBox)
setFieldValue((SimpleCheckBox) field, value);
else if (field instanceof ListBox)
setFieldValue((ListBox) field, value);
else if (field instanceof PassivesPanel)
setFieldValue((PassivesPanel) field, value);
else if (field instanceof GemsPanel)
setFieldValue((GemsPanel) field, value);
else if (field instanceof ItemPanel)
setFieldValue((ItemPanel) field, value);
else if (field instanceof SkillsPanel)
setFieldValue((SkillsPanel) field, value);
else if (field instanceof DamageTypePanel)
setFieldValue((DamageTypePanel) field, value);
else if (field instanceof SkillDamagePanel)
setFieldValue((SkillDamagePanel) field, value);
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:37,代码来源:BasePanel.java
示例6: render
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
@Override
public Widget render(Schema property) {
checkbox = new SimpleCheckBox();
// Set it to true if that is the default.
checkbox.setValue("true".equals(property.getDefault()));
// If this property is locked, disable the checkbox
if (property.locked()) {
checkbox.setEnabled(false);
}
return checkbox;
}
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:14,代码来源:SchemaForm.java
示例7: addSpaceToList
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
private void addSpaceToList(final String id) {
HTML trHTML = HTML.wrap(Document.get().createTRElement());
Element checkTD = Document.get().createTDElement();
SimpleCheckBox checkBox = SimpleCheckBox.wrap(Document.get().createCheckInputElement());
checkBox.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (((SimpleCheckBox)event.getSource()).getValue()) {
selectedSpaces.add(id);
} else {
selectedSpaces.remove(id);
}
updateParticipantsLabel();
}
});
if (selectedSpaces.contains(id)) {
checkBox.setValue(true);
}
checkTD.appendChild(checkBox.getElement());
Element nameTD = Document.get().createTDElement();
nameTD.setInnerHTML(spaces.get(id));
trHTML.getElement().appendChild(checkTD);
trHTML.getElement().appendChild(nameTD);
discussionGroupsTable.appendChild(trHTML.getElement());
tableElements.put(id, trHTML);
groupCheckBoxes.put(id, checkBox);
}
开发者ID:MirrorIP,项目名称:activity-recommendation-app,代码行数:31,代码来源:OpenDiscussionPopup.java
示例8: AttachEvidenceDialog
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public AttachEvidenceDialog(final ARApp instance) {
super(instance);
dia = new DialogBox();
dia.setGlassEnabled(true);
dia.setGlassStyleName("transparent");
attachedEvidences = new ArrayList<Evidence>();
evidenceSpaceIds = new ArrayList<String>();
// dataObjects = new HashMap<String, JavaScriptObject>();
listElements = new HashMap<String, HTML>();
checkBoxes = new HashMap<String, SimpleCheckBox>();
build();
}
开发者ID:MirrorIP,项目名称:activity-recommendation-app,代码行数:15,代码来源:AttachEvidenceDialog.java
示例9: addSpaceToList
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
private void addSpaceToList(final String id) {
HTML trHTML = HTML.wrap(Document.get().createTRElement());
Element checkTD = Document.get().createTDElement();
SimpleCheckBox checkBox = SimpleCheckBox.wrap(Document.get().createCheckInputElement());
checkBox.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
if (((SimpleCheckBox)event.getSource()).getValue()) {
evidenceSpaceIds.add(id);
} else {
evidenceSpaceIds.remove(id);
}
if (instance.persistenceServiceAvailable()) {
int index = publishersListBox.getSelectedIndex();
String publisher = null;
if (index > 0) {
publisher = publishersListBox.getValue(index);
}
queryDataObjects(evidenceSpaceIds, publisher, time);
} else {
buildEvidenceList();
}
}
});
checkTD.appendChild(checkBox.getElement());
Element nameTD = Document.get().createTDElement();
nameTD.setInnerHTML(spaces.get(id));
trHTML.getElement().appendChild(checkTD);
trHTML.getElement().appendChild(nameTD);
spacesList.appendChild(trHTML.getElement());
listElements.put(id, trHTML);
}
开发者ID:MirrorIP,项目名称:activity-recommendation-app,代码行数:36,代码来源:AttachEvidenceDialog.java
示例10: getAutoFill
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getAutoFill() {
return autoFill;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:ParagonPanel.java
示例11: getOtherSets
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getOtherSets() {
return otherSets;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:ItemPanel.java
示例12: getSyncWithCoe
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getSyncWithCoe() {
return this.syncWithCoe;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:SkillsPanel.java
示例13: getSpenderFullHatred
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getSpenderFullHatred() {
return spenderFullHatred;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:SkillsPanel.java
示例14: getWolf
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getWolf() {
return wolf;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
示例15: getBbv
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getBbv() {
return bbv;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
示例16: getMassConfusion
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getMassConfusion() {
return massConfusion;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
示例17: getInnerSanctuary
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getInnerSanctuary() {
return innerSanctuary;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
示例18: getConviction
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getConviction() {
return conviction;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
示例19: getCripplingWave
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getCripplingWave() {
return cripplingWave;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
示例20: getPiranhas
import com.google.gwt.user.client.ui.SimpleCheckBox; //导入依赖的package包/类
public SimpleCheckBox getPiranhas() {
return piranhas;
}
开发者ID:dawg6,项目名称:dhcalc,代码行数:4,代码来源:PlayerBuffPanel.java
注:本文中的com.google.gwt.user.client.ui.SimpleCheckBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论