本文整理汇总了Java中com.haulmont.cuba.gui.components.Component.unwrapComposition方法的典型用法代码示例。如果您正苦于以下问题:Java Component.unwrapComposition方法的具体用法?Java Component.unwrapComposition怎么用?Java Component.unwrapComposition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.haulmont.cuba.gui.components.Component
的用法示例。
在下文中一共展示了Component.unwrapComposition方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: add
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
@Override
public void add(Component childComponent) {
if (childComponent.getParent() != null && childComponent.getParent() != this) {
throw new IllegalStateException("Component already has parent");
}
com.vaadin.ui.Component vComponent = childComponent.unwrapComposition(com.vaadin.ui.Component.class);
component.addComponent(vComponent);
component.setComponentAlignment(vComponent, toVaadinAlignment(childComponent.getAlignment()));
if (frame != null) {
if (childComponent instanceof BelongToFrame
&& ((BelongToFrame) childComponent).getFrame() == null) {
((BelongToFrame) childComponent).setFrame(frame);
} else {
frame.registerComponent(childComponent);
}
}
ownComponents.add(childComponent);
childComponent.setParent(this);
}
示例2: getComponent
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
@Nullable
@Override
public Component getComponent(int index) {
com.vaadin.ui.Component vComponent = getComponentContent().getComponent(index);
for (Component ownComponent : ownComponents) {
if (ownComponent.unwrapComposition(com.vaadin.ui.Component.class) == vComponent) {
return ownComponent;
}
}
return null;
}
示例3: getComponentArea
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
@Nullable
@Override
public Area getComponentArea(Component childComponent) {
com.vaadin.ui.Component vComponent = childComponent.unwrapComposition(com.vaadin.ui.Component.class);
com.vaadin.ui.GridLayout.Area vArea = component.getComponentArea(vComponent);
if (vArea == null) {
return null;
}
return new Area(childComponent,
vArea.getColumn1(), vArea.getRow1(),
vArea.getColumn2(), vArea.getRow2());
}
示例4: findChildComponent
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
protected Component findChildComponent(com.vaadin.ui.Component vComponent) {
for (Component component : getComponents()) {
if (component.unwrapComposition(com.vaadin.ui.Component.class) == vComponent) {
return component;
}
}
return null;
}
示例5: findChildComponent
import com.haulmont.cuba.gui.components.Component; //导入方法依赖的package包/类
protected Component findChildComponent(com.vaadin.ui.Component childComponent) {
for (Component component : getComponents()) {
if (component.unwrapComposition(com.vaadin.ui.Component.class) == childComponent) {
return component;
}
}
return null;
}