Package org.alex73.tv.lib

Examples of org.alex73.tv.lib.Loader


        final short[] names = new short[result.length];
        final short[] descriptions = new short[result.length];

        // read unpacked data
        for (int i = 0; i < result.length; i++) {
            result[i] = new Programme();
           
            int startTimeMinutes= in.readInt();
            startTimeMinutes+= in.readShort();
            result[i].startMinutes=startTimeMinutes;
            result[i].lengthMinutes=in.readShort();
View Full Code Here


            Main.setReminderButton(progs[selectedIndex].isSelected);
        }
    }

    protected void onPaintRow(final Graphics g, final Object rowObject, final Rectangle rect) {
        final Programme prog = (Programme) rowObject;

        if (prog.isChannelTitle) {
            // channel title
            if (g.getColor() == FOREGROUND_STANDARD) {
                g.setColor(CHANNEL_FOREGROUND_STANDARD);
View Full Code Here

        Guide.nextChannel();
        redrawData();
    }

    protected void onKeySelect() {
        final Programme prog = grid.getSelectedProgramme();
        if (prog != null) {
            Main.display.setCurrent(new DetailsForm(prog));
        }
    }
View Full Code Here

public class ScheduleFactory {
    protected static final IProgrammesBlockReader programmesBlockReader = new ProgrammesBlockReaderImpl();

    public static Schedule createSchedule(final IStorage st) {

        Schedule result;
        if (st != null) {
            result = new Schedule(st, programmesBlockReader);
        } else {
            result = new Schedule(new StorageInRecordStores(), programmesBlockReader);
            if (result.getState() != Schedule.STATE_DATA) {
                result = new Schedule(new StorageInClasspath(), programmesBlockReader);
            }
            byte state = Schedule.STATE_EMPTY;
            if (result.getState() != Schedule.STATE_DATA) {
                try {
                    result = new Schedule(new StorageInFilesystem(), programmesBlockReader);
                    state = result.getState();
                } catch (IOException e) {
                    state = Schedule.STATE_EMPTY;
                }
            }
            if (state != Schedule.STATE_DATA) {
                result = new Schedule(new StorageInRecordStores(), programmesBlockReader);
            }
        }
        return result;
    }
View Full Code Here

    public static void showFirst(final IStorage storage) {
        new Thread() {
            public void run() {
                try {
                    Schedule sch = ScheduleFactory.createSchedule(storage);
                    switch (sch.getState()) {
                    case Schedule.STATE_EMPTY:
                        MessageBox.showMessage("", Localizer.getString("Data.NotFound"));
                        break;
                    case Schedule.STATE_INVALID_VERSION:
                        MessageBox.showMessage("", Localizer.getString("Data.Version"));
View Full Code Here

TOP

Related Classes of org.alex73.tv.lib.Loader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.