当前位置: 首页>>代码示例>>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;未经允许,请勿转载。