当前位置: 首页>>代码示例>>Java>>正文


Java Form.getLayeredPane方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:codenameone,项目名称:codenameone-demos,代码行数:19,代码来源:Flickr.java

示例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);
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:28,代码来源:FloatingActionButton.java

示例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;
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:23,代码来源:ToastBar.java

示例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);
}
 
开发者ID:codenameone,项目名称:codenameone-demos,代码行数:6,代码来源:Flickr.java


注:本文中的com.codename1.ui.Form.getLayeredPane方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。