当前位置: 首页>>代码示例>>Java>>正文


Java Action.Handler方法代码示例

本文整理汇总了Java中com.vaadin.event.Action.Handler方法的典型用法代码示例。如果您正苦于以下问题:Java Action.Handler方法的具体用法?Java Action.Handler怎么用?Java Action.Handler使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vaadin.event.Action的用法示例。


在下文中一共展示了Action.Handler方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findAndPaintBodyActions

import com.vaadin.event.Action; //导入方法依赖的package包/类
private Set<Action> findAndPaintBodyActions(PaintTarget target) {
    Set<Action> actionSet = new LinkedHashSet<Action>();
    if (actionHandlers != null) {
        final ArrayList<String> keys = new ArrayList<String>();
        for (Action.Handler ah : actionHandlers) {
            // Getting actions for the null item, which in this case means
            // the body item
            final Action[] actions = ah.getActions(this, this);
            if (actions != null) {
                for (Action action : actions) {
                    actionSet.add(action);
                    keys.add(actionMapper.key(action));
                }
            }
        }
        target.addAttribute("alb", keys.toArray());
    }
    return actionSet;
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:20,代码来源:OpenLayersMap.java

示例2: setActionsForEachHalfHour

import com.vaadin.event.Action; //导入方法依赖的package包/类
private void setActionsForEachHalfHour(Map<CalendarDateRange, Set<Action>> actionMap,
                                       ZonedDateTime start, ZonedDateTime end, Action.Handler actionHandler) {

    ZonedDateTime actionTime = start;
    while (actionTime.isBefore(end)) {

        ZonedDateTime endTime = actionTime.plus(30, ChronoUnit.MINUTES);

        CalendarDateRange range = new CalendarDateRange(actionTime, endTime);

        Action[] actions = actionHandler.getActions(range, this);
        if (actions != null) {
            Set<Action> actionSet = new LinkedHashSet<>(Arrays.asList(actions));
            actionMap.put(range, actionSet);
        }

        actionTime = endTime;
    }
}
 
开发者ID:blackbluegl,项目名称:calendar-component,代码行数:20,代码来源:Calendar.java

示例3: setActionsForDay

import com.vaadin.event.Action; //导入方法依赖的package包/类
private void setActionsForDay(Map<CalendarDateRange, Set<Action>> actionMap,
                              ZonedDateTime start, ZonedDateTime end, Action.Handler actionHandler) {

    CalendarDateRange range = new CalendarDateRange(start, end);
    Action[] actions = actionHandler.getActions(range, this);
    if (actions != null) {
        Set<Action> actionSet = new LinkedHashSet<>(Arrays.asList(actions));
        actionMap.put(range, actionSet);
    }
}
 
开发者ID:blackbluegl,项目名称:calendar-component,代码行数:11,代码来源:Calendar.java

示例4: actionOnEmptyCell

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void actionOnEmptyCell(String actionKey, CalDate startDate, CalDate endDate) {

    Action action = actionMapper.get(actionKey);

    for (Action.Handler ah : actionHandlers) {
        ah.handleAction(action, Calendar.this,
                ZonedDateTime.of(startDate.y, startDate.m, startDate.d,
                        startDate.t.h, startDate.t.m, startDate.t.s, 0, getZoneId()));
    }

}
 
开发者ID:blackbluegl,项目名称:calendar-component,代码行数:13,代码来源:Calendar.java

示例5: actionOnItem

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void actionOnItem(String actionKey, CalDate startDate, CalDate endDate, int itemIndex) {

    Action action = actionMapper.get(actionKey);

    for (Action.Handler ah : actionHandlers) {
        ah.handleAction(action, Calendar.this, items.get(itemIndex));
    }
}
 
开发者ID:blackbluegl,项目名称:calendar-component,代码行数:10,代码来源:Calendar.java

示例6: removeActionHandler

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void removeActionHandler(Action.Handler actionHandler) {
    if (actionManager != null) {
        actionManager.removeActionHandler(actionHandler);
        markAsDirty();
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:CubaOrderedActionsLayout.java

示例7: getContextActions

import com.vaadin.event.Action; //导入方法依赖的package包/类
protected HashSet<Action> getContextActions(Component actionTarget) {
    HashSet<Action> actions = new LinkedHashSet<>();
    if (contextActionHandlers != null) {
        for (Action.Handler handler : contextActionHandlers) {
            Action[] as = handler.getActions(actionTarget, this);
            if (as != null) {
                Collections.addAll(actions, as);
            }
        }
    }
    return actions;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:13,代码来源:CubaWindow.java

示例8: getActions

import com.vaadin.event.Action; //导入方法依赖的package包/类
protected Set<Action> getActions(Component actionTarget) {
    HashSet<Action> actions = new LinkedHashSet<>();
    if (actionHandlers != null) {
        for (Action.Handler handler : actionHandlers) {
            Action[] as = handler.getActions(actionTarget, this);
            if (as != null) {
                Collections.addAll(actions, as);
            }
        }
    }
    return actions;
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:13,代码来源:CubaTabSheet.java

示例9: addActionHandler

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void addActionHandler(Action.Handler actionHandler) {
    if (actionHandlers == null) {
        actionHandlers = new LinkedHashSet<>();
    }
    actionHandlers.add(actionHandler);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:8,代码来源:CubaTabSheet.java

示例10: performContextMenuAction

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void performContextMenuAction(String actionKey) {
    if (contextActionMapper != null) {
        Action action = contextActionMapper.get(actionKey);
        Action.Handler[] handlers = contextActionHandlers.toArray(new Action.Handler[contextActionHandlers.size()]);
        for (Action.Handler handler : handlers) {
            handler.handleAction(action, this, CubaWindow.this);
        }

        // forget all painted actions after perform one
        contextActionMapper = null;
    }
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:14,代码来源:CubaWindow.java

示例11: addActionHandler

import com.vaadin.event.Action; //导入方法依赖的package包/类
/**
 * Registers a new action handler for this container
 *
 * @see com.vaadin.event.Action.Container#addActionHandler(Action.Handler)
 */
public void addActionHandler(Action.Handler actionHandler) {
    if (actionHandler != null) {
        if (!actionHandlers.contains(actionHandler)) {
            actionHandlers.add(actionHandler);
            requestRepaint();
        }
    }
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:14,代码来源:OpenLayersMap.java

示例12: removeActionHandler

import com.vaadin.event.Action; //导入方法依赖的package包/类
/**
 * Removes a previously registered action handler for the contents of this
 * container.
 *
 * @see com.vaadin.event.Action.Container#removeActionHandler(Action.Handler)
 */
public void removeActionHandler(Action.Handler actionHandler) {
    if (actionHandlers != null && actionHandlers.contains(actionHandler)) {
        actionHandlers.remove(actionHandler);
        requestRepaint();
    }
}
 
开发者ID:lizardtechblog,项目名称:ExpressZip,代码行数:13,代码来源:OpenLayersMap.java

示例13: handleAction

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void handleAction(Action action, Object sender, Object target) {
	if (action instanceof Action.Handler) {
		((Action.Handler) action).handleAction(action, sender, target);
	}
	else if (action instanceof ButtonListener) {
		((ButtonListener) action).buttonClick(new ClickEvent((Component) sender) );
	}
	else {
		doHandleAction(action, sender, target);
	}
}
 
开发者ID:chelu,项目名称:jdal,代码行数:13,代码来源:TableActionHandler.java

示例14: addActionHandler

import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void addActionHandler(Action.Handler actionHandler) {
    getActionManager().addActionHandler(actionHandler);
    markAsDirty();
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:6,代码来源:CubaOrderedActionsLayout.java

示例15: createTabSheetActionHandler

import com.vaadin.event.Action; //导入方法依赖的package包/类
protected Action.Handler createTabSheetActionHandler(HasTabSheetBehaviour tabSheet) {
    return new MainTabSheetActionHandler(tabSheet);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:4,代码来源:WebAppWorkArea.java


注:本文中的com.vaadin.event.Action.Handler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。