本文整理汇总了Java中com.haulmont.cuba.gui.components.Component.ActionsHolder方法的典型用法代码示例。如果您正苦于以下问题:Java Component.ActionsHolder方法的具体用法?Java Component.ActionsHolder怎么用?Java Component.ActionsHolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.haulmont.cuba.gui.components.Component
的用法示例。
在下文中一共展示了Component.ActionsHolder方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DeclarativeAction
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
public DeclarativeAction(String id, String caption, String description, String icon, String enable, String visible,
String methodName, @Nullable String shortcut, Component.ActionsHolder holder) {
super(id, shortcut);
this.caption = caption;
this.description = description;
this.icon = icon;
setEnabled(enable == null || Boolean.parseBoolean(enable));
setVisible(visible == null || Boolean.parseBoolean(visible));
this.methodName = methodName;
checkActionsHolder(holder);
}
示例2: checkActionsHolder
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
protected void checkActionsHolder(Component.ActionsHolder holder) {
if (holder instanceof Frame) {
frame = (Frame) holder;
} else if (holder instanceof Component.BelongToFrame) {
frame = ((Component.BelongToFrame) holder).getFrame();
} else {
throw new IllegalStateException(String.format("Component %s can't contain DeclarativeAction", holder));
}
}
示例3: loadDeclarativeAction
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
@Override
protected Action loadDeclarativeAction(Component.ActionsHolder actionsHolder, Element element) {
String id = element.attributeValue("id");
if (StringUtils.isEmpty(id)) {
throw new GuiDevelopmentException("No action id provided", context.getFullFrameId(),
"ActionsHolder ID", actionsHolder.getId());
}
if (StringUtils.isBlank(element.attributeValue("invoke"))) {
// Try to create a standard list action
for (ListActionType type : ListActionType.values()) {
if (type.getId().equals(id)) {
Action instance = type.createAction((ListComponent) actionsHolder);
loadStandardActionProperties(instance, element);
loadActionOpenType(instance, element);
loadActionConstraint(instance, element);
loadShortcut(instance, element);
return instance;
}
}
}
return super.loadDeclarativeAction(actionsHolder, element);
}
示例4: CollectionDsActionsNotifier
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
public CollectionDsActionsNotifier(Component.ActionsHolder actionsHolder) {
this.actionsHolder = actionsHolder;
}
示例5: DeclarativeTrackingAction
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
public DeclarativeTrackingAction(String id, String caption, String description, String icon, String enable, String visible,
String methodName, @Nullable String shortcut, Component.ActionsHolder holder) {
super(id, caption, description, icon, enable, visible, methodName, shortcut, holder);
}
示例6: loadDeclarativeAction
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
@Override
protected Action loadDeclarativeAction(Component.ActionsHolder actionsHolder, Element element) {
return loadPickerDeclarativeAction(actionsHolder, element);
}