• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java UiApplication类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.rim.device.api.ui.UiApplication的典型用法代码示例。如果您正苦于以下问题:Java UiApplication类的具体用法?Java UiApplication怎么用?Java UiApplication使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



UiApplication类属于net.rim.device.api.ui包,在下文中一共展示了UiApplication类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: finishEdit

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
protected void finishEdit() {
    if (this.finished) {
        return;
    }
    this.finished = true;
    if (!this.cancel) {
        Display.getInstance().onEditingComplete(lightweightEdit, nativeEdit.getText());
    }
    if (isTouchDevice()) {
        UiApplication.getUiApplication().invokeLater(new Runnable() {

            public void run() {
                Display.getInstance().setShowVirtualKeyboard(false);
            }
        });
    }
    UiApplication.getUiApplication().popScreen(this);
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:19,代码来源:BlackBerryImplementation.java


示例2: stopScan

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void stopScan() {
    if (timer != null) {
        timer.cancel(); // stop the timer
    }
    // Destroy the videoControl and player

    if (videoControl != null) {
        // TODO: This might not be needed, but have it just in case
        videoControl.setVisible(false);
        videoControl = null;
    }
    if (player != null) {
        player.close();
        player = null;
    }
    if (viewFinderScreen != null) {
        synchronized (Application.getEventLock()) {
            // viewFinderScreen.close();
            UiApplication.getUiApplication().popScreen(viewFinderScreen);
        }
        viewFinderScreen = null;
    }
    System.gc();
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:25,代码来源:CodeScannerImpl.java


示例3: logout

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public static void logout() {
    api.longpoll.stop();

    MessagesStorage.instance.clear();
    UserStorage.instance.clear();
    UsersStorage.instance.clear();

    SafeStorage.instance.delete("ui_longpoll_lastts");
    SafeStorage.instance.delete("longpoll.ts");
    SafeStorage.instance.delete("longpoll.maxmid");

    OptionsStorage.instance.delete("account.access_token");
    OptionsStorage.instance.delete("account.user_id");
    OptionsStorage.instance.delete("account.secret");

    while (UiApplication.getUiApplication().getActiveScreen() != null) {
        UiApplication.getUiApplication().popScreen();
    }

    UiApplication.getUiApplication().pushScreen(Vika.createLoginScreen());
}
 
开发者ID:yanex,项目名称:vika,代码行数:22,代码来源:Vika.java


示例4: logout

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
private void logout() {
    Vika.api().longpoll.stop();

    MessagesStorage.instance.clear();
    UserStorage.instance.clear();
    UsersStorage.instance.clear();

    SafeStorage.instance.delete("ui_longpoll_lastts");
    SafeStorage.instance.delete("longpoll.ts");
    SafeStorage.instance.delete("longpoll.maxmid");

    OptionsStorage.instance.delete("account.access_token");
    OptionsStorage.instance.delete("account.user_id");
    OptionsStorage.instance.delete("account.secret");

    while (UiApplication.getUiApplication().getActiveScreen() != null) {
        UiApplication.getUiApplication().popScreen();
    }

    UiApplication.getUiApplication().pushScreen(Vika.createLoginScreen());
}
 
开发者ID:yanex,项目名称:vika,代码行数:22,代码来源:RootScreen.java


示例5: itemClick

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void itemClick(int id, AbstractListItem item) {
    if (id == 0 && stack.size() > 0) {
        back();
        return;
    }

    FileItem fi = (FileItem) item;
    FileSystemObject fso = fi.getFileSystemObject();

    if (fso.isFile) {
        filename = fso.where + fso.name;
        UiApplication.getUiApplication().popScreen(this);
    } else {
        stack.push(fso);
        reload();
    }
}
 
开发者ID:yanex,项目名称:vika,代码行数:18,代码来源:FileSelectWindow.java


示例6: DisplayStory

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
DisplayStory(EncodedImage original, Bitmap img, UiApplication app, int time) {
	_original = original; 
	int direction = Display.DIRECTION_NORTH;
	Ui.getUiEngineInstance().setAcceptableDirections(direction);

	monApp = app;
	_img = img;
	
	//this.setTitle(Caption);
	this.addMenuItem(_ScreenShootitem);
	this.addMenuItem(_Nextstoryitem);
	this.addMenuItem(_EndStoryitem);
	// afficher l'image.
	HorizontalFieldManager SnapManager = new HorizontalFieldManager();
	bmp = new BitmapField();
	SnapManager.add(bmp);
	this.add(SnapManager);
	
	t = new Timer();
	t.schedule(new Chronometer(time, img), 0, 1000);
}
 
开发者ID:PropheteMath,项目名称:CrapSnap,代码行数:22,代码来源:DisplayStory.java


示例7: run

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void run() {
	synchronized (UiApplication.getEventLock()) {
		if (_time > 0) {
			Bitmap _bmp = new Bitmap(Display.getWidth(),
					Display.getHeight());
			Graphics g = new Graphics(_bmp);
			g.setColor(Color.BLACK);
			g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
			g.drawBitmap(
					((_bmp.getWidth() / 2) - (_img.getWidth() / 2)), 0,
					_img.getWidth(), _img.getHeight(), _img, 0, 0);
			g.setColor(Color.WHITE);
			g.drawText(_time + "s", Display.getWidth() - 60,
					Display.getHeight() - 50);
			bmp.setBitmap(_bmp);
			_time--;				
		} else {
			t.cancel();
			quit();			
		}
	}
}
 
开发者ID:PropheteMath,项目名称:CrapSnap,代码行数:23,代码来源:DisplayStory.java


示例8: DisplaySnap

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
DisplaySnap(EncodedImage original, Bitmap img, int time, UiApplication app, JSONObject Current, String key) {
	_original = original;
	int direction = Display.DIRECTION_NORTH;
	Ui.getUiEngineInstance().setAcceptableDirections(direction);
	monApp = app;
	_img = img;
	_Current = Current;
	_key = key;
	
	// afficher l'image.
	
	this.addMenuItem(_ScreenShootitem);
	
	HorizontalFieldManager SnapManager = new HorizontalFieldManager();
	bmp = new BitmapField();
	SnapManager.add(bmp);
	this.add(SnapManager);
	
	t = new Timer();
	t.schedule(new Chronometer(time, img), 0, 1000);
}
 
开发者ID:PropheteMath,项目名称:CrapSnap,代码行数:22,代码来源:DisplaySnap.java


示例9: run

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void run() {
	synchronized (UiApplication.getEventLock()) {
		if (_time > 0) {
			Bitmap _bmp = new Bitmap(Display.getWidth(),
					Display.getHeight());
			Graphics g = new Graphics(_bmp);
			g.setColor(Color.BLACK);
			g.fillRect(0, 0, Display.getWidth(), Display.getHeight());
			g.drawBitmap(
					((_bmp.getWidth() / 2) - (_img.getWidth() / 2)), 0,
					_img.getWidth(), _img.getHeight(), _img, 0, 0);
			g.setColor(Color.WHITE);
			g.drawText(_time + "s", Display.getWidth() - 60,
					Display.getHeight() - 50);
			bmp.setBitmap(_bmp);
			_time--;				
		} else {
			t.cancel();
			quit();
						
		}
	}
}
 
开发者ID:PropheteMath,项目名称:CrapSnap,代码行数:24,代码来源:DisplaySnap.java


示例10: ViewStory

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
ViewStory(JSONObject Current, UiApplication monApp) {
	int direction = Display.DIRECTION_NORTH;
	Ui.getUiEngineInstance().setAcceptableDirections(direction);
	_monApp = monApp;
	_Current = Current;
	this.setTitle(" CrapSnap - View Stories");
	Bitmap back = EncodedImage.getEncodedImageResource("snapBack.png")
			.getBitmap();
	this.setBackground(BackgroundFactory.createBitmapBackground(back));

	// {
	// username: "youraccount",
	// timestamp: 1373207221,
	// req_token: create_token(auth_token, 1373207221)
	// }

	populate();

}
 
开发者ID:PropheteMath,项目名称:CrapSnap,代码行数:20,代码来源:ViewStory.java


示例11: SplashScreen

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
SplashScreen(UiApplication app){
	
	int direction = Display.DIRECTION_NORTH;
	Ui.getUiEngineInstance().setAcceptableDirections(direction);
	monApp = app;
	synchronized (UiApplication.getEventLock()) {
		UiApplication.getUiApplication().invokeLater(new Runnable() {
			public void run() {
				try {
					Status.show("Loading...");
				} catch (Exception e) {
					Dialog.inform(e.getMessage());
				}
			}
		});
		t = new Timer();
		t.schedule(new Chronometer(), 0, 100);
	}
}
 
开发者ID:PropheteMath,项目名称:CrapSnap,代码行数:20,代码来源:SplashScreen.java


示例12: flush

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void flush(int x, int y, int w, int h, UiApplication app) {
    painted = false;
    invalidate(x, y, w, h);
    app.updateDisplay();
    long time = System.currentTimeMillis();
    while(!painted && app.isForeground() && !app.isPaintingSuspended()) {
        Thread.yield();

        // timeout on waiting to avoid freezing
        // http://forums.java.net/jive/thread.jspa?messageID=393145
        if(System.currentTimeMillis() - time > 150) {
            return;
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:16,代码来源:BlackBerryCanvas.java


示例13: setCurrentForm

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void setCurrentForm(Form f) {
    super.setCurrentForm(f);

    nullFld = null;
    synchronized (UiApplication.getEventLock()) {
        while (canvas.getFieldCount() > 0) {
            canvas.delete(canvas.getField(0));
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:11,代码来源:BlackBerryImplementation.java


示例14: startScan

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void startScan() {
    try {
        System.gc();

        player = Manager.createPlayer("capture://video");
        player.realize();
        multimediaManager.setZoom(player);
        multimediaManager.setExposure(player);
        multimediaManager.setFlash(player);
        player.start();
        videoControl = (VideoControl) player.getControl("VideoControl");

        viewFinder = (Field) videoControl.initDisplayMode(
                VideoControl.USE_GUI_PRIMITIVE,
                "net.rim.device.api.ui.Field");

        if (videoControl != null) {
            viewFinderScreen = new ViewFinderScreen();
            UiApplication.getUiApplication().invokeLater(new Runnable() {

                public void run() {
                    UiApplication.getUiApplication().pushScreen(
                            viewFinderScreen);
                    viewFinder.setFocus();

                }
            });
            videoControl.setVisible(true);
            videoControl.setDisplayFullScreen(true);
            task = new BarcodeScanTask();
            // create timer every 3 seconds, get a screenshot
            timer = new Timer();
            timer.schedule(task, 0, 3000); // once every 3 seconds 
        } else {
            throw new MediaException("Video Control is not initialized");
        }
    } catch (Exception e) {
        callback.scanError(-1, e.getMessage());
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:41,代码来源:CodeScannerImpl.java


示例15: keyDown

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
protected boolean keyDown(int keycode, int time) {
    if (Keypad.key(keycode) == Keypad.KEY_ESCAPE) {
        cleanup();
        impl.app.invokeLater(new Runnable() {

            public void run() {
                UiApplication.getUiApplication().popScreen(VideoMainScreen.this);
            }
        });
        impl.confirmControlView();
        return true;
    }
    return super.keyDown(keycode, time);
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:15,代码来源:VideoMainScreen.java


示例16: tokenRevoked

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
private void tokenRevoked() {
    if (Application.getApplication() instanceof Vika) {
        if (OptionsStorage.instance.getString("account.access_token", null) == null) {
            return;
        }

        Dialog.alert(VkMainScreen.tr(VikaResource.unlogin));

        Vika.api().longpoll.stop();

        MessagesStorage.instance.clear();
        UserStorage.instance.clear();
        UsersStorage.instance.clear();

        SafeStorage.instance.delete("ui_longpoll_lastts");
        SafeStorage.instance.delete("longpoll.ts");
        SafeStorage.instance.delete("longpoll.maxmid");

        OptionsStorage.instance.delete("account.access_token");
        OptionsStorage.instance.delete("account.user_id");
        OptionsStorage.instance.delete("account.secret");

        while (UiApplication.getUiApplication().getActiveScreen() != null) {
            UiApplication.getUiApplication().popScreen();
        }

        UiApplication.getUiApplication().pushScreen(Vika.createLoginScreen());
    }
}
 
开发者ID:yanex,项目名称:vika,代码行数:30,代码来源:APIHelper.java


示例17: run

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
public void run() {
    APIException e = null;
    Object result = null;

    try {
        result = task();
    } catch (APIException occured) {
        e = occured;
    }

    if (!interrupted) {
        UiApplication.getUiApplication().invokeLater(new AfterApiTask(result, e));
    }
}
 
开发者ID:yanex,项目名称:vika,代码行数:15,代码来源:APIHelper.java


示例18: invokeonUIThread

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
private void invokeonUIThread(final Object o) {
    UiApplication.getUiApplication().invokeLater(new Runnable() {

        public void run() {
            if (o != null) {
                after(o);
            } else {
                error();
            }
        }
    });
}
 
开发者ID:yanex,项目名称:vika,代码行数:13,代码来源:ThreadHelper.java


示例19: handleChatTyping

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
private void handleChatTyping(long uid) {
    if (chat == null) {
        return;
    }

    typingUids.put(uid, new Long(System.currentTimeMillis() + 8500));
    updateTypingLabel();

    if (typingThread == null || !typingThread.isAlive()) {
        typingThread = new Thread() {
            public void run() {
                while (true) {
                    try {
                        boolean changed = checkTypingIds();

                        if (changed) {
                            UiApplication.getUiApplication().invokeLater(new Runnable() {
                                public void run() {
                                    updateTypingLabel();
                                }
                            });
                        }

                        if (typingUids.size() == 0) {
                            break;
                        }

                        Thread.sleep(300);
                    } catch (InterruptedException e) {
                        interrupt();
                        break;
                    }
                }
            }
        };

        typingThread.start();
    }
}
 
开发者ID:yanex,项目名称:vika,代码行数:40,代码来源:ConversationScreenManager.java


示例20: complete

import net.rim.device.api.ui.UiApplication; //导入依赖的package包/类
private void complete(final Bitmap b) {
    UiApplication.getUiApplication().invokeLater(new Runnable() {

        public void run() {
            callback.onLoad(url, tag, b);
        }

    });
}
 
开发者ID:yanex,项目名称:vika,代码行数:10,代码来源:Loader.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AHSWebApp类代码示例发布时间:2022-05-23
下一篇:
Java ExceptionConverter类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap