private LinkedHashSet<Action> getActionSet(Object target, Object sender) { LinkedHashSet<Action> actions = new LinkedHashSet<>(); if (ownActions != null) { actions.addAll(ownActions); } if (actionHandlers != null) { for (Action.Handler h : actionHandlers) { Action[] as = h.getActions(target, sender); if (as != null) { actions.addAll(Arrays.asList(as)); } } } return actions; } }
protected Set<Action> getActions(Component actionTarget) { Set<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; }
protected Collection<Action> getContextActions(Component actionTarget) { List<Action> actions = new ArrayList<>(); if (contextActionHandlers != null) { for (Action.Handler handler : contextActionHandlers) { Action[] as = handler.getActions(actionTarget, this); if (as != null) { Collections.addAll(actions, as); } } } return actions; }
final Action[] aa = ah.getActions(null, this); if (aa != null) { for (int ai = 0; ai < aa.length; ai++) { final List<String> keys = new ArrayList<String>(); for (Action.Handler ah : actionHandlers) { final Action[] aa = ah.getActions(itemId, this); if (aa != null) { for (int ai = 0; ai < aa.length; ai++) {
final List<String> keys = new ArrayList<String>(); for (Handler ah : actionHandlers) { final Action[] aa = ah.getActions(itemId, this); if (aa != null) { for (int ai = 0; ai < aa.length; ai++) {
private void setActionsForEachHalfHour( Map<CalendarDateRange, Set<Action>> actionMap, Date start, Date end, Action.Handler actionHandler) { GregorianCalendar cal = new GregorianCalendar(getTimeZone(), getLocale()); cal.setTime(start); while (cal.getTime().before(end)) { Date s = cal.getTime(); cal.add(java.util.Calendar.MINUTE, 30); Date e = cal.getTime(); CalendarDateRange range = new CalendarDateRange(s, e, getTimeZone()); Action[] actions = actionHandler.getActions(range, this); if (actions != null) { Set<Action> actionSet = new LinkedHashSet<Action>( Arrays.asList(actions)); actionMap.put(range, actionSet); } } }
private Set<Action> findAndPaintBodyActions(PaintTarget target) { Set<Action> actionSet = new LinkedHashSet<Action>(); if (actionHandlers != null) { final List<String> keys = new ArrayList<String>(); for (Handler ah : actionHandlers) { // Getting actions for the null item, which in this case means // the body item final Action[] actions = ah.getActions(null, this); if (actions != null) { for (Action action : actions) { actionSet.add(action); keys.add(actionMapper.key(action)); } } } target.addAttribute("alb", keys.toArray()); } return actionSet; }
private void setActionsForDay(Map<CalendarDateRange, Set<Action>> actionMap, Date start, Date end, Action.Handler actionHandler) { CalendarDateRange range = new CalendarDateRange(start, end, getTimeZone()); Action[] actions = actionHandler.getActions(range, this); if (actions != null) { Set<Action> actionSet = new LinkedHashSet<Action>( Arrays.asList(actions)); actionMap.put(range, actionSet); } }