Class ApplicationResizeManager


  • public class ApplicationResizeManager
    extends java.lang.Object
    The resize manager allows to resize graphical applications containing Swing components.
    Version:
    3.0.0
    Author:
    R.Bacher
    See Also:
    How-to-Use Instructions
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.geom.AffineTransform getScaleTransformation()
      Returns the affine scale transformation which has to be used in the paint method of a graphic object
      double getScaleX()
      Returns the x scaling value.
      double getScaleY()
      Returns the y scaling value.
      void resizeApplication()
      Controls the resizing of visual application frame.
      void setReferenceSize​(double xScale, double yScale)
      Sets the reference size of the visual application frame with respect to the design size of the application.
      void setResizeModeToNoZoom()
      Sets the resize mode of the visual application frame to "NOZOOM".
      void setResizeModeToZoom()
      Sets the resize mode of the visual application frame to "ZOOM".
      void setResizeModeToZoomMaxOnly()
      Sets the resize mode of the visual application frame to "ZOOM" but allows only magnification of the application frame.
      • Methods inherited from class java.lang.Object

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

      • ApplicationResizeManager

        public ApplicationResizeManager​(javax.swing.JFrame frame)
        Default constructor; only expanding allowed
        Parameters:
        frame - Jframe to be resized
      • ApplicationResizeManager

        public ApplicationResizeManager​(javax.swing.JFrame frame,
                                        java.lang.String zoomMode,
                                        double xScale,
                                        double yScale)
        Constructor
        Parameters:
        frame - JFrame to be resized
        zoomMode - zoommode (ZOOM, NOZOOM, ZOOMMAXONLY)
        xScale - initial horizontal scaling
        yScale - initial vertical scaling
      • ApplicationResizeManager

        public ApplicationResizeManager​(javax.swing.JFrame frame,
                                        EZoomModes zoomMode,
                                        double xScale,
                                        double yScale)
        Constructor
        Parameters:
        frame - JFrame to be resized
        zoomMode - zoommode (ZOOM, NOZOOM, ZOOMMAXONLY)
        xScale - initial horizontal scaling
        yScale - initial vertical scaling
    • Method Detail

      • setResizeModeToZoom

        public void setResizeModeToZoom()
        Sets the resize mode of the visual application frame to "ZOOM".
      • setResizeModeToNoZoom

        public void setResizeModeToNoZoom()
        Sets the resize mode of the visual application frame to "NOZOOM".
      • setResizeModeToZoomMaxOnly

        public void setResizeModeToZoomMaxOnly()
        Sets the resize mode of the visual application frame to "ZOOM" but allows only magnification of the application frame.
      • setReferenceSize

        public void setReferenceSize​(double xScale,
                                     double yScale)
        Sets the reference size of the visual application frame with respect to the design size of the application.
        Parameters:
        xScale - initial horizontal scaling factor
        yScale - initial vertical scaling factor
      • resizeApplication

        public void resizeApplication()
        Controls the resizing of visual application frame.
      • getScaleTransformation

        public java.awt.geom.AffineTransform getScaleTransformation()
        Returns the affine scale transformation which has to be used in the paint method of a graphic object
        Returns:
        affine scale transformation
      • getScaleX

        public double getScaleX()
        Returns the x scaling value.
        Returns:
        horizontal scaling value
      • getScaleY

        public double getScaleY()
        Returns the y scaling value.
        Returns:
        vertical scaling value