jas2.plot
Class PrintHelper
- java.lang.Object
-
- jas2.plot.PrintHelper
-
- Direct Known Subclasses:
- PrintHelper11, PrintHelper12
public abstract class PrintHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field and Description static intORIENTATION_BEST_FITstatic intORIENTATION_LANDSCAPEstatic intORIENTATION_PORTRAITE
-
Constructor Summary
Constructors Constructor and Description PrintHelper()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description static PrintHelperinstance()Create an instance of a PrintHelperstatic booleanisPrinting()Method to allow component being painted to find out if it is being printed.java.lang.ThreadprintingThread()abstract voidprintTarget(java.awt.Component target)Print the specified componentabstract voidsetOrientation(int orientation)Set the print orientationvoidsetPrintingThread(java.lang.Thread thread)abstract voidsetScaleUp(boolean scaleUp)Controls whether the PrintHelper will scale an image up to make it fill the page (PrintHelper will always try to shrink to fit)
-
-
-
Field Detail
-
ORIENTATION_BEST_FIT
public static final int ORIENTATION_BEST_FIT
- See Also:
- Constant Field Values
-
ORIENTATION_PORTRAITE
public static final int ORIENTATION_PORTRAITE
- See Also:
- Constant Field Values
-
ORIENTATION_LANDSCAPE
public static final int ORIENTATION_LANDSCAPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
printTarget
public abstract void printTarget(java.awt.Component target) throws java.lang.ExceptionPrint the specified component- Throws:
java.lang.Exception
-
instance
public static PrintHelper instance()
Create an instance of a PrintHelper
-
setOrientation
public abstract void setOrientation(int orientation)
Set the print orientation- Parameters:
orientation- One of ORIENTATION_BEST_FIT,ORIENTATION_PORTRAITE,ORIENTATION_LANDSCAPE
-
setScaleUp
public abstract void setScaleUp(boolean scaleUp)
Controls whether the PrintHelper will scale an image up to make it fill the page (PrintHelper will always try to shrink to fit)
-
isPrinting
public static boolean isPrinting()
Method to allow component being painted to find out if it is being printed. This is a crude workaround for limitations which make it impossible for a SwingComponent to tell whether its paint method is being called to print it or to display it on the screen. Obviously this static method only works if PrintHelper is being used to do the printing.
-
setPrintingThread
public void setPrintingThread(java.lang.Thread thread)
-
printingThread
public java.lang.Thread printingThread()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG