本文整理汇总了Java中com.smartgwt.client.widgets.form.fields.RadioGroupItem类的典型用法代码示例。如果您正苦于以下问题:Java RadioGroupItem类的具体用法?Java RadioGroupItem怎么用?Java RadioGroupItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RadioGroupItem类属于com.smartgwt.client.widgets.form.fields包,在下文中一共展示了RadioGroupItem类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFilterCategorySelectionGroup
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
FormItem createFilterCategorySelectionGroup(String serviceUrl) {
if (stationFilterGroups.containsKey(serviceUrl)) {
RadioGroupItem selector = stationFilterGroups.get(serviceUrl);
return selector;
}
RadioGroupItem radioGroup = new RadioGroupItem("sosDataSource");
radioGroup.setShowTitle(false);
radioGroup.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
Object value = event.getValue();
if (value != null) {
hideInfoWindow();
controller.setStationFilter(value.toString());
controller.updateContentUponStationFilter();
}
}
});
stationFilterGroups.put(serviceUrl, radioGroup);
return radioGroup;
}
示例2: getRadioGroupItem
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
public RadioGroupItem getRadioGroupItem(Field f, String lang) {
RadioGroupItem item = new RadioGroupItem(f.getName(), f.getTitle(lang));
item.setVertical(false);
item.setValueMap(f.getValueMap());
item.setWrap(false);
item.setWrapTitle(false);
return item;
}
示例3: getMapTypesForm
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private Canvas getMapTypesForm() {
LinkedHashMap<String, String> licenseMap = new LinkedHashMap<String, String>();
licenseMap.put("GoogleMaps", constants.googleMaps());
licenseMap.put("OSM", constants.osm());
mapOptions = new RadioGroupItem();
mapOptions.setName("mapType");
mapOptions.setTitle(constants.mapTypes());
mapOptions.setValueMap(licenseMap);
mapOptions.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
}
});
mapTypeForm = new DynamicForm();
mapTypeForm.setGroupTitle(constants.selectMapType());
mapTypeForm.setIsGroup(true);
mapTypeForm.setFields();
mapTypeForm.setWidth(500);
mapTypeForm.setVisibility(Visibility.HIDDEN);
mapTypeForm.setFields(mapOptions);
return mapTypeForm;
}
示例4: createOptionsForm
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private DynamicForm createOptionsForm() {
// Creates the main Dynamic form to add the formitems
DynamicForm form = new DynamicForm();
form.setWidth100();
form.setHeight100();
// creates the Radio Button formitem
i_radioGroupItem = new RadioGroupItem();
i_radioGroupItem.setTitle(GRAPH_SELECTION_TITLE);
i_radioGroupItem.setWrapTitle(false);
i_radioGroupItem.setAlign(Alignment.LEFT);
i_radioGroupItem.setValueMap(PIE_CHART, COLUMN_CHART);
i_radioGroupItem.setWidth(200);
i_radioGroupItem.setDefaultValue(i_chartOptionSelected);
i_radioGroupItem.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
i_chartOptionSelected = event.getValue().toString();
createGraphs(i_demographicResult);
}
});
form.setFields(i_radioGroupItem);
return form;
}
示例5: createPredefinedEventSelectionItem
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private RadioGroupItem createPredefinedEventSelectionItem() {
RadioGroupItem radioGroupItem = new RadioGroupItem();
radioGroupItem.setTitle(i18n.selectPredefinedEventForSubscription());
radioGroupItem.addChangedHandler(createSelectionChangedHandler());
radioGroupItem.setValueMap(createSelectionValueMap());
radioGroupItem.setDefaultValue(controller.getDefaultTemplate().name());
return radioGroupItem;
}
示例6: createSelectionChangedHandler
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private ChangedHandler createSelectionChangedHandler() {
return new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
RadioGroupItem item = (RadioGroupItem) event.getItem();
String value = item.getValueAsString();
final SimpleRuleType template = SimpleRuleType.getTypeFor(value);
SelectSubscriptionForm.this.handleRuleTemplateSelection(template);
}
};
}
示例7: StationSelector
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private StationSelector(StationSelectorController controller) {
stationFilterGroups = new HashMap<String, RadioGroupItem>();
controller.setStationPicker(this);
initializeWindow();
initializeContent();
addCloseClickHandler(new CloseClickHandler() {
public void onCloseClick(CloseClickEvent event) {
closeStationpicker();
}
});
}
示例8: setSelectedFilter
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
public void setSelectedFilter(String serviceURL, String filter) {
RadioGroupItem selector = stationFilterGroups.get(serviceURL);
if (selector == null) {
// debug message .. should not happen anyway
getToasterInstance().addErrorMessage("Missing expansion component for " + serviceURL);
} else {
selector.setValue(filter);
}
}
示例9: createFilter
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private DynamicForm createFilter() {
DynamicForm form = new DynamicForm();
form.setBrowserSpellCheck(false);
form.setValidateOnExit(true);
form.setSaveOnEnter(true);
form.setAutoHeight();
form.setWidth100();
form.setNumCols(3);
final RadioGroupItem filterType = new RadioGroupItem(DigitalObjectResourceApi.SEARCH_TYPE_PARAM);
filterType.setVertical(false);
filterType.setShowTitle(false);
filterType.setWrap(false);
// setRedrawOnChange(true) enforces evaluation of other FormItem.setShowIfCondition
filterType.setRedrawOnChange(true);
filterType.setColSpan(2);
final LinkedHashMap<String, String> filterMap = new LinkedHashMap<String, String>();
filterMap.put(FILTER_LAST_CREATED, i18n.DigitalObjectSearchView_FilterGroupLastCreated_Title());
filterMap.put(FILTER_LAST_MODIFIED, i18n.DigitalObjectSearchView_FilterGroupLastModified_Title());
if (!Editor.getInstance().hasPermission("proarc.permission.repository.search.groupOwner")) {
filterMap.put(FILTER_PHRASE, i18n.DigitalObjectSearchView_FilterGroupPhrase_Title());
}
filterMap.put(FILTER_QUERY, i18n.DigitalObjectSearchView_FilterGroupAdvanced_Title());
filterType.setValueMap(filterMap);
filterType.setValue(FILTER_LAST_CREATED);
FormItemIfFunction showIfAdvanced = new StringMatchFunction(filterType, FILTER_QUERY);
FormItemIfFunction showIfPhrase = new StringMatchFunction(filterType, FILTER_PHRASE);
final TextItem phrase = createAdvancedItem(DigitalObjectResourceApi.SEARCH_PHRASE_PARAM,
i18n.DigitalObjectSearchView_FilterPhrase_Title(), showIfPhrase);
phrase.setValidators(new RequiredIfValidator(new RequiredIfFunction() {
@Override
public boolean execute(FormItem formItem, Object value) {
return FILTER_PHRASE.equals(filterType.getValueAsString());
}
}), new LengthRangeValidator() {{
setMax(1000);
}});
SubmitItem submit = new SubmitItem("search", i18n.DigitalObjectSearchView_FilterSearchButton_Title());
form.setFields(filterType, new SpacerItem() {{setWidth("100%");}},
phrase,
createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_TITLE_PARAM,
i18n.DigitalObjectSearchView_FilterAdvancedTitle_Title(), showIfAdvanced),
createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_IDENTIFIER_PARAM,
i18n.DigitalObjectSearchView_FilterAdvancedIdentifier_Title(), showIfAdvanced),
createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_CREATOR_PARAM,
i18n.DigitalObjectSearchView_FilterAdvancedCreator_Title(), showIfAdvanced),
createAdvancedItem(DigitalObjectResourceApi.SEARCH_QUERY_LABEL_PARAM,
i18n.DigitalObjectSearchView_FilterAdvancedLabel_Title(), showIfAdvanced),
createAdvancedItem(DigitalObjectResourceApi.SEARCH_OWNER_PARAM,
i18n.DigitalObjectSearchView_FilterAdvancedOwner_Title(), showIfAdvanced),
createModelItem(i18n.DigitalObjectSearchView_FilterAdvancedModel_Title(),
new StringMatchFunction(filterType, FILTER_LAST_CREATED, FILTER_LAST_MODIFIED, FILTER_QUERY)),
submit);
form.addSubmitValuesHandler(new SubmitValuesHandler() {
@Override
public void onSubmitValues(SubmitValuesEvent event) {
if (filters.validate(false)) {
filter();
}
}
});
return form;
}
示例10: getAccessForm
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private Canvas getAccessForm() {
messageViewOptions = new RadioGroupItem();
messageViewOptions.setName("messageViews");
messageViewOptions.setTitle(constants.messageViews());
messageViewOptions.setValueMap(new String[]{
constants.messagesOnly(),
constants.messagesAndMap(),
constants.mapViewOnly(),
constants.customHtml()});
messageViewOptions.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
int messageViewType = Game.MESSAGE_MAP;
if (event.getValue() != null) {
if (event.getValue().equals(constants.messagesOnly())) {
messageViewType = Game.MESSAGE_LIST;
mapTypeForm.setVisibility(Visibility.HIDDEN);
canvas.setVisibility(Visibility.HIDDEN);
} else if (event.getValue().equals(constants.messagesAndMap())) {
messageViewType = Game.MESSAGE_MAP;
mapTypeForm.setVisibility(Visibility.INHERIT);
canvas.setVisibility(Visibility.HIDDEN);
} else if (event.getValue().equals(constants.mapViewOnly())) {
messageViewType = Game.MAP_VIEW;
mapTypeForm.setVisibility(Visibility.INHERIT);
canvas.setVisibility(Visibility.HIDDEN);
} else if (event.getValue().equals(constants.customHtml())) {
messageViewType = Game.CUSTOM_HTML;
mapTypeForm.setVisibility(Visibility.HIDDEN);
canvas.setVisibility(Visibility.INHERIT);
}
}
game.setMessageView(messageViewType);
game.writeToCloud(new JsonCallback() {
public void onJsonReceived(JSONValue jsonValue) {
}
});
}
});
messageViewTypeForm = new DynamicForm();
messageViewTypeForm.setGroupTitle(constants.selectMessageView());
messageViewTypeForm.setIsGroup(true);
messageViewTypeForm.setWidth(300);
messageViewTypeForm.setFields(messageViewOptions);
return messageViewTypeForm;
}
示例11: getAccessForm
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private Canvas getAccessForm() {
sharingOptions = new RadioGroupItem();
sharingOptions.setName("sharing");
sharingOptions.setTitle(constants.shareVisibilityOptions());
sharingOptions.setValueMap(new String[] { constants.privateSharing(),
constants.linkSharing(), constants.publicSharing() });
sharingOptions.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
int sharingType = 1;
if (event.getValue() != null) {
if (event.getValue().equals(constants.linkSharing())) {
sharingType = 2;
}
if (event.getValue().equals(constants.publicSharing())) {
sharingType = 3;
licenseForm.setVisibility(Visibility.INHERIT);
if (game.getString(GameModel.LICENSE_CODE).equals("")) {
licenseOptions.setValue("cc-by");
game.setString(GameModel.LICENSE_CODE, "cc-by");
}
} else {
licenseForm.setVisibility(Visibility.HIDDEN);
game.setString(GameModel.LICENSE_CODE, "");
}
game.setLong(GameModel.SHARING_FIELD, sharingType);
game.writeToCloud(new JsonCallback() {
public void onJsonReceived(JSONValue jsonValue) {
}
});
}
}
});
sharingForm = new DynamicForm();
sharingForm.setGroupTitle("Access");
sharingForm.setIsGroup(true);
sharingForm.setWidth(300);
sharingForm.setFields(sharingOptions);
return sharingForm;
}
示例12: getLicenseForm
import com.smartgwt.client.widgets.form.fields.RadioGroupItem; //导入依赖的package包/类
private Canvas getLicenseForm() {
LinkedHashMap<String, String> licenseMap = new LinkedHashMap<String, String>();
licenseMap.put("cc-by", CCBY);
licenseMap.put("cc-by-nd", "Attribution-NoDerivs BY-ND");
licenseMap.put("cc-by-sa", "Attribution-ShareAlike BY-SA");
licenseMap.put("cc-by-nc", "Attribution-NonCommercial BY-NC");
licenseMap.put("cc-by-nc-sa", "Attribution-NonCommercial-ShareAlike BY-NC-SA");
licenseMap.put("cc-by-nc-nd", "Attribution-NonCommercial-NoDerivs BY-NC-ND");
licenseOptions = new RadioGroupItem();
licenseOptions.setName("license");
licenseOptions.setTitle("choose creative commons license");
licenseOptions.setValueMap(licenseMap);
// "Attribution-NonCommercial CC BY-NC",
// "Attribution-NonCommercial-NoDerivs CC BY-NC-ND"
// });
licenseOptions.addChangedHandler(new ChangedHandler() {
@Override
public void onChanged(ChangedEvent event) {
game.setString(GameModel.LICENSE_CODE, (String) event.getValue());
game.writeToCloud(new JsonCallback() {
public void onJsonReceived(JSONValue jsonValue) {
}
});
}
});
licenseForm = new DynamicForm();
licenseForm.setGroupTitle("License");
licenseForm.setIsGroup(true);
licenseForm.setFields();
licenseForm.setWidth(500);
licenseForm.setVisibility(Visibility.HIDDEN);
licenseForm.setFields(licenseOptions);
return licenseForm;
}