本文整理汇总了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;
}
示例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;
}
}
示例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);
}
}
示例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()));
}
}
示例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));
}
}
示例6: removeActionHandler
import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void removeActionHandler(Action.Handler actionHandler) {
if (actionManager != null) {
actionManager.removeActionHandler(actionHandler);
markAsDirty();
}
}
示例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;
}
示例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;
}
示例9: addActionHandler
import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void addActionHandler(Action.Handler actionHandler) {
if (actionHandlers == null) {
actionHandlers = new LinkedHashSet<>();
}
actionHandlers.add(actionHandler);
}
示例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;
}
}
示例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();
}
}
}
示例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();
}
}
示例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);
}
}
示例14: addActionHandler
import com.vaadin.event.Action; //导入方法依赖的package包/类
@Override
public void addActionHandler(Action.Handler actionHandler) {
getActionManager().addActionHandler(actionHandler);
markAsDirty();
}
示例15: createTabSheetActionHandler
import com.vaadin.event.Action; //导入方法依赖的package包/类
protected Action.Handler createTabSheetActionHandler(HasTabSheetBehaviour tabSheet) {
return new MainTabSheetActionHandler(tabSheet);
}