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

📄 pointlist.java

📁 Program helping you to remember the route. It cab be route from conference room to coffee-room, it
💻 JAVA
字号:
import javax.microedition.lcdui.*;

class PointList extends List implements  CommandListener  
{ 
    TripMate    main;
    Trip        trip;
    Displayable parent;

    PointList(Trip trip, TripMate main, Displayable parent) { 
        super(trip.description, IMPLICIT);
        this.trip = trip;
        this.main = main;
        this.parent = parent;
        for (int i = 0; i < trip.points.length; i++) { 
            String description = trip.points[i].description;
            if (description.length() == 0) { 
                description = TripMate.directions[trip.points[i].direction];
            }
            append(description, TripMate.arrows[trip.points[i].direction]);
        }
        setCommandListener(this);
        addCommand(TripMate.BACK_CMD);
        Display.getDisplay(main).setCurrent(this);
    }      

    public void commandAction(Command c, Displayable d) 
    {    
        if (c == TripMate.BACK_CMD) { 
            Display.getDisplay(main).setCurrent(parent);
        } else { 
            int i = getSelectedIndex();
            if (i >= 0) { 
                new PointForm(trip, i, main, this);
            }
        }
    }
}

⌨️ 快捷键说明

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