本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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();
}
}
});
}
示例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();
}
}
});
}