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


Java Dialog.setTransitionOutAnimator方法代码示例

本文整理汇总了Java中com.codename1.ui.Dialog.setTransitionOutAnimator方法的典型用法代码示例。如果您正苦于以下问题:Java Dialog.setTransitionOutAnimator方法的具体用法?Java Dialog.setTransitionOutAnimator怎么用?Java Dialog.setTransitionOutAnimator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.codename1.ui.Dialog的用法示例。


在下文中一共展示了Dialog.setTransitionOutAnimator方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: authenticate

import com.codename1.ui.Dialog; //导入方法依赖的package包/类
/**
 * This method preforms the actual authentication, this method is a blocking
 * method that will display the user the html authentication pages.
 *
 * @return the method if passes authentication will return the access token
 * or null if authentication failed.
 *
 * @throws IOException the method will throw an IOException if something
 * went wrong in the communication.
 * @deprecated use createAuthComponent or showAuthentication which work
 * asynchronously and adapt better to different platforms
 */
public String authenticate() {

    if (token == null) {
        login = new Dialog();
        boolean i = Dialog.isAutoAdjustDialogSize();
        Dialog.setAutoAdjustDialogSize(false);
        login.setLayout(new BorderLayout());
        login.setScrollable(false);

        Component html = createLoginComponent(null, null, null, null);
        login.addComponent(BorderLayout.CENTER, html);
        login.setScrollable(false);
        login.setDialogUIID("Container");
        login.setTransitionInAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 300));
        login.setTransitionOutAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, false, 300));
        login.show(0, 0, 0, 0, false, true);
        Dialog.setAutoAdjustDialogSize(i);
    }

    return token;
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:34,代码来源:Oauth2.java

示例2: authenticate

import com.codename1.ui.Dialog; //导入方法依赖的package包/类
/**
 * This method preforms the actual authentication, this method is a blocking
 * method that will display the user the html authentication pages.
 *
 * @return the method if passes authentication will return the access token
 * or null if authentication failed.
 *
 * @throws IOException the method will throw an IOException if something went
 * wrong in the communication.
 * @deprecated use createAuthComponent or showAuthentication which work asynchronously and adapt better
 * to different platforms
 */
public String authenticate() {

    if (token == null) {
        login = new Dialog();
        boolean i = Dialog.isAutoAdjustDialogSize();
        Dialog.setAutoAdjustDialogSize(false);
        login.setLayout(new BorderLayout());
        login.setScrollable(false);

        Component html = createLoginComponent(null, null, null, null);
        login.addComponent(BorderLayout.CENTER, html);
        login.setScrollable(false);
        login.setDialogUIID("Container");
        login.setTransitionInAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, true, 300));
        login.setTransitionOutAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_VERTICAL, false, 300));
        login.show(0, 0, 0, 0, false, true);
        Dialog.setAutoAdjustDialogSize(i);
    }

    return token;
}
 
开发者ID:shannah,项目名称:cn1,代码行数:34,代码来源:Oauth2.java

示例3: showInifiniteBlocking

import com.codename1.ui.Dialog; //导入方法依赖的package包/类
/**
 * Shows the infinite progress over the whole screen
 */
public Dialog showInifiniteBlocking() {
    Form f = Display.getInstance().getCurrent();
    if(f == null) {
        f = new Form();
        f.show();
    }
    int i = f.getTintColor();
    f.setTintColor(0x90000000);
    Dialog d = new Dialog();
    d.setDialogUIID("Container");
    d.setLayout(new BorderLayout());
    d.addComponent(BorderLayout.CENTER, this);
    d.setTransitionInAnimator(CommonTransitions.createEmpty());
    d.setTransitionOutAnimator(CommonTransitions.createEmpty());
    d.showPacked(BorderLayout.CENTER, false);
    return d;
}
 
开发者ID:shannah,项目名称:cn1,代码行数:21,代码来源:InfiniteProgress.java

示例4: bindTabletLandscapeMaster

import com.codename1.ui.Dialog; //导入方法依赖的package包/类
/**
 * @deprecated this was a half baked idea that made it into the public API
 */
public static void bindTabletLandscapeMaster(final Form rootForm, Container parentContainer, Component landscapeUI, final Component portraitUI, final String commandTitle, Image commandIcon) {
    landscapeUI.setHideInPortrait(true);
    parentContainer.addComponent(BorderLayout.WEST, landscapeUI);

    final Command masterCommand = new Command(commandTitle, commandIcon) {
        public void actionPerformed(ActionEvent ev) {
            Dialog dlg = new Dialog();
            dlg.setLayout(new BorderLayout());
            dlg.setDialogUIID("Container");
            dlg.getContentPane().setUIID("Container");
            Container titleArea = new Container(new BorderLayout());
            dlg.addComponent(BorderLayout.NORTH, titleArea);
            titleArea.setUIID("TitleArea");
            Label title = new Label(commandTitle);
            titleArea.addComponent(BorderLayout.CENTER, title);
            title.setUIID("Title");
            Container body = new Container(new BorderLayout());
            body.setUIID("Form");
            body.addComponent(BorderLayout.CENTER, portraitUI);
            dlg.setTransitionInAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, false, 250));
            dlg.setTransitionOutAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 250));
            dlg.addComponent(BorderLayout.CENTER, body);
            dlg.setDisposeWhenPointerOutOfBounds(true);
            dlg.showStetched(BorderLayout.WEST, true);
            dlg.removeComponent(portraitUI);
        }
    };
    if(Display.getInstance().isPortrait()) {
        if(rootForm.getCommandCount() > 0) {
            rootForm.addCommand(masterCommand, 1);
        } else {
            rootForm.addCommand(masterCommand);                
        }
    }
    rootForm.addOrientationListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            if(portraitUI.getParent() != null) {
                Form f = Display.getInstance().getCurrent();
                if(f instanceof Dialog) {
                    ((Dialog)f).dispose();
                }
            }
            if(Display.getInstance().isPortrait()) {
                rootForm.addCommand(masterCommand, 1);
            } else {
                rootForm.removeCommand(masterCommand);
                rootForm.revalidate();
            }
        }
    });        
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:55,代码来源:MasterDetail.java

示例5: bindTabletLandscapeMaster

import com.codename1.ui.Dialog; //导入方法依赖的package包/类
public static void bindTabletLandscapeMaster(final Form rootForm, Container parentContainer, Component landscapeUI, final Component portraitUI, final String commandTitle, Image commandIcon) {
    landscapeUI.setHideInPortrait(true);
    parentContainer.addComponent(BorderLayout.WEST, landscapeUI);

    final Command masterCommand = new Command(commandTitle, commandIcon) {
        public void actionPerformed(ActionEvent ev) {
            Dialog dlg = new Dialog();
            dlg.setLayout(new BorderLayout());
            dlg.setDialogUIID("Container");
            dlg.getContentPane().setUIID("Container");
            Container titleArea = new Container(new BorderLayout());
            dlg.addComponent(BorderLayout.NORTH, titleArea);
            titleArea.setUIID("TitleArea");
            Label title = new Label(commandTitle);
            titleArea.addComponent(BorderLayout.CENTER, title);
            title.setUIID("Title");
            Container body = new Container(new BorderLayout());
            body.setUIID("Form");
            body.addComponent(BorderLayout.CENTER, portraitUI);
            dlg.setTransitionInAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, false, 250));
            dlg.setTransitionOutAnimator(CommonTransitions.createSlide(CommonTransitions.SLIDE_HORIZONTAL, true, 250));
            dlg.addComponent(BorderLayout.CENTER, body);
            dlg.setDisposeWhenPointerOutOfBounds(true);
            dlg.showStetched(BorderLayout.WEST, true);
            dlg.removeComponent(portraitUI);
        }
    };
    if(Display.getInstance().isPortrait()) {
        if(rootForm.getCommandCount() > 0) {
            rootForm.addCommand(masterCommand, 1);
        } else {
            rootForm.addCommand(masterCommand);                
        }
    }
    rootForm.addOrientationListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt) {
            if(portraitUI.getParent() != null) {
                Form f = Display.getInstance().getCurrent();
                if(f instanceof Dialog) {
                    ((Dialog)f).dispose();
                }
            }
            if(Display.getInstance().isPortrait()) {
                rootForm.addCommand(masterCommand, 1);
            } else {
                rootForm.removeCommand(masterCommand);
                rootForm.revalidate();
            }
        }
    });        
}
 
开发者ID:shannah,项目名称:cn1,代码行数:52,代码来源:MasterDetail.java


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