本文整理汇总了Java中com.codename1.ui.Form.getLayeredPane方法的典型用法代码示例。如果您正苦于以下问题:Java Form.getLayeredPane方法的具体用法?Java Form.getLayeredPane怎么用?Java Form.getLayeredPane使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.codename1.ui.Form
的用法示例。
在下文中一共展示了Form.getLayeredPane方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addWaitingProgress
import com.codename1.ui.Form; //导入方法依赖的package包/类
private static void addWaitingProgress(Form f, boolean center, Container pane) {
pane.setVisible(false);
Container cnt = f.getLayeredPane();
BorderLayout bl = new BorderLayout();
bl.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE);
cnt.setLayout(bl);
if (center) {
cnt.addComponent(BorderLayout.CENTER, new InfiniteProgress());
} else {
Container top = new Container();
BorderLayout bl1 = new BorderLayout();
bl1.setCenterBehavior(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE);
top.setLayout(bl1);
top.addComponent(BorderLayout.CENTER, new InfiniteProgress());
cnt.addComponent(BorderLayout.NORTH, top);
}
}
示例2: bindFabToContainer
import com.codename1.ui.Form; //导入方法依赖的package包/类
/**
* This is a utility method to bind the FAB to a given Container, it will return a new container to add or will
* use the layered pane if the container is a content pane.
*
* @param cnt the Container to add the FAB to
* @param orientation one of Component.RIGHT/LEFT/CENTER
* @param valign one of Component.TOP/BOTTOM/CENTER
*
* @return a new Container that contains the cnt and the FAB on top or null in the case of a content pane
*/
public Container bindFabToContainer(Component cnt, int orientation, int valign) {
FlowLayout flow = new FlowLayout(orientation);
flow.setValign(valign);
Form f = cnt.getComponentForm();
if(f != null && (f.getContentPane() == cnt || f == cnt)) {
// special case for content pane installs the button directly on the content pane
Container layers = f.getLayeredPane(getClass(), true);
layers.setLayout(flow);
layers.add(this);
return null;
}
Container conUpper = new Container(flow);
conUpper.add(this);
return LayeredLayout.encloseIn(cnt, conUpper);
}
示例3: getToastBarComponent
import com.codename1.ui.Form; //导入方法依赖的package包/类
private ToastBarComponent getToastBarComponent() {
Form f = Display.getInstance().getCurrent();
if (f != null && !(f instanceof Dialog)) {
ToastBarComponent c = (ToastBarComponent)f.getClientProperty("ToastBarComponent");
if (c == null || c.getParent() == null) {
c = new ToastBarComponent();
c.hidden = true;
f.putClientProperty("ToastBarComponent", c);
Container layered = f.getLayeredPane(this.getClass(), true);
layered.setLayout(new BorderLayout());
layered.addComponent(position==Component.TOP ? BorderLayout.NORTH : BorderLayout.SOUTH, c);
updateStatus();
}
if(position == Component.BOTTOM && f.getInvisibleAreaUnderVKB() > 0) {
Style s = c.getAllStyles();
s.setMarginUnit(Style.UNIT_TYPE_PIXELS);
s.setMarginBottom(f.getInvisibleAreaUnderVKB());
}
return c;
}
return null;
}
示例4: removeWaitingProgress
import com.codename1.ui.Form; //导入方法依赖的package包/类
private static void removeWaitingProgress(Form f, Container pane) {
Container cnt = f.getLayeredPane();
cnt.removeAll();
pane.setVisible(true);
}