Results 1 to 1 of 1
  1. #1
    Join Date
    Dec 2012
    Rep Power

    Default Extending GraphicsDevice for driver

    I'm working with Java in an e-reader. I have an EInkDisplay class I'm using as a screen driver, containing a repaint(Rectangle) method and a getGraphics() method. I have another class, TouchDriver, capable of receiving touch events from the screen and generating MouseEvents for listeners. I'm working on a virtual keyboard so I can have keyboard input too.

    In other words, I have the capabilities to create a non-headless GraphicsEnvironment. However, I'm not sure how to proceed with taking the above classes and generating a GraphicsDevice that I can use with Swing. Nowhere in the GraphicsDevice documentation does it give me a method to override and pass back the Graphics object that EInkDisplay provides me with.

    Currently, whenever I attempt to instantiate a JFrame, I get a HeadlessException because the system does not recognize the E-Ink screen as an output device. I can definitely write to it, though; it's just a matter of formalizing it so Swing can understand.

    Given the EInkDisplay and TouchDriver classes, how might I go about creating a GraphicsDevice or GraphicsEnvironment so I can generate a JFrame using new JFrame(GraphicsEnvironment)?

    Alternately, if I could create a GraphicsDevice or GraphicsEnvironment and tell Java to use the Linux framebuffer at /dev/fb0, I'd be equally happy.
    Last edited by ryanthejuggler; 12-15-2012 at 10:38 PM.

Similar Threads

  1. Replies: 0
    Last Post: 03-03-2012, 01:01 AM
  2. Extending problems...
    By Alkor in forum New To Java
    Replies: 5
    Last Post: 02-26-2012, 01:18 AM
  3. Extending Classes and What is Necessary
    By GavinCash in forum New To Java
    Replies: 10
    Last Post: 10-11-2010, 07:07 AM
  4. Replies: 2
    Last Post: 08-24-2010, 04:48 PM
  5. Implementing and Extending together
    By eva in forum New To Java
    Replies: 2
    Last Post: 12-24-2007, 09:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts