Package net.djpowell.lcdjni

Examples of net.djpowell.lcdjni.LcdConnection


    });
  }

  public void init() {
    try {
      LcdConnection con = new LcdConnection("G15LastfmPlayer", true,
          AppletCapability.getCaps(AppletCapability.BW), this, this);

      LcdDevice device = con.openDevice(DeviceType.BW, new G15KeysImplementationView(controller));
      LcdMonoBitmap bmp = device.createMonoBitmap(PixelColor.G15_REV_1);
      musicScroll.drawMainScreen(bmp.getGraphics());
      statusScroll.drawStatusMessage(bmp.getGraphics());
      bmp.updateScreen(Priority.ALERT, SyncType.SYNC);
      device.setForeground(true);
      currentScreen = ELCDScreen.SCROLLING_TEXT_VIEW;
      while (!stop) {
        try {
          Thread.sleep(paintDuration);
        } catch (InterruptedException e) {
          break;
        }
        switch (currentScreen) {
        case SCROLLING_TEXT_VIEW:
          musicScroll.drawMainScreen(bmp.getGraphics());
          statusScroll.drawStatusMessage(bmp.getGraphics());
          break;
        case SEARCH_VIEW:
          radioChooser.drawChooserAnimation(bmp.getGraphics());
          // currentScreen = ELCDScreen.SCROLLING_TEXT_VIEW;
          break;
        default:
          break;
        }
        bmp.updateScreen(Priority.ALERT, SyncType.SYNC);
      }

      device.close();
      con.close();
      LcdConnection.deInit();
    } catch (LcdException e) {
      LOGGER.debug(e);
      try {
        SwingUtilities.invokeAndWait(new Runnable() {
View Full Code Here

TOP

Related Classes of net.djpowell.lcdjni.LcdConnection

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.