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

Java Displayable类代码示例

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

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



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

示例1: choiceform

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public int choiceform (String sTitle, String sOk, String sCancel, String[] vElements)
{
    javax.microedition.lcdui.List list = new javax.microedition.lcdui.List(sTitle,
            javax.microedition.lcdui.List.EXCLUSIVE, vElements, null);
    Displayable prev = jcc2.application.Main.singleton.display.getCurrent();
    CMD_OK = new javax.microedition.lcdui.Command (sOk, javax.microedition.lcdui.Command.OK, 1);
    CMD_CANCEL = new javax.microedition.lcdui.Command (sCancel, javax.microedition.lcdui.Command.CANCEL, 1);
    list.addCommand(CMD_OK);
    list.addCommand(CMD_CANCEL);
    list.setCommandListener(this);
    bContinue = false;
    vArg = new int[1];
    ((int[])vArg)[0] = javax.microedition.lcdui.List.EXCLUSIVE;
    jcc2.application.Main.singleton.display.setCurrent(list);
    while (!bContinue)
        Thread.yield();
    jcc2.application.Main.singleton.display.setCurrent(prev);
    return ((int[])vArg)[0];
}
 
开发者ID:NeiroNext,项目名称:JccAPV,代码行数:20,代码来源:library.java


示例2: selectform

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public int selectform (String sTitle, String sOk, String sCancel, String[] vElements)
{
    javax.microedition.lcdui.List list = new javax.microedition.lcdui.List(sTitle,
            javax.microedition.lcdui.List.IMPLICIT, vElements, null);
    Displayable prev = jcc2.application.Main.singleton.display.getCurrent();
    CMD_OK = new javax.microedition.lcdui.Command (sOk, javax.microedition.lcdui.Command.OK, 1);
    CMD_CANCEL = new javax.microedition.lcdui.Command (sCancel, javax.microedition.lcdui.Command.CANCEL, 1);
    list.addCommand(CMD_OK);
    list.addCommand(CMD_CANCEL);
    list.setCommandListener(this);
    bContinue = false;
    vArg = new int[1];
    ((int[])vArg)[0] = javax.microedition.lcdui.List.IMPLICIT;
    jcc2.application.Main.singleton.display.setCurrent(list);
    while (!bContinue)
        Thread.yield();
    jcc2.application.Main.singleton.display.setCurrent(prev);
    return ((int[])vArg)[0];
}
 
开发者ID:NeiroNext,项目名称:JccAPV,代码行数:20,代码来源:library.java


示例3: mulchoiceform

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public byte[] mulchoiceform (String sTitle, String sOk, String sCancel, String[] vElements)
{
    javax.microedition.lcdui.List list = new javax.microedition.lcdui.List(sTitle,
            javax.microedition.lcdui.List.MULTIPLE, vElements, null);
    Displayable prev = jcc2.application.Main.singleton.display.getCurrent();
    CMD_OK = new javax.microedition.lcdui.Command (sOk, javax.microedition.lcdui.Command.OK, 1);
    CMD_CANCEL = new javax.microedition.lcdui.Command (sCancel, javax.microedition.lcdui.Command.CANCEL, 1);
    list.addCommand(CMD_OK);
    list.addCommand(CMD_CANCEL);
    list.setCommandListener(this);
    bContinue = false;
    vArg = new int[1];
    ((int[])vArg)[0] = javax.microedition.lcdui.List.MULTIPLE;
    jcc2.application.Main.singleton.display.setCurrent(list);
    while (!bContinue)
        Thread.yield();
    jcc2.application.Main.singleton.display.setCurrent(prev);
    return (byte[])vArg;
}
 
开发者ID:NeiroNext,项目名称:JccAPV,代码行数:20,代码来源:library.java


示例4: editform

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public String editform (String sTitle, String sOk, String sCancel, String sText, int maxlen,  int mode)
{
    javax.microedition.lcdui.TextBox textbox = new javax.microedition.lcdui.TextBox (sTitle, sText, maxlen, mode);
    Displayable prev = jcc2.application.Main.singleton.display.getCurrent();
    CMD_OK = new javax.microedition.lcdui.Command (sOk, javax.microedition.lcdui.Command.OK, 1);
    CMD_CANCEL = new javax.microedition.lcdui.Command (sCancel, javax.microedition.lcdui.Command.CANCEL, 1);
    textbox.addCommand(CMD_OK);
    textbox.addCommand(CMD_CANCEL);
    textbox.setCommandListener(this);
    bContinue = false;
    jcc2.application.Main.singleton.display.setCurrent(textbox);
    while (!bContinue)
        Thread.yield();
    jcc2.application.Main.singleton.display.setCurrent(prev);
    return (String)vArg;
}
 
开发者ID:NeiroNext,项目名称:JccAPV,代码行数:17,代码来源:library.java


示例5: messagebox

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public int messagebox (String sTitle, String sOk, String sCancel, String sText)
{
    javax.microedition.lcdui.Alert alert = new javax.microedition.lcdui.Alert (sTitle, sText,
            null, javax.microedition.lcdui.AlertType.INFO);
    alert.setTimeout(javax.microedition.lcdui.Alert.FOREVER);
    CMD_OK = new javax.microedition.lcdui.Command (sOk, javax.microedition.lcdui.Command.OK, 1);
    CMD_CANCEL = new javax.microedition.lcdui.Command (sCancel, javax.microedition.lcdui.Command.CANCEL, 1);
    alert.addCommand(CMD_OK);
    alert.addCommand(CMD_CANCEL);
    alert.setCommandListener(this);
    Displayable prev = jcc2.application.Main.singleton.display.getCurrent();
    jcc2.application.Main.singleton.display.setCurrent(alert);
    bContinue = false;
    while (!bContinue)
        Thread.yield();
    jcc2.application.Main.singleton.display.setCurrent(prev);
    return ((int[])vArg)[0];
}
 
开发者ID:NeiroNext,项目名称:JccAPV,代码行数:19,代码来源:library.java


示例6: setCurrent

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
/**
 * @inheritDoc
 */
private void setCurrent(Displayable d) {
    if (display == null) {
        throw new IllegalStateException("First call Display.setDisplay(javax.microedition.lcdui.Display d) method");
    }

    if(!minimized) {
        if (d instanceof Canvas) {
            if(!disableFullScreen) {
                ((Canvas) d).setFullScreenMode(!com.codename1.ui.Display.getInstance().isNativeCommands());
            }
        }

        display.setCurrent(d);
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:19,代码来源:GameCanvasImplementation.java


示例7: _commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void _commandAction(Command command, Displayable arg1) {

        if (command == cancelCommand) {
            cleanUp();
            forwardCommand(command, arg1);

        } else if (command == setCallingScreenDataCommand) {
            IAnswerData data = this.getAcquiredData();
            if (data != null) {
                questionScreen.setAcquiredData(data);
                _commandAction(cancelCommand, this);
            }

        } else {
            handleCustomCommand(command, arg1);
        }

    }
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:19,代码来源:AcquireScreen.java


示例8: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command cmd, Displayable disp) {
    if (cmd.equals(RadioPlayerView.CMD_START)) {
        int selIdx = stationChoice.getSelectedIndex();
        RadioPlayerView playerView = new RadioPlayerView(selIdx, midlet);
        RadioPlayer player = new RadioPlayer(selIdx);
        Display.getDisplay(midlet).setCurrent(playerView);
        playerView.setPlayer(player);
        player.startPlayer();
    } else if (cmd.equals(RadioPlayerView.CMD_EXIT)) {
        this.midlet.destroyApp(false);
        this.midlet.notifyDestroyed();
    } else if (cmd.equals(ABOUT)) {
        Display.getDisplay(midlet).setCurrent(new AboutForm(midlet));
    } else if (cmd.equals(HELP)) {
        Display.getDisplay(midlet).setCurrent(new HelpForm(midlet));
    }
}
 
开发者ID:cli,项目名称:rdio,代码行数:18,代码来源:StationsList.java


示例9: _commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void _commandAction(Command comm, Displayable disp) {
    if (comm == locView.cancelCommand) {
        transitions.captureCancelled();
    } else if (comm == locView.okCommand) {
        if (locService.getStatus() == LocationCaptureService.FIX_OBTAINED)
        {
            interrupted=true;
            transitions.captured(myLoc);
        }
        else
            transitions.captureCancelled();
    } else if (comm == locView.retryCommand) {
        captureThread = new HandledThread(this, "CaptureThread");
        captureThread.start();
    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:17,代码来源:LocationCaptureController.java


示例10: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command command, Displayable displayable) {
    if (command == commentCommand) {
        openDetailsView(null);
    }
    else if (command == backCommand) {
        abortLoadingComments();
        backListener.backCommanded();
    }
    else if (command == refreshCommand) {
        refresh();
    }
    else if (command == aboutCommand) {
        showAboutView();
    }
    else if (command == loginCommand) {
        showLoginView();
    }
    else if (command == logoutCommand) {
        session.setLoggedOut();
        setupCommands();
    }
}
 
开发者ID:mozilla,项目名称:pluotsorbet,代码行数:23,代码来源:CommentsView.java


示例11: _commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void _commandAction(Command c, Displayable d) {
    if (d == view) {
        if (c == List.SELECT_COMMAND) {
            int index = view.getSelectedIndex();
            if (index == this.formInfo.size())//The same as download image
            {
                transitions.downloadForms();
            }
            else if (index != -1)
            {
                transitions.formSelected(((Integer)formInfo.keyAt(index)).intValue());
            }
        } else if (c == view.CMD_EXIT) {
            transitions.exit();
        }  else if (c == view.CMD_VIEW_SAVED) {
            transitions.viewSaved();
        } else if (c == view.CMD_DOWNLOAD_FORMS) {
            transitions.downloadForms();
        } else if (c == view.CMD_SETTINGS) {
            transitions.settings();
        }

    }
}
 
开发者ID:dimagi,项目名称:commcare-j2me,代码行数:25,代码来源:JRDemoFormListController.java


示例12: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command cmd, Displayable disp) {
	//#debug info
	System.out.println("commandAction with cmd=" + cmd.getLabel() + ", screen=" + disp );
	if (cmd == this.backCommand) {
		display.setCurrent(mainScreen);
	} else if (cmd == this.exitCommand) {
		//#debug info
		System.out.println("Exit application");
		this.notifyDestroyed();
	} else if (cmd == this.aboutCommand) {
		String param = this.getAppProperty("Xfolite-Version");
     	Alert alert = new Alert(
     			Locale.get("main.label.about"),
     			Locale.get("main.msg.about", param),
     			null,
     			AlertType.INFO);
 		// Looks like an error but builds
 		this.display.setCurrent(alert, mainScreen);
     }
}
 
开发者ID:okoskimi,项目名称:Xfolite,代码行数:21,代码来源:XFormsMidlet.java


示例13: ShowNoteForm

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public ShowNoteForm(Displayable backDisplay, Note note) {
	super("Note informations");
	display = MainMidlet.getDisplay();
	this.backDisplay = backDisplay;
	this.note = note;
	setupCommands();
	setupFields();
	inflateView();
}
 
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:10,代码来源:ShowNoteForm.java


示例14: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
	if (c == List.SELECT_COMMAND)
		showNoteDetails();
	else if (c == addNote) 
		addNewNote();
	else if (c == sortByCategory)
		sortListByCategory();
	else if (c == sortByPriority)
		sortListByPriority();
	else if (c == sortByTime)
		sortListByTime();
	else if (c == exit)
		exitApplication();
}
 
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:15,代码来源:NotesList.java


示例15: AddNoteForm

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public AddNoteForm(ListUpdateListener callback, Displayable backDisplay) {
	super("Add note");
	this.backDisplay = backDisplay;
	this.callback = callback;
	display = MainMidlet.getDisplay();
	setupCommands();
	setupFields();
}
 
开发者ID:NotesTeam,项目名称:TaskBook-J2ME,代码行数:9,代码来源:AddNoteForm.java


示例16: AndroidDisplayableUI

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
protected AndroidDisplayableUI(MicroEmulatorActivity activity, Displayable displayable, boolean initView) {
	this.activity = activity;
	this.displayable = displayable;
	
	if (initView) {
		view = new LinearLayout(activity);
		((LinearLayout) view).setOrientation(LinearLayout.VERTICAL);
		view.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.FILL_PARENT));
		
		titleView = new TextView(activity);
		titleView.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.FILL_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
		titleView.setTextAppearance(titleView.getContext(), android.R.style.TextAppearance_DialogWindowTitle);
		((LinearLayout) view).addView(titleView);
	}
}
 
开发者ID:Helltar,项目名称:AMPASIDE,代码行数:16,代码来源:AndroidDisplayableUI.java


示例17: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command cmd, Displayable arg1) {
	// TODO Auto-generated method stub
	if(cmd==cmd_ok)
	{
		//������Ϸ
	}
}
 
开发者ID:cabbage89,项目名称:danceGame,代码行数:8,代码来源:CanvasOver.java


示例18: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
    if (d == currentTextBox) {
        display.setCurrent(canvas);
        if (c == CONFIRM_COMMAND) {
            // confirm
            String text = currentTextBox.getString();
            getCurrentForm().setVisible(true);
            Display.getInstance().onEditingComplete(currentTextComponent, text);
        }

        currentTextBox = null;
        ((C)canvas).setDone(true);
    } else {
        if(c == MIDP_BACK_COMMAND) {
            GameCanvasImplementation.this.keyPressed(backSK);
            GameCanvasImplementation.this.keyReleased(backSK);
            return;
        }
        if(c instanceof MIDP2CodenameOneCommand) {
            final com.codename1.ui.Command cmd = ((MIDP2CodenameOneCommand)c).internal;
            Display.getInstance().callSerially(new Runnable() {
                public void run() {
                    Display.getInstance().getCurrent().dispatchCommand(cmd, new ActionEvent(cmd));
                }
            });
        }
    }
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:29,代码来源:GameCanvasImplementation.java


示例19: showGui

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
/**
 *
 * This method displays the desired GUI class
 *
 * @param gui
 */
public void showGui(Displayable gui){
       // Saves a reference to the last displayed gui
       lastGui = Display.getDisplay(this).getCurrent();
	// Sets the new gui
       Display.getDisplay(this).setCurrent(gui);
	gui.setCommandListener((CommandListener)gui);
}
 
开发者ID:meisamhe,项目名称:GPLshared,代码行数:14,代码来源:Peer2Messenger.java


示例20: commandAction

import javax.microedition.lcdui.Displayable; //导入依赖的package包/类
public void commandAction(Command c, Displayable d) {
    if (c == exitCommand) {
        destroyApp(false);
        notifyDestroyed();
    } else if (c == chooseCommand) {
        FileSelector f = new FileSelector(this);
        Display.getDisplay(this).setCurrent(f);
    }
}
 
开发者ID:kamcpp,项目名称:heart-diag-app,代码行数:10,代码来源:HeartDiagAppMidlet.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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