Photonic 3D supports a few different types of displays, but in the event you have a non-traditional output device, you may need to extend Photonic's capabilities. In order to build and enable your own display, you need to do two things:

  1. Create your own class and implement the following interface: `org.area515.resinprinter.display.GraphicsOutputInterface`
  2. Add your new class to your file like this: `displayDevice.[package].[name].[of].[your].[class].[NameOfYourClass]=true`

Since step 2 is really just a formality, I'll just go over the methods that you should implement in the GraphicsOutputInterface:

  1. `isDisplayBusy()` - The GUI will ask the display(via this method) if it is ready to perform some visual output before executing it. In the event that you return false from this method, your user will see the message: “display is busy, try again later.” This method should be very fast.
  2. `resetSliceCount()` - If you are keeping an internal slice/frame count within your display. You should reset it when this method is called.
  3. `dispose()` - Shut down your display when this method is called.
  4. `showBlankImage()` - Turn off all pixels on this display when this method is called.
  5. `showCalibrationImage(int xPixels, int yPixels)` - Show your own custom calibration crosshairs(using the `xPixels` and `yPixels`) on your output device.
  6. `showGridImage(int pixels)` - Show a set of squares with the width specified in `pixel`s
  7. `showImage(BufferedImage image)` - Show the actual `image` on your output device.
  8. `java.awt.Rectangle getBoundary()` - You should first measure your device and return the width and height of the device(in pixels) as a `java.awt.Rectangle`
  9. `String getIDstring()` - The pretty name of your device that will show up in the GUI.
  10. `String buildIDString()` - If you allow many different instances of your device to be printed at once, this method should return the precise instance of the name that is reserved for a the printer. For example, since you can create many simulated displays, this method will return “Simulated display: 1” or “Simulated display: 2”. Another example is how “Last available display” will actually return the name of the OS native display name like “:0:0” in Linux, or “/Display1” in Windows. In this way, if the user attempts to start an OS native display after the “Last available display” already returned “/Display1”, it will already be properly reserved.
  11. `GraphicsOutputInterface initializeDisplay(String displayId)` - this method will “open” and initialize the your display. The `displayId` with be the display id that was previously returned from the buildIDString() from the previous method. If you only have a single GraphicsOutputInterface, you could simply just return `this`. However, if your buildIDString() returns different values, it's likely you would want to return a new instance of a GraphicsOutputInterface for different values of buildIDString().

Here are a few examples of displays that Photonic 3D supports: