java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
fr.paris.saclay.sidescroller.controllers.components.menu.ImagePreview
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, SwingConstants

public class ImagePreview extends JLabel
Image preview for avatar/background in level/character selection menu.
See Also:
  • Constructor Details

    • ImagePreview

      public ImagePreview(int width, int height, String theme, boolean isBackground)
      Creates a ImagePreview instance based on the theme and preview's type.
      Parameters:
      width - width of the preview.
      height - height of the preview.
      theme - type of theme.
      isBackground - type of preview.
  • Method Details

    • updateTheme

      public void updateTheme(String theme)
      Updates displayed preview when clicking next/previous buttons on selection menu.
      Parameters:
      theme - new theme.