本文整理匯總了Java中com.vaadin.ui.ComboBox.setItemCaptionPropertyId方法的典型用法代碼示例。如果您正苦於以下問題:Java ComboBox.setItemCaptionPropertyId方法的具體用法?Java ComboBox.setItemCaptionPropertyId怎麽用?Java ComboBox.setItemCaptionPropertyId使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.ComboBox
的用法示例。
在下文中一共展示了ComboBox.setItemCaptionPropertyId方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildCombBox
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
/**
* @return a new ComboBox
*/
public ComboBox buildCombBox() {
final ComboBox targetFilter = SPUIComponentProvider.getComboBox(null, "", null, ValoTheme.COMBOBOX_SMALL, false,
"", prompt);
targetFilter.setImmediate(true);
targetFilter.setPageLength(7);
targetFilter.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME);
targetFilter.setSizeUndefined();
if (id != null) {
targetFilter.setId(id);
}
if (valueChangeListener != null) {
targetFilter.addValueChangeListener(valueChangeListener);
}
return targetFilter;
}
示例2: populateNetworks
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
private void populateNetworks(ComboBox networkComboBox, List<OsNetworkDto> networkList) {
try {
networkComboBox.removeAllItems();
if (networkList != null) {
// Calling List Network Service
BeanItemContainer<OsNetworkDto> networkListContainer = new BeanItemContainer<>(OsNetworkDto.class,
networkList);
networkComboBox.setContainerDataSource(networkListContainer);
networkComboBox.setItemCaptionPropertyId("name");
if (networkList.size() > 0) {
networkComboBox.select(networkListContainer.getIdByIndex(0));
}
}
} catch (Exception e) {
ViewUtil.iscNotification(e.getMessage(), Notification.Type.ERROR_MESSAGE);
log.error("Error getting Network List", e);
}
}
示例3: getPolicyComboBox
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
private ComboBox getPolicyComboBox(List<PolicyDto> policyDtoList) {
ComboBox policy = new ComboBox("Select Policy");
policy.setTextInputAllowed(false);
policy.setNullSelectionAllowed(false);
policy.setImmediate(true);
policy.setRequired(true);
policy.setRequiredError("Policy cannot be empty");
BeanItemContainer<PolicyDto> policyListContainer = new BeanItemContainer<>(PolicyDto.class,
policyDtoList);
policy.setContainerDataSource(policyListContainer);
policy.setItemCaptionPropertyId("policyName");
if (policyListContainer.size() > 0) {
policy.select(policyListContainer.getIdByIndex(0));
}
policy.setEnabled(false);
return policy;
}
示例4: createDomainComboBox
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
private ComboBox createDomainComboBox(List<DomainDto> dl) {
ComboBox domainComboBox = new ComboBox();
BeanItemContainer<DomainDto> domainContainer = new BeanItemContainer<DomainDto>(DomainDto.class, dl);
ApplianceManagerConnectorDto mc = (ApplianceManagerConnectorDto) this.managerConnector.getValue();
domainComboBox.setContainerDataSource(domainContainer);
domainComboBox.setTextInputAllowed(false);
domainComboBox.setNullSelectionAllowed(false);
domainComboBox.setItemCaptionPropertyId("name");
domainComboBox.setEnabled(mc.isPolicyMappingSupported());
if (domainComboBox.getItemIds().size() > 0) {
domainComboBox.select(domainContainer.getIdByIndex(0));
}
return domainComboBox;
}
示例5: setFieldDefaults
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
private void setFieldDefaults(ComboBox backingField) {
backingField.setImmediate(true);
backingField.removeAllItems();
for (Object p : backingField.getContainerPropertyIds()) {
backingField.removeContainerProperty(p);
}
// setup displaying property ids
backingField.addContainerProperty(CAPTION_PROPERTY_ID, String.class, "");
backingField.setItemCaptionPropertyId(CAPTION_PROPERTY_ID);
@SuppressWarnings("unchecked")
EnumSet<?> enumSet = EnumSet.allOf((Class<java.lang.Enum>) getTargetPropertyType());
for (Object r : enumSet) {
Item newItem = backingField.addItem(r);
newItem.getItemProperty(CAPTION_PROPERTY_ID).setValue(r.toString());
}
}
示例6: bindEnumField
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
public ComboBox bindEnumField(ComboBox comboBox, AbstractLayout form, ValidatingFieldGroup<E> group,
String fieldLabel, String fieldName, Class<?> clazz)
{
ComboBox field = comboBox;
field.setCaption(fieldLabel);
field.setContainerDataSource(createContainerFromEnumClass(fieldName, clazz));
field.setItemCaptionPropertyId(fieldName);
// field.setCaption(fieldLabel);
field.setNewItemsAllowed(false);
field.setNullSelectionAllowed(false);
field.setTextInputAllowed(true);
field.setWidth(STANDARD_COMBO_WIDTH);
field.setPopupWidth("100%");
field.setImmediate(true);
field.setId(fieldLabel.replace(" ", ""));
addValueChangeListeners(field);
doBinding(group, fieldName, field);
form.addComponent(field);
return field;
}
示例7: getDsComboField
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
private ComboBox getDsComboField() {
final Container container = createContainer();
final ComboBox dsComboBox = SPUIComponentProvider.getComboBox(i18n.getMessage("bulkupload.ds.name"), "", null,
null, false, "", i18n.getMessage("bulkupload.ds.name"));
dsComboBox.setSizeUndefined();
dsComboBox.addStyleName(SPUIDefinitions.BULK_UPLOD_DS_COMBO_STYLE);
dsComboBox.setImmediate(true);
dsComboBox.setFilteringMode(FilteringMode.STARTSWITH);
dsComboBox.setPageLength(7);
dsComboBox.setContainerDataSource(container);
dsComboBox.setItemCaptionPropertyId(SPUILabelDefinitions.VAR_NAME_VERSION);
dsComboBox.setId(UIComponentIdProvider.BULK_UPLOAD_DS_COMBO);
dsComboBox.setWidth("100%");
return dsComboBox;
}
示例8: attach
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
@Override
public void attach() {
setHeight(TAB_HEIGHT);
setMargin(false, true, false, true);
setSpacing(false);
// サーバサイズ
sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize"));
sizeSelect.setNullSelectionAllowed(false);
form.getLayout().addComponent(sizeSelect);
// キーペア
keySelect = new ComboBox(ViewProperties.getCaption("field.keyPair"));
keySelect.setNullSelectionAllowed(false);
keySelect.addContainerProperty(KEY_CAPTION_ID, String.class, null);
keySelect.setItemCaptionPropertyId(KEY_CAPTION_ID);
keySelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
// Windowsの場合はキーペアを無効にする
if (StringUtils.startsWith(image.getImage().getOs(), PCCConstant.OS_NAME_WIN)) {
keySelect.setEnabled(false);
}
form.getLayout().addComponent(keySelect);
// クラスタ
clusterSelect = new ComboBox(ViewProperties.getCaption("field.cluster"));
clusterSelect.setNullSelectionAllowed(false);
form.getLayout().addComponent(clusterSelect);
// ルートサイズ
rootSizeField = new TextField(ViewProperties.getCaption("field.rootSize"));
rootSizeField.setImmediate(true);
form.getLayout().addComponent(rootSizeField);
addComponent(form);
}
示例9: addBooleanFilter
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
/**
* Ajoute un filtre de Boolean sur une liste de colonnes
*
* @param filterRow
* @param container
* @param property
* @param labelTrue
* @param labelFalse
* @param labelNull
*/
private void addBooleanFilter(String property, String labelTrue, String labelFalse, String labelNull) {
HeaderCell cell = getFilterCell(property);
ComboBox cbOuiNon = new ComboBox();
cbOuiNon.setTextInputAllowed(false);
List<BooleanPresentation> liste = new ArrayList<BooleanPresentation>();
BooleanPresentation nullObject = new BooleanPresentation(BooleanValue.ALL,
applicationContext.getMessage("filter.all", null, UI.getCurrent().getLocale()), null);
liste.add(nullObject);
if (labelTrue != null) {
liste.add(new BooleanPresentation(BooleanValue.TRUE, labelTrue, FontAwesome.CHECK_SQUARE_O));
}
if (labelFalse != null) {
liste.add(new BooleanPresentation(BooleanValue.FALSE, labelFalse, FontAwesome.SQUARE_O));
}
if (labelNull != null) {
liste.add(new BooleanPresentation(BooleanValue.NULL, labelNull, FontAwesome.HOURGLASS_HALF));
}
BeanItemContainer<BooleanPresentation> containerOuiNon = new BeanItemContainer<BooleanPresentation>(
BooleanPresentation.class, liste);
cbOuiNon.setNullSelectionItemId(nullObject);
cbOuiNon.setImmediate(true);
cbOuiNon.setContainerDataSource(containerOuiNon);
cbOuiNon.setItemCaptionPropertyId("libelle");
cbOuiNon.setItemCaptionMode(ItemCaptionMode.PROPERTY);
cbOuiNon.setItemIconPropertyId("icone");
cbOuiNon.setWidth(100, Unit.PERCENTAGE);
cbOuiNon.addStyleName(ValoTheme.COMBOBOX_TINY);
cbOuiNon.addValueChangeListener(change -> {
container.removeContainerFilters(property);
if (cbOuiNon.getValue() != null) {
BooleanPresentation value = (BooleanPresentation) cbOuiNon.getValue();
if (value != null) {
BooleanValue booleanValue = value.getValeur();
switch (booleanValue) {
case TRUE:
container.addContainerFilter(new Equal(property, true));
break;
case FALSE:
container.addContainerFilter(new Equal(property, false));
break;
case NULL:
container.addContainerFilter(new Equal(property, null));
break;
default:
break;
}
}
fireFilterListener();
}
});
cell.setComponent(cbOuiNon);
}
示例10: createForm
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
private FormLayout createForm() {
TextField numberTextField = new TextField("Number");
numberTextField.setRequired(true);
numberTextField.setRequiredError("Please enter a flight number!");
numberTextField.setNullRepresentation("");
numberTextField.addValidator(new RegexpValidator("\\w\\w\\d\\d\\d", "Please enter a valid flight number!"));
TextField airlineTextField = new TextField("Airline");
airlineTextField.setRequired(true);
airlineTextField.setRequiredError("Please enter an airline!");
airlineTextField.setNullRepresentation("");
ComboBox departureAirportField = new ComboBox("Departure Airport");
departureAirportField.setTextInputAllowed(false);
departureAirportField.setRequired(true);
departureAirportField.setRequiredError("Please select a depature airport!");
departureAirportField.setItemCaptionPropertyId("name");
departureAirportField.setContainerDataSource(airportContainer);
ComboBox destinationAirportField = new ComboBox("Destination Airport");
destinationAirportField.setTextInputAllowed(false);
destinationAirportField.setRequired(true);
destinationAirportField.setRequiredError("Please select a destination airport!");
destinationAirportField.setItemCaptionPropertyId("name");
destinationAirportField.setContainerDataSource(airportContainer);
TextField priceField = new TextField("Price");
priceField.setRequired(true);
priceField.setRequiredError("Please enter a price!");
priceField.setNullRepresentation("");
priceField.setConverter(new StringToBigDecimalConverter());
priceField.addValidator(new BigDecimalRangeValidator("Please enter a valid price!", new BigDecimal("0.01"), null));
DateField departureField = new DateField("Departure Date");
departureField.setDateFormat("dd.MM.yyyy");
departureField.setRequired(true);
departureField.setRequiredError("Please enter a departure date!");
departureField.addValidator(new DateRangeValidator("Please enter departure date in the future!", new Date(), null, Resolution.DAY));
flightFieldGroup.bind(numberTextField, "number");
flightFieldGroup.bind(airlineTextField, "airline");
flightFieldGroup.bind(departureAirportField, "departureAirport");
flightFieldGroup.bind(destinationAirportField, "destinationAirport");
flightFieldGroup.bind(priceField, "price");
flightFieldGroup.bind(departureField, "date");
return new FormLayout(numberTextField, airlineTextField, departureAirportField, destinationAirportField, priceField, departureField);
}
示例11: VcloudDetailTab
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
public VcloudDetailTab(InstanceDto instance, PlatformDto platform, ImageDto image) {
this.instance = instance;
this.platform = platform;
this.image = image;
setHeight(TAB_HEIGHT);
setMargin(false, true, false, true);
setSpacing(false);
//ストレージタイプ
storageTypeSelect = new ComboBox(ViewProperties.getCaption("field.storageType"));
storageTypeSelect.setWidth(WIDTH_COMBOBOX);
storageTypeSelect.setNullSelectionAllowed(false);
storageTypeSelect.setItemCaptionPropertyId(CID_STORAGE_TYPE);
storageTypeSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
//サーバサイズ
sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize"));
sizeSelect.setWidth(WIDTH_COMBOBOX);
sizeSelect.setNullSelectionAllowed(false);
//キーペア
keySelect = new ComboBox(ViewProperties.getCaption("field.keyPair"));
keySelect.setWidth(KEY_PAIR_WIDTH_COMBOBOX);
keySelect.setNullSelectionAllowed(false);
keySelect.setItemCaptionPropertyId(CID_KEY_PAIR);
keySelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
// Windowsの場合はキーペアを無効にする
if (StringUtils.startsWith(image.getImage().getOs(), PCCConstant.OS_NAME_WIN)) {
keySelect.setEnabled(false);
}
Label spacer = new Label(" ");
spacer.addStyleName("desc-padding-horizontal");
spacer.setHeight("5px");
//データディスクテーブル
dataDiskTable = new DataDiskTable();
//データディスクボタン
dataDiskTableButtons = new DataDiskTableButtons();
form.getLayout().addComponent(storageTypeSelect);
form.getLayout().addComponent(sizeSelect);
form.getLayout().addComponent(keySelect);
form.getLayout().addComponent(spacer);
form.getLayout().addComponent(dataDiskTable);
form.getLayout().addComponent(dataDiskTableButtons);
addComponent(form);
// サーバがStopped以外の場合は、変更不可とする
InstanceStatus status = InstanceStatus.fromStatus(instance.getInstance().getStatus());
if (status != InstanceStatus.STOPPED) {
storageTypeSelect.setEnabled(false);
sizeSelect.setEnabled(false);
keySelect.setEnabled(false);
}
}
示例12: AzureDetailTab
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
public AzureDetailTab(InstanceDto instance, PlatformDto platform, ImageDto image) {
this.instance = instance;
this.platform = platform;
this.image = image;
setHeight(TAB_HEIGHT);
setMargin(false, true, false, true);
setSpacing(false);
sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize"));
sizeSelect.setWidth(COMBOBOX_WIDTH);
sizeSelect.setNullSelectionAllowed(false);
availabilitySetSelect = new ComboBox(ViewProperties.getCaption("field.availabilitySet"));
availabilitySetSelect.setWidth(COMBOBOX_WIDTH);
availabilitySetSelect.setNullSelectionAllowed(false);
locationField = new TextField(ViewProperties.getCaption("field.location"));
locationField.setImmediate(true);
locationField.setWidth(TEXT_WIDTH);
affinityField = new TextField(ViewProperties.getCaption("field.affinityGroup"));
affinityField.setImmediate(true);
affinityField.setWidth(TEXT_WIDTH);
cloudServiceField = new TextField(ViewProperties.getCaption("field.cloudService"));
cloudServiceField.setImmediate(true);
cloudServiceField.setWidth(TEXT_WIDTH);
subnetSelect = new ComboBox(ViewProperties.getCaption("field.subnet"));
subnetSelect.setImmediate(true);
subnetSelect.setWidth(COMBOBOX_WIDTH);
subnetSelect.setNullSelectionAllowed(false);
subnetSelect.setItemCaptionPropertyId(CIDR_BLOCK_CAPTION_ID);
subnetSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
storageAccountField = new TextField(ViewProperties.getCaption("field.storageAccount"));
storageAccountField.setImmediate(true);
storageAccountField.setWidth(COMBOBOX_WIDTH);
Label spacer = new Label(" ");
spacer.addStyleName("desc-padding-horizontal");
spacer.setHeight("5px");
form.getLayout().addComponent(sizeSelect);
form.getLayout().addComponent(availabilitySetSelect);
form.getLayout().addComponent(subnetSelect);
form.getLayout().addComponent(spacer);
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
layout.setMargin(false);
form.getLayout().addComponent(layout);
addComponent(form);
InstanceStatus status = InstanceStatus.fromStatus(instance.getInstance().getStatus());
if (status != InstanceStatus.STOPPED) {
// サーバがStopped以外の場合は、詳細設定タブ自體を変更不可とする
form.setEnabled(false);
} else {
// 停止時は、いくつかの項目を変更不可とする
locationField.setEnabled(false);
// サーバが作成済みのとき、変更不可
if (StringUtils.isNotEmpty(instance.getAzureInstance().getInstanceName())) {
subnetSelect.setEnabled(false);
// TODO 可用性セットが設定済みの場合も変更可能かもしれないが、
// 現段階では、APIから可用性セットの情報を取得できないのでサーバー作成済みの場合、変更不可とする
availabilitySetSelect.setEnabled(false);
}
}
}
示例13: OpenStackDetailTab
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
public OpenStackDetailTab(InstanceDto instance, PlatformDto platform, ImageDto image) {
this.instance = instance;
this.platform = platform;
this.image = image;
setHeight(TAB_HEIGHT);
setMargin(false, true, false, true);
setSpacing(false);
sizeSelect = new ComboBox(ViewProperties.getCaption("field.serverSize"));
sizeSelect.setWidth(COMBOBOX_WIDTH);
sizeSelect.setNullSelectionAllowed(false);
zoneSelect = new ComboBox(ViewProperties.getCaption("field.zone"));
zoneSelect.setWidth(COMBOBOX_WIDTH);
zoneSelect.setNullSelectionAllowed(false);
zoneSelect.setItemCaptionPropertyId(ZONE_CAPTION_ID);
zoneSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
grpSelect = new ComboBox(ViewProperties.getCaption("field.securityGroup"));
grpSelect.setWidth(COMBOBOX_WIDTH);
grpSelect.setImmediate(true);
grpSelect.setNullSelectionAllowed(false);
keySelect = new ComboBox(ViewProperties.getCaption("field.keyPair"));
keySelect.setWidth(COMBOBOX_WIDTH);
keySelect.setNullSelectionAllowed(false);
Label spacer = new Label(" ");
spacer.addStyleName("desc-padding-horizontal");
spacer.setHeight("5px");
form.getLayout().addComponent(sizeSelect);
form.getLayout().addComponent(zoneSelect);
form.getLayout().addComponent(grpSelect);
form.getLayout().addComponent(keySelect);
form.getLayout().addComponent(spacer);
HorizontalLayout layout = new HorizontalLayout();
layout.setSpacing(true);
layout.setMargin(false);
form.getLayout().addComponent(layout);
addComponent(form);
InstanceStatus status = InstanceStatus.fromStatus(instance.getInstance().getStatus());
if (status != InstanceStatus.STOPPED) {
// サーバがStopped以外の場合は、詳細設定タブ自體を変更不可とする
form.setEnabled(false);
} else {
// 停止時は、いくつかの項目を変更不可とする
if (StringUtils.isNotEmpty(instance.getOpenstackInstance().getInstanceId())) {
// 一度でも起動した場合、項目を変更不可とする
form.setEnabled(false);
}
}
}
示例14: attach
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
@Override
public void attach() {
// メインフォーム
Form mainForm = new Form();
Layout mainLayout = mainForm.getLayout();
addComponent(mainForm);
// ロードバランサ名
nameField = new TextField(ViewProperties.getCaption("field.loadBalancerName"));
nameField.setReadOnly(true);
mainLayout.addComponent(nameField);
// サービス名
serviceField = new TextField(ViewProperties.getCaption("field.loadBalancerService"));
serviceField.setReadOnly(true);
mainLayout.addComponent(serviceField);
// ロードバランサ設定パネル
Panel panel = new Panel(ViewProperties.getCaption("field.loadBalancerConfig"));
((Layout) panel.getContent()).setMargin(false, false, false, true);
mainLayout.addComponent(panel);
// サブフォーム
subForm = new Form();
FormLayout sublayout = (FormLayout) this.subForm.getLayout();
sublayout.setMargin(false);
sublayout.setSpacing(false);
panel.getContent().addComponent(subForm);
subForm.setHeight("200px");
// ロードバランサポート
loadBalancerPortField = new TextField(ViewProperties.getCaption("field.loadBalancerPort"));
loadBalancerPortField.setWidth(TEXT_WIDTH);
sublayout.addComponent(loadBalancerPortField);
// サービスポート
servicePortField = new TextField(ViewProperties.getCaption("field.loadBalancerServicePort"));
servicePortField.setWidth(TEXT_WIDTH);
sublayout.addComponent(servicePortField);
// プロトコル
protocolSelect = new ComboBox(ViewProperties.getCaption("field.loadBalancerProtocol"));
protocolSelect.setWidth(TEXT_WIDTH);
protocolSelect.setImmediate(true);
sublayout.addComponent(protocolSelect);
protocolSelect.addListener(new Property.ValueChangeListener() {
@Override
public void valueChange(Property.ValueChangeEvent event) {
protocolValueChange(event);
}
});
// SSLキー
sslKeySelect = new ComboBox(ViewProperties.getCaption("field.loadBalancerSSLKey"));
sslKeySelect.setWidth(TEXT_WIDTH);
sslKeySelect.addContainerProperty(SSLKEY_CAPTION_ID, String.class, null);
sslKeySelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
sslKeySelect.setItemCaptionPropertyId(SSLKEY_CAPTION_ID);
sublayout.addComponent(sslKeySelect);
initValidation();
}
開發者ID:primecloud-controller-org,項目名稱:primecloud-controller,代碼行數:63,代碼來源:WinLoadBalancerConfigListener.java
示例15: attach
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
@Override
public void attach() {
setHeight(TAB_HEIGHT);
setMargin(false, true, false, true);
setSpacing(false);
// フォーム
Form form = new Form();
form.setSizeFull();
addComponent(form);
// ロードバランサ名
loadBalancerNameField = new TextField(ViewProperties.getCaption("field.loadBalancerName"));
form.getLayout().addComponent(loadBalancerNameField);
// コメント
commentField = new TextField(ViewProperties.getCaption("field.comment"));
commentField.setWidth("95%");
form.getLayout().addComponent(commentField);
// プラットフォーム
cloudLabel = new Label();
cloudLabel.setCaption(ViewProperties.getCaption("field.cloud"));
cloudLabel.addStyleName("icon-label");
form.getLayout().addComponent(cloudLabel);
// ロードバランサ種別
typeLabel = new Label();
typeLabel.setCaption(ViewProperties.getCaption("field.loadBalancerType"));
typeLabel.addStyleName("icon-label");
form.getLayout().addComponent(typeLabel);
// 割り當てサービス
serviceSelect = new ComboBox();
serviceSelect.setCaption(ViewProperties.getCaption("field.loadBalancerService"));
serviceSelect.setNullSelectionAllowed(false);
serviceSelect.addContainerProperty(SERVICE_CAPTION_ID, String.class, null);
serviceSelect.setItemCaptionMode(AbstractSelect.ITEM_CAPTION_MODE_PROPERTY);
serviceSelect.setItemCaptionPropertyId(SERVICE_CAPTION_ID);
form.getLayout().addComponent(serviceSelect);
// アルゴリズム
algorithmSelect = new ComboBox();
algorithmSelect.setCaption(ViewProperties.getCaption("field.algorithm"));
algorithmSelect.setNullSelectionAllowed(false);
form.getLayout().addComponent(algorithmSelect);
// パブリックポート
publicPortField = new TextField(ViewProperties.getCaption("field.publicport"));
publicPortField.setWidth("95%");
form.getLayout().addComponent(publicPortField);
// プライベートポート
privatePortField = new TextField(ViewProperties.getCaption("field.privateport"));
privatePortField.setWidth("95%");
form.getLayout().addComponent(privatePortField);
initValidation();
}
開發者ID:primecloud-controller-org,項目名稱:primecloud-controller,代碼行數:60,代碼來源:WinCloudStackLoadBalancerEdit.java