Class JBackgroundPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
JFilteredImagePanel

public class JBackgroundPanel extends JPanel
See Also:
  • Field Details

    • bg

      protected Image bg
    • imageBorder

      protected Border imageBorder
    • scaleFactor

      protected double scaleFactor
  • Constructor Details

    • JBackgroundPanel

      public JBackgroundPanel()
  • Method Details

    • getImageTopCornerXCoordinate

      public int getImageTopCornerXCoordinate()
    • getImageTopCornerYCoordinate

      public int getImageTopCornerYCoordinate()
    • getImageBounds

      public Rectangle getImageBounds()
    • getScaleFactor

      public double getScaleFactor()
    • setBackgroundImage

      public void setBackgroundImage(Image bg)
    • setBackgroundImageAsync

      public void setBackgroundImageAsync(Callable<Image> task)
    • getBackgroundImage

      public Image getBackgroundImage()
    • getDisplayableImageSize

      public Dimension getDisplayableImageSize()
      I suspect this one should really return the size of the image within and not the component size See new getImageBounds method for a correct approach
      Returns:
    • setImageBorder

      public void setImageBorder(Border border)
    • paintComponent

      protected void paintComponent(Graphics g2d)
      Overrides:
      paintComponent in class JComponent