當前位置: 首頁>>代碼示例>>Java>>正文


Java ItemChangedHandler類代碼示例

本文整理匯總了Java中com.smartgwt.client.widgets.form.events.ItemChangedHandler的典型用法代碼示例。如果您正苦於以下問題:Java ItemChangedHandler類的具體用法?Java ItemChangedHandler怎麽用?Java ItemChangedHandler使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ItemChangedHandler類屬於com.smartgwt.client.widgets.form.events包,在下文中一共展示了ItemChangedHandler類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: addItemChangedHandler

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
@Override
public HandlerRegistration addItemChangedHandler(ItemChangedHandler handler) {
	MultiHandlerRegistration registration = new MultiHandlerRegistration();
	// Due to custom made FormItems, we can't set the handler on the form anymore...
	final ItemChangedHandler itemChangedHandler = handler;
	registration.addRegistration(manager.addHandler(ItemChangedEvent.getType(), handler));
	for (final FormItem formItem : formWidget.getFields()) {
		ChangedHandler h = new ChangedHandler() {

			public void onChanged(ChangedEvent event) {
				itemChangedHandler.onItemChanged(new ItemChangedEvent(formItem.getJsObj()));
			}
		};
		registration.addRegistration(formItem.addChangedHandler(h));
	}
	return registration;
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:18,代碼來源:DefaultFeatureForm.java

示例2: SaveButton

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
public SaveButton() {
	setIcon(WidgetLayout.iconSave);
	setShowDisabledIcon(false);
	setTitle(I18nProvider.getAttribute().btnSaveTitle());
	setTooltip(I18nProvider.getAttribute().btnSaveTooltip());
	attributeTable.addItemChangedHandler(new ItemChangedHandler() {

		public void onItemChanged(ItemChangedEvent event) {
			if (attributeTable.validate()) {
				setDisabled(false);
			} else {
				setDisabled(true);
			}
		}
	});
	addClickHandler(this);
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:18,代碼來源:FeatureAttributeWindow.java

示例3: setItemChangedHandler

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
/** Notifies about form changes. */
private void setItemChangedHandler() {
    this.itemChangedHandler = new ItemChangedHandler() {

        @Override
        public void onItemChanged(ItemChangedEvent event) {
            refreshState();
        }
    };
    taskForm.addItemChangedHandler(itemChangedHandler);
}
 
開發者ID:proarc,項目名稱:proarc,代碼行數:12,代碼來源:WorkflowTaskFormView.java

示例4: OkButton

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
public OkButton() {
	super("Ok");
	setWidth(60);
	attributeTable.addItemChangedHandler(new ItemChangedHandler() {

		public void onItemChanged(ItemChangedEvent event) {
			if (attributeTable.validate()) {
				setDisabled(false);
			} else {
				setDisabled(true);
			}
		}
	});
	addClickHandler(this);
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:16,代碼來源:AttributesAction.java

示例5: initialize

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
public void initialize(FormItem enabledItem, FormItem disabledItem) {
	setWidth("*");
	setHeight(1);
	layout = new VLayout();

	enabledForm = new DynamicForm();
	enabledForm.setWidth("100%");
	enabledItem.setName(FORM_FIELD_NAME);
	enabledItem.setShowTitle(false);
	enabledItem.setWidth("*");
	enabledItem.setColSpan(3);
	enabledForm.setFields(enabledItem);
	enabledForm.setVisible(false);

	disabledForm = new DynamicForm();
	disabledForm.setWidth("100%");
	disabledItem.setName(FORM_FIELD_NAME);
	disabledItem.setShowTitle(false);
	disabledItem.setWidth("*");
	disabledForm.setFields(disabledItem);
	disabledForm.setVisible(false);

	layout.addMember(enabledForm);
	layout.addMember(disabledForm);
	setCanvas(layout);

	enabledForm.addItemChangedHandler(new ItemChangedHandler() {

		public void onItemChanged(ItemChangedEvent event) {
			String disabledValue = (event.getNewValue() == null ? null : event.getNewValue().toString());
			disabledForm.getItem(FORM_FIELD_NAME).setValue(disabledValue);
		}
	});
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:35,代碼來源:EnableToggleFormItem.java

示例6: addChangedHandler

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
public HandlerRegistration addChangedHandler(final ChangedHandler handler) {
	return enabledForm.addItemChangedHandler(new ItemChangedHandler() {

		public void onItemChanged(ItemChangedEvent event) {
			handler.onChanged(new ChangedEvent(EnableToggleFormItem.this.getJsObj()));
		}
	});

}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:10,代碼來源:EnableToggleFormItem.java

示例7: addItemChangedHandler

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
/**
 * Attach a handler that reacts to changes in the fields as the user makes them.
 * 
 * @param handler item changed handler
 * @return handler registration
 */
HandlerRegistration addItemChangedHandler(final ItemChangedHandler handler);
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:8,代碼來源:FeatureForm.java

示例8: addItemChangedHandler

import com.smartgwt.client.widgets.form.events.ItemChangedHandler; //導入依賴的package包/類
/**
 * Add a handler to the change events of the attribute values in the form. Note that editing is only possible when
 * this widget is not disabled.
 */
public void addItemChangedHandler(ItemChangedHandler handler) {
	featureForm.addItemChangedHandler(handler);
}
 
開發者ID:geomajas,項目名稱:geomajas-project-client-gwt,代碼行數:8,代碼來源:FeatureAttributeEditor.java


注:本文中的com.smartgwt.client.widgets.form.events.ItemChangedHandler類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。