Class StreamImageView

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.util.EventListener, javax.swing.event.AncestorListener

    class StreamImageView
    extends java.lang.Object
    implements java.awt.event.ActionListener, javax.swing.event.AncestorListener
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamImageView​(java.awt.image.BufferedImage image)
      constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent actionEvent)  
      private void addImage​(java.awt.Image img)  
      void ancestorAdded​(javax.swing.event.AncestorEvent ancestorEvent)  
      void ancestorMoved​(javax.swing.event.AncestorEvent ancestorEvent)  
      void ancestorRemoved​(javax.swing.event.AncestorEvent ancestorEvent)  
      (package private) javax.swing.JComponent getView()
      Returns the view i.e container containing image.
      private void initUI()  
      private java.awt.Image zoomImage​(java.awt.image.BufferedImage origin, float scale, int rotation)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • image

        private final java.awt.image.BufferedImage image
      • scrollPane

        private javax.swing.JScrollPane scrollPane
      • label

        private javax.swing.JLabel label
    • Constructor Detail

      • StreamImageView

        StreamImageView​(java.awt.image.BufferedImage image)
        constructor.
        Parameters:
        image - instance of BufferedImage.
    • Method Detail

      • initUI

        private void initUI()
      • getView

        javax.swing.JComponent getView()
        Returns the view i.e container containing image.
        Returns:
        A JComponent instance.
      • zoomImage

        private java.awt.Image zoomImage​(java.awt.image.BufferedImage origin,
                                         float scale,
                                         int rotation)
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent actionEvent)
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • addImage

        private void addImage​(java.awt.Image img)
      • ancestorAdded

        public void ancestorAdded​(javax.swing.event.AncestorEvent ancestorEvent)
        Specified by:
        ancestorAdded in interface javax.swing.event.AncestorListener
      • ancestorRemoved

        public void ancestorRemoved​(javax.swing.event.AncestorEvent ancestorEvent)
        Specified by:
        ancestorRemoved in interface javax.swing.event.AncestorListener
      • ancestorMoved

        public void ancestorMoved​(javax.swing.event.AncestorEvent ancestorEvent)
        Specified by:
        ancestorMoved in interface javax.swing.event.AncestorListener