本文整理匯總了Java中com.vaadin.ui.ComboBox.addContainerProperty方法的典型用法代碼示例。如果您正苦於以下問題:Java ComboBox.addContainerProperty方法的具體用法?Java ComboBox.addContainerProperty怎麽用?Java ComboBox.addContainerProperty使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.ComboBox
的用法示例。
在下文中一共展示了ComboBox.addContainerProperty方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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());
}
}
示例2: getValidEmailContacts
import com.vaadin.ui.ComboBox; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
private void getValidEmailContacts(ComboBox targetAddress)
{
JpaBaseDao<ReportEmailRecipient, Long> reportEmailRecipient = JpaBaseDao.getGenericDao(ReportEmailRecipient.class);
targetAddress.addContainerProperty("id", String.class, null);
targetAddress.addContainerProperty("email", String.class, null);
targetAddress.addContainerProperty("namedemail", String.class, null);
for (final ReportEmailRecipient contact : reportEmailRecipient.findAll())
{
if (contact.getEmail() != null)
{
Item item = targetAddress.addItem(contact.getEmail());
if (item != null)
{
item.getItemProperty("email").setValue(contact.getEmail());
item.getItemProperty("id").setValue(contact.getEmail());
item.getItemProperty("namedemail").setValue(contact.getEmail());
}
}
}
}
示例3: 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);
}
示例4: 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
示例5: 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