本文整理了Java中com.vaadin.event.Action.getCaption()
方法的一些代码示例,展示了Action.getCaption()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action.getCaption()
方法的具体详情如下:
包路径:com.vaadin.event.Action
类名称:Action
方法名:getCaption
[英]Returns the action's caption.
[中]返回操作的标题。
代码示例来源:origin: com.vaadin/vaadin-server
if (a.getCaption() != null) {
paintTarget.addAttribute("caption", a.getCaption());
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
@Override
public void onWindowContextMenu() {
Collection<Action> actions = getContextActions(CubaWindow.this);
if (!actions.isEmpty()) {
contextActionMapper = new KeyMapper<>();
List<ClientAction> actionsList = new ArrayList<>(actions.size());
for (Action action : actions) {
ClientAction clientAction = new ClientAction(action.getCaption());
clientAction.setActionId(contextActionMapper.key(action));
actionsList.add(clientAction);
}
ClientAction[] clientActions = actionsList.toArray(new ClientAction[actions.size()]);
getRpcProxy(CubaWindowClientRpc.class).showTabContextMenu(clientActions);
}
}
代码示例来源:origin: org.ikasan/ikasan-dashboard-jar
@Override
public void handleAction(Action action, Object o, Object flow)
{
Item item = container.getItem(flow);
ArrayList<Callable<String>> callables = new ArrayList<>();
ModuleControlRunnable moduleControlRunnable = new ModuleControlRunnable(authentication, (Flow)flow, item, flowStates
, action.getCaption(), moduleTable);
callables.add(moduleControlRunnable);
try
{
List<Future<String>> futures = executorService.invokeAll(callables);
StringBuffer result = new StringBuffer();
for(Future<String> future: futures)
{
result.append(future.get()).append("</br>");
}
Notification notification = new Notification("Flow Control Notification", result.toString(), Notification.Type.TRAY_NOTIFICATION, true);
notification.show(Page.getCurrent());
}
catch (Exception e)
{
Notification.show("An error occurred performing flow actions: " + e.getMessage(), Notification.Type.ERROR_MESSAGE);
}
}
});
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private List<CalendarState.Action> createActionsList(
Map<CalendarDateRange, Set<Action>> actionMap) {
if (actionMap.isEmpty()) {
return null;
}
List<CalendarState.Action> calendarActions = new ArrayList<CalendarState.Action>();
SimpleDateFormat formatter = new SimpleDateFormat(
DateConstants.ACTION_DATE_FORMAT_PATTERN);
formatter.setTimeZone(getTimeZone());
for (Entry<CalendarDateRange, Set<Action>> entry : actionMap
.entrySet()) {
CalendarDateRange range = entry.getKey();
Set<Action> actions = entry.getValue();
for (Action action : actions) {
String key = actionMapper.key(action);
CalendarState.Action calendarAction = new CalendarState.Action();
calendarAction.actionKey = key;
calendarAction.caption = action.getCaption();
setResource(key, action.getIcon());
calendarAction.iconKey = key;
calendarAction.startDate = formatter.format(range.getStart());
calendarAction.endDate = formatter.format(range.getEnd());
calendarActions.add(calendarAction);
}
}
return calendarActions;
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-widgets
@Override
public void onTabContextMenu(int tabIndex) {
Tab tab = getTab(tabIndex);
if (tab != null) {
Set<Action> actions = getActions(CubaMainTabSheet.this.getActionTarget(tab));
if (!actions.isEmpty()) {
actionMapper = new KeyMapper<>();
List<ClientAction> actionsList = new ArrayList<>(actions.size());
for (Action action : actions) {
ClientAction clientAction = new ClientAction(action.getCaption());
clientAction.setActionId(actionMapper.key(action));
actionsList.add(clientAction);
}
ClientAction[] clientActions = actionsList.toArray(new ClientAction[actions.size()]);
getRpcProxy(CubaMainTabSheetClientRpc.class).showTabContextMenu(tabIndex, clientActions);
}
}
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework-compatibility
@Override
public <T extends Action & Action.Listener> void addAction(T action) {
super.addAction(action);
nameToKey.put(action.getCaption(), mapper.key(action));
}
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
private void paintActions(PaintTarget target, final Set<Action> actionSet)
throws PaintException {
if (!actionSet.isEmpty()) {
target.addVariable(this, "action", "");
target.startTag("actions");
for (Action a : actionSet) {
target.startTag("action");
if (a.getCaption() != null) {
target.addAttribute("caption", a.getCaption());
}
if (a.getIcon() != null) {
target.addAttribute("icon", a.getIcon());
}
target.addAttribute("key", actionMapper.key(a));
target.endTag("action");
}
target.endTag("actions");
}
}
代码示例来源:origin: org.activiti/activiti-explorer
public void handleAction(Action action, Object sender, Object target) {
if ("escape".equals(action.getCaption())) {
resetAddButton();
} else if ("enter".equals(action.getCaption())) {
if (newTaskTextField != null && newTaskTextField.getValue() != null
&& !"".equals(newTaskTextField.getValue().toString())) {
代码示例来源:origin: com.vaadin/vaadin-compatibility-server
final Action a = i.next();
target.startTag("action");
if (a.getCaption() != null) {
target.addAttribute(TreeConstants.ATTRIBUTE_ACTION_CAPTION,
a.getCaption());
内容来源于网络,如有侵权,请联系作者删除!