Class zImagePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, izSwing

public class zImagePanel extends JPanel implements izSwing
Display an image into a JPanel. Used to render the JME image buffer (actually any Image) into a swing panel.
Author:
Kevin Moore <dev@kevin.moore.name>
See Also:
Serialized Form
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • image

      public BufferedImage image
    • op

      private AffineTransformOp op
      Used to flip the image on Y axis 'cos swing/JME dont share same coord system.
  • Constructor Details

    • zImagePanel

      public zImagePanel()
      Need this constructor public for XML to use the default constructor.
  • Method Details

    • setSize

      public void setSize(int w, int h)
      Once the size is set we can create the buffer image and transforms for display.
      Overrides:
      setSize in class Component
      Parameters:
      w -
      h -
    • paintComponent

      public void paintComponent(Graphics gfx)
      Blat the rasterised image onto the Java component.
      Overrides:
      paintComponent in class JComponent
      Parameters:
      gfx -