Class EditPane

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class EditPane extends JPanel
Preview pane for edit dialog. Shows color gradient, cinemascope bars and scaled down subtitle image.
See Also:
  • Field Details

    • SCREEN_ASPECT_RATIO

      private static final double SCREEN_ASPECT_RATIO
      See Also:
    • image

      private BufferedImage image
    • screenWidth

      private int screenWidth
    • screenHeight

      private int screenHeight
    • offsetX

      private int offsetX
    • offsetY

      private int offsetY
    • subtitleImageWidth

      private int subtitleImageWidth
    • subtitleImageHeight

      private int subtitleImageHeight
    • cinemascopeBarFactor

      private double cinemascopeBarFactor
    • cropOffsetY

      private int cropOffsetY
    • INSET

      private static final int INSET
      See Also:
    • selectionStartX

      private int selectionStartX
    • selectionEndX

      private int selectionEndX
    • selectionStartY

      private int selectionStartY
    • selectionEndY

      private int selectionEndY
    • selectionAllowed

      private boolean selectionAllowed
    • selectionValid

      private boolean selectionValid
    • leftButtonPressed

      private boolean leftButtonPressed
    • excluded

      private boolean excluded
    • yCrop

      private int yCrop
    • xScaleCaption

      private double xScaleCaption
    • yScaleCaption

      private double yScaleCaption
    • layoutPane

      private final boolean layoutPane
    • selectListener

      private EditPane.SelectListener selectListener
  • Constructor Details

    • EditPane

      public EditPane(boolean isLayoutPane)
    • EditPane

      public EditPane()
  • Method Details

    • paint

      public void paint(Graphics graphics)
      Overrides:
      paint in class JComponent
    • update

      public void update(Graphics graphics)
      Overrides:
      update in class JComponent
    • draw

      void draw(Graphics graphics)
      Create color gradient, cinemascope bars and draw scaled down subtitle image.
    • setImage

      public void setImage(BufferedImage image, int width, int height)
    • setScreenDimension

      public void setScreenDimension(int width, int height)
    • setSubtitleOffsets

      public void setSubtitleOffsets(int x, int y)
    • setAspectRatio

      public void setAspectRatio(double aspectRatio)
    • setCropOffsetY

      public void setCropOffsetY(int offset)
    • setSelectionAllowed

      public void setSelectionAllowed(boolean selectionAllowed)
    • setExcluded

      public void setExcluded(boolean excluded)
    • getSelection

      public int[] getSelection()
      Returns current selection
      Returns:
      null if no valid selection. Else int array [x0,y0,x1,y1] where x1 > x0 and y1 > y0
    • removeSelection

      public void removeSelection()
    • addSelectListener

      public void addSelectListener(EditPane.SelectListener selectListener)