org.netbeans.api.visual 2.21.1

org.netbeans.api.visual.print
Class ScenePrinter

java.lang.Object
  extended by org.netbeans.api.visual.print.ScenePrinter

public final class ScenePrinter
extends Object

A class used to print a Scene to a printer. Multiple convenience methods are provided to initiate the print with various constraints.


Nested Class Summary
static class ScenePrinter.ScaleStrategy
          Scaling strategies to be used for printing a scene.
 
Method Summary
static void print(Scene scene)
          Print the scene exactly as it is.
static void print(Scene scene, double scaleX, double scaleY)
          Print the Scene with specific scaling percentages for the horizontal and vertical direction.
static void print(Scene scene, PageFormat format)
          Print the Scene with provided PageFormat.
static void print(Scene scene, PageFormat format, Rectangle region)
          Print a specific section of the Scene according to the provided Format.
static void print(Scene scene, PageFormat format, ScenePrinter.ScaleStrategy scaleStrategy)
          Print the Scene with the provided format and scale type.
static void print(Scene scene, PageFormat format, ScenePrinter.ScaleStrategy scaleStrategy, double scaleX, double scaleY, boolean selectedOnly, boolean visibleOnly, Rectangle region, List<LayerWidget> hiddenLayers)
          This is the master print call.
static void print(Scene scene, ScenePrinter.ScaleStrategy scaleStrategy)
          Print the Scene with the default PageFormat and the provided scale type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

print

public static void print(Scene scene)
Print the scene exactly as it is. There is to be no scaling or special formatting.

Parameters:
scene - The Scene to be printed.

print

public static void print(Scene scene,
                         PageFormat format)
Print the Scene with provided PageFormat.

Parameters:
scene - The Scene to be printed.
format - format used for printing Scene.

print

public static void print(Scene scene,
                         ScenePrinter.ScaleStrategy scaleStrategy)
Print the Scene with the default PageFormat and the provided scale type.

Parameters:
scene - The Scene to be printed.
scaleStrategy - Value representing the scaling strategy to use for the printing.

print

public static void print(Scene scene,
                         double scaleX,
                         double scaleY)
Print the Scene with specific scaling percentages for the horizontal and vertical direction.

Parameters:
scene - The Scene to be printed.
scaleX - scaling percentage in the horizontal dimension.
scaleY - scaling percentage in the vertical dimension.

print

public static void print(Scene scene,
                         PageFormat format,
                         ScenePrinter.ScaleStrategy scaleStrategy)
Print the Scene with the provided format and scale type.

Parameters:
scene - The Scene to be printed.
format - Format used for printing Scene.
scaleStrategy - Value representing the scaling strategy to use for the printing.

print

public static void print(Scene scene,
                         PageFormat format,
                         Rectangle region)
Print a specific section of the Scene according to the provided Format.

Parameters:
scene - The Scene to be printed.
format - Format used for printing Scene.
region - The rectangle representing the are of the Scene to be printed.

print

public static void print(Scene scene,
                         PageFormat format,
                         ScenePrinter.ScaleStrategy scaleStrategy,
                         double scaleX,
                         double scaleY,
                         boolean selectedOnly,
                         boolean visibleOnly,
                         Rectangle region,
                         List<LayerWidget> hiddenLayers)
This is the master print call. All other print calls in this class pass through to here after setting the appropriate parameters. Note that the scale type parameter take precedent over the horizontal and vertical scaling percentages. Therefore, if the scale type was "SCALE_TO_FIT_Y", then the values of horizontal and vertical scaling percentages would not be used.

Parameters:
scene - The Scene to be printed.
format - format used for printing Scene. If null then a new default PageFormat is created.
scaleStrategy - value representing the how to scale the printing.
scaleX - Directly set the horizontal scale percentage. This parameter is only used when the scale strategy is ScaleStrategy.SCALE_PERCENT. Otherwise it is ignored.
scaleY - Directly set the vertical scale percentage. This parameter is only used when the scale strategy is ScaleStrategy.SCALE_PERCENT. Otherwise it is ignored.
selectedOnly - Print only the objects from the Scene that have been selected. Note that in this case the Scene must be an instnace of an ObjectScene since this is required to determine the selected objects.
visibleOnly - Print only the object in the visible window.
region - The rectangle representing the are of the Scene to be printed.
hiddenLayerWidgets - Layer that are not to be printed. Might be used to hide the background while printing.

org.netbeans.api.visual 2.21.1

Built on February 22 2010.  |  Portions Copyright 1997-2010 Sun Microsystems, Inc. All rights reserved.