Class ApplicationResizeManager
- java.lang.Object
-
- de.desy.mst.libs.framework.mstapp.util.applicationresizemanager.managers.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
-
-
Constructor Summary
Constructors Constructor Description ApplicationResizeManager(javax.swing.JFrame frame)
Default constructor; only expanding allowedApplicationResizeManager(javax.swing.JFrame frame, EZoomModes zoomMode, double xScale, double yScale)
ConstructorApplicationResizeManager(javax.swing.JFrame frame, java.lang.String zoomMode, double xScale, double yScale)
Constructor
-
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 objectdouble
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.
-
-
-
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 resizedzoomMode
- zoommode (ZOOM, NOZOOM, ZOOMMAXONLY)xScale
- initial horizontal scalingyScale
- initial vertical scaling
-
ApplicationResizeManager
public ApplicationResizeManager(javax.swing.JFrame frame, EZoomModes zoomMode, double xScale, double yScale)
Constructor- Parameters:
frame
- JFrame to be resizedzoomMode
- zoommode (ZOOM, NOZOOM, ZOOMMAXONLY)xScale
- initial horizontal scalingyScale
- 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 factoryScale
- 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
-
-