本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
});
}
示例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()));
}
});
}
示例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);
示例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);
}