本文整理汇总了Java中com.haulmont.cuba.gui.components.Component.Container方法的典型用法代码示例。如果您正苦于以下问题:Java Component.Container方法的具体用法?Java Component.Container怎么用?Java Component.Container使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.haulmont.cuba.gui.components.Component
的用法示例。
在下文中一共展示了Component.Container方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showFrame
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
@Override
protected void showFrame(Component parent, Frame frame) {
// the same as web window manager does
if (parent instanceof Component.Container) {
Component.Container container = (Component.Container) parent;
for (Component c : container.getComponents()) {
if (c instanceof Component.Disposable) {
Component.Disposable disposable =
(Component.Disposable) c;
if (!disposable.isDisposed()) {
disposable.dispose();
}
}
container.remove(c);
}
container.add(frame);
} else {
throw new IllegalStateException(
"Parent component must be com.haulmont.cuba.gui.components.Component.Container"
);
}
}
示例2: ContainerShortcutActionWrapper
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
public ContainerShortcutActionWrapper(Component.ShortcutAction action,
Component.Container container, KeyCombination keyCombination) {
super(null, keyCombination.getKey().getCode(), KeyCombination.Modifier.codes(keyCombination.getModifiers()));
this.action = action;
this.keyCombination = keyCombination;
this.container = container;
}
示例3: loadPasteZone
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
protected void loadPasteZone(UploadField uploadField, Element element) {
String pasteZoneId = element.attributeValue("pasteZone");
if (StringUtils.isNotEmpty(pasteZoneId)) {
Component pasteZone = context.getFrame().getComponent(pasteZoneId);
if (pasteZone instanceof Component.Container) {
uploadField.setPasteZone((Component.Container) pasteZone);
} else if (pasteZone != null) {
log.warn("Unsupported pasteZone class {}", pasteZone.getClass().getName());
} else {
log.warn("Unable to find pasteZone component with id: {}", pasteZoneId);
}
}
}
示例4: createSubComponents
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
protected void createSubComponents(Component.Container container, Element containerElement) {
LayoutLoader loader = new LayoutLoader(context, factory, layoutLoaderConfig);
loader.setLocale(getLocale());
loader.setMessagesPack(getMessagesPack());
//noinspection unchecked
for (Element subElement : (Collection<Element>) containerElement.elements()) {
if (!isChildElementIgnored(subElement)) {
ComponentLoader componentLoader = loader.createComponent(subElement);
pendingLoadComponents.add(componentLoader);
container.add(componentLoader.getResultComponent());
}
}
}
示例5: getContainer
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
public Component.Container getContainer() {
return container;
}
示例6: getLayout
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
Component.Container getLayout();