本文整理汇总了Java中com.vaadin.client.annotations.OnStateChange类的典型用法代码示例。如果您正苦于以下问题:Java OnStateChange类的具体用法?Java OnStateChange怎么用?Java OnStateChange使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OnStateChange类属于com.vaadin.client.annotations包,在下文中一共展示了OnStateChange类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setSelectionMode
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("selectionMode")
void setSelectionMode() {
if (clickHandler != null) {
clickHandler.removeHandler();
clickHandler = null;
}
BodyClickHandler handler;
Grid<JsonObject> grid = getGrid();
switch (getState().selectionMode) {
case CTRL:
handler = new CtrlClickSelectionHandler(grid);
break;
case SIMPLE:
handler = new SimpleClickSelectionHandler(grid);
break;
case SHIFT:
handler = new ShiftCtrlClickSelectionHandler(grid, getRpcProxy(ShiftSelectRpc.class));
break;
case NONE:
default:
return;
}
clickHandler = grid.addBodyClickHandler(handler);
}
示例2: updateOpenShortcuts
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("openShortcuts")
void updateOpenShortcuts() {
editorManager.clearOpenShortcuts();
for (int sc : getState().openShortcuts) {
editorManager.addOpenShortcut(sc);
}
}
示例3: updateCloseShortcuts
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("closeShortcuts")
void updateCloseShortcuts() {
editorManager.clearCloseShortcuts();
for (int sc : getState().closeShortcuts) {
editorManager.addCloseShortcut(sc);
}
}
示例4: updateFocusTracking
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange({"hasFocusListener", "hasCellFocusListener", "hasRowFocusListener", "hasRowEditListener", "hasCellEditListener", "hasEditorOpenListener" })
void updateFocusTracking() {
FastNavigationState state = getState();
if (state.hasFocusListener || state.hasCellFocusListener || state.hasRowFocusListener || state.hasCellEditListener || state.hasRowEditListener || state.hasEditorOpenListener) {
focusTracker.start();
if (state.hasEditorOpenListener) editorManager.setWaitForExternalUnlock(getState().hasFocusListener);
else editorManager.setWaitForExternalUnlock(false);
} else {
focusTracker.stop();
}
}
示例5: changeSideTool
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("mySecondary")
private void changeSideTool() {
GwtToolWindowStripeButton widget = getWidget();
GwtToolWindowStripeInner stripeInner = GwtUIUtil.getParentOf(widget, GwtToolWindowStripeInner.class);
if (stripeInner == null) {
return;
}
stripeInner.add(widget, getState().mySecondary);
}
示例6: onSizeChanged
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange({"myWidth", "myHeight"})
private void onSizeChanged() {
if (getState().myWidth != -1) {
getWidget().setWidth(getState().myWidth + "px");
}
if (getState().myHeight != -1) {
getWidget().setHeight(getState().myHeight + "px");
}
}
示例7: updateResource
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("resources")
void updateResource() {
getWidget().setResourceFile(getResourceUrl("resourceFile"));
}
示例8: onStateChangeBootstrapMode
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("bootstrapMode")
void onStateChangeBootstrapMode() {
getWidget().setMode(getState().bootstrapMode);
}
示例9: onStateChangeFieldDescription
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange({"fieldDescription", "fieldDescriptionContentMode"})
void onStateChangeFieldDescription() {
getWidget().setDescription(getState().fieldDescription, getState().fieldDescriptionContentMode);
}
示例10: onStateChangeFieldFeedback
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange({"fieldFeedback", "fieldFeedbackContentMode"})
void onStateChangeFieldFeedback() {
getWidget().setFeedback(getState().fieldFeedback, getState().fieldFeedbackContentMode);
}
示例11: onStateChangeStyle
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("labelStyle")
void onStateChangeStyle() {
getWidget().setLabelRatio(getState().labelStyle);
}
示例12: onStateChangeFieldStyle
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("fieldStyle")
void onStateChangeFieldStyle() {
getWidget().setFieldRatio(getState().fieldStyle);
}
示例13: onStateChangeFieldDescriptionHeightReservedIfEmpty
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("fieldDescriptionHeightReservedIfEmpty")
void onStateChangeFieldDescriptionHeightReservedIfEmpty() {
getWidget().setDescriptionHeightReservedIfEmpty(getState().fieldDescriptionHeightReservedIfEmpty);
onStateChangeFieldDescription();
}
示例14: onStateChangeFieldFeedbackHeightReservedIfEmpty
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange("fieldFeedbackHeightReservedIfEmpty")
void onStateChangeFieldFeedbackHeightReservedIfEmpty() {
getWidget().setFeedbackHeightReservedIfEmpty(getState().fieldFeedbackHeightReservedIfEmpty);
onStateChangeFieldFeedback();
}
示例15: onSelectionChange
import com.vaadin.client.annotations.OnStateChange; //导入依赖的package包/类
@OnStateChange({ "selectedItemKeys", "selectedItemsCaption" })
private void onSelectionChange() {
getDataReceivedHandler().updateSelectionFromServer( getState().selectedItemKeys,
getState().selectedItemsCaption);
}