⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mbstextform.java

📁 性爱宝典中文版(含源码)java版 有问题请e-mail:super_vipman@163.com
💻 JAVA
字号:
package mobisutra;

import mobisutra.*;

import javax.microedition.lcdui.*;

public class MbsTextForm extends Form
    implements CommandListener
{

    public MbsTextForm()
    {
        super("文字窗口");
        picForm = null;
        subForm = null;
        subPosIndex = 0;
        Command command = new Command("图片", 1, 0);
        Command command1 = new Command("返回", 1, 0);
        addCommand(command);
        addCommand(command1);
        setCommandListener(this);
    }

    private void setTexts(String s)
    {
        int i = 0;
        boolean flag = false;
        Object obj = null;
        boolean flag1 = false;
        if(s == null)
            return;
        if(s.length() == 0)
            return;
        while(!flag1)
        {
            int j = s.indexOf("#", i);
            String s1;
            if(j != -1)
            {
                s1 = s.substring(i, j);
                i = j + 1;
                if(i >= s.length())
                    flag1 = true;
            }
            else
            {
                s1 = s.substring(i, s.length());
                flag1 = true;
            }
            StringItem stringitem = new StringItem(null, s1);
            append(stringitem);
        }

    }

    public void show(MbsPicCanvas mbspiccanvas, Displayable displayable, int i)
    {
        String s = MbsLists.getPositionText(i);
        String s1 = MbsLists.getPositionName(i);
        picForm = mbspiccanvas;
        subForm = displayable;
        subPosIndex = i;
        setTitle(s1);
        for(; size() > 0; delete(0));
        setTexts(s);
        MbsGlobals.display.setCurrent(this);
    }

    public void commandAction(Command command, Displayable displayable)
    {
        String s = command.getLabel();
        if(s == "返回")
            MbsGlobals.display.setCurrent(subForm);
        else
        if(s == "图片")
            MbsGlobals.display.setCurrent(picForm);
    }

    MbsPicCanvas picForm;
    Displayable subForm;
    int subPosIndex;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -