Top Description Inners Fields Constructors Methods
com.calendarfx.view.print

public Class PaperView

extends ViewTypeControl
Class Inheritance
Imports
java.util.Objects, .Set, impl.com.calendarfx.view.print.PaperViewSkin, javafx.beans.property.BooleanProperty, .DoubleProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleDoubleProperty, .SimpleObjectProperty, javafx.collections.FXCollections, .ObservableList, javafx.print.Paper, .Printer, .PrinterAttributes, javafx.scene.control.Skin

A control for specifying the paper size, the view type (day, week, month), and the print margins. The default style class of this view is "paper-view". Paper View

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
PaperView.MarginType

Possible print margin types: default, minimum, custom.

Field Summary

Modifier and TypeField and Description
private final ObservableList<Paper>
private final DoubleProperty
private static final String
private final DoubleProperty
private final ObjectProperty<PaperView.MarginType>
private final ObjectProperty<Paper>
private final DoubleProperty
private final BooleanProperty
private final DoubleProperty

Constructor Summary

AccessConstructor and Description
public
PaperView()

Constructs a new paper setup control.

Method Summary

Modifier and TypeMethod and Description
public final DoubleProperty

Returns:

the bottom margin
bottomMarginProperty
()

Stores the bottom print margin value.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public final ObservableList<Paper>

Returns:

the paper sizes
getAvailablePapers
()

Returns the available paper sizes.

public final double

Returns:

the bottom margin
getBottomMargin
()

Returns the value of the bottomMarginProperty().

public final double

Returns:

the left margin
getLeftMargin
()

Returns the value of the leftMarginProperty().

public final PaperView.MarginType

Returns:

the margin type (custom, default, minimum)
getMarginType
()

Returns the value of marginTypeProperty().

public final Paper

Returns:

the paper
getPaper
()

Returns the value of paperProperty().

public final double

Returns:

the right margin
getRightMargin
()

Returns the value of the rightMarginProperty().

public final double

Returns:

the top margin
getTopMargin
()

Returns the value of the topMarginProperty().

public boolean

Returns:

The flag to show/hide Margin combo.
isShowMargin
()

Returns the value of the showMarginProperty().

public final DoubleProperty

Returns:

the left margin
leftMarginProperty
()

Stores the left print margin value.

public final ObjectProperty<PaperView.MarginType>

Returns:

the requested margin types
marginTypeProperty
()

A property used to store the currently requested margin type (custom, minimum, or default).

public final ObjectProperty<Paper>

Returns:

the paper
paperProperty
()

A property used to store the currently selected paper size.

public final DoubleProperty

Returns:

the right margin
rightMarginProperty
()

Stores the right print margin value.

public final void
setBottomMargin(double
the bottom margin
margin
)

Sets the value of the bottomMarginProperty().

public final void
setLeftMargin(double
the left margin
margin
)

Sets the value of the leftMarginProperty().

public final void
setMarginType(PaperView.MarginType
the margin type (custom, default, minimum)
type
)

Sets the value of marginTypeProperty().

public final void
setPaper(Paper
the paper
paper
)

Sets the value of paperProperty().

public final void
setRightMargin(double
the right margin
margin
)

Sets the value of the rightMarginProperty().

public void
setShowMargin(boolean
boolean value
show
)

Sets the value of the showMarginProperty().

public final void
setTopMargin(double
the top margin
margin
)

Sets the value of the topMarginProperty().

public BooleanProperty

Returns:

showMargin
showMarginProperty
()

Stores the flag that indicates if margin combo will be displayed.

public final DoubleProperty

Returns:

the top margin
topMarginProperty
()

Stores the top print margin value.

Inherited from com.calendarfx.view.print.ViewTypeControl:
getPropertySheetItemsgetViewTypesetViewTypeviewTypeProperty

Field Detail

availablePapersback to summary
private final ObservableList<Paper> availablePapers
bottomMarginback to summary
private final DoubleProperty bottomMargin
DEFAULT_STYLEback to summary
private static final String DEFAULT_STYLE
leftMarginback to summary
private final DoubleProperty leftMargin
marginTypeback to summary
private final ObjectProperty<PaperView.MarginType> marginType
paperback to summary
private final ObjectProperty<Paper> paper
rightMarginback to summary
private final DoubleProperty rightMargin
showMarginback to summary
private final BooleanProperty showMargin
topMarginback to summary
private final DoubleProperty topMargin

Constructor Detail

PaperViewback to summary
public PaperView()

Constructs a new paper setup control.

Method Detail

bottomMarginPropertyback to summary
public final DoubleProperty bottomMarginProperty()

Stores the bottom print margin value.

Returns:DoubleProperty

the bottom margin

createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Returns:Skin<?>

new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.

Annotations
@Override
getAvailablePapersback to summary
public final ObservableList<Paper> getAvailablePapers()

Returns the available paper sizes.

Returns:ObservableList<Paper>

the paper sizes

getBottomMarginback to summary
public final double getBottomMargin()

Returns the value of the bottomMarginProperty().

Returns:double

the bottom margin

getLeftMarginback to summary
public final double getLeftMargin()

Returns the value of the leftMarginProperty().

Returns:double

the left margin

getMarginTypeback to summary
public final PaperView.MarginType getMarginType()

Returns the value of marginTypeProperty().

Returns:PaperView.MarginType

the margin type (custom, default, minimum)

getPaperback to summary
public final Paper getPaper()

Returns the value of paperProperty().

Returns:Paper

the paper

getRightMarginback to summary
public final double getRightMargin()

Returns the value of the rightMarginProperty().

Returns:double

the right margin

getTopMarginback to summary
public final double getTopMargin()

Returns the value of the topMarginProperty().

Returns:double

the top margin

isShowMarginback to summary
public boolean isShowMargin()

Returns the value of the showMarginProperty().

Returns:boolean

The flag to show/hide Margin combo.

leftMarginPropertyback to summary
public final DoubleProperty leftMarginProperty()

Stores the left print margin value.

Returns:DoubleProperty

the left margin

marginTypePropertyback to summary
public final ObjectProperty<PaperView.MarginType> marginTypeProperty()

A property used to store the currently requested margin type (custom, minimum, or default).

Returns:ObjectProperty<PaperView.MarginType>

the requested margin types

paperPropertyback to summary
public final ObjectProperty<Paper> paperProperty()

A property used to store the currently selected paper size.

Returns:ObjectProperty<Paper>

the paper

rightMarginPropertyback to summary
public final DoubleProperty rightMarginProperty()

Stores the right print margin value.

Returns:DoubleProperty

the right margin

setBottomMarginback to summary
public final void setBottomMargin(double margin)

Sets the value of the bottomMarginProperty().

Parameters
margin:double

the bottom margin

setLeftMarginback to summary
public final void setLeftMargin(double margin)

Sets the value of the leftMarginProperty().

Parameters
margin:double

the left margin

setMarginTypeback to summary
public final void setMarginType(PaperView.MarginType type)

Sets the value of marginTypeProperty().

Parameters
type:PaperView.MarginType

the margin type (custom, default, minimum)

setPaperback to summary
public final void setPaper(Paper paper)

Sets the value of paperProperty().

Parameters
paper:Paper

the paper

setRightMarginback to summary
public final void setRightMargin(double margin)

Sets the value of the rightMarginProperty().

Parameters
margin:double

the right margin

setShowMarginback to summary
public void setShowMargin(boolean show)

Sets the value of the showMarginProperty().

Parameters
show:boolean

boolean value

setTopMarginback to summary
public final void setTopMargin(double margin)

Sets the value of the topMarginProperty().

Parameters
margin:double

the top margin

showMarginPropertyback to summary
public BooleanProperty showMarginProperty()

Stores the flag that indicates if margin combo will be displayed.

Returns:BooleanProperty

showMargin

topMarginPropertyback to summary
public final DoubleProperty topMarginProperty()

Stores the top print margin value.

Returns:DoubleProperty

the top margin

com.calendarfx.view.print back to summary

public final Enum PaperView.MarginType

extends Enum<PaperView.MarginType>
Class Inheritance

Possible print margin types: default, minimum, custom.

Field Summary

Modifier and TypeField and Description
public static final PaperView.MarginType
CUSTOM

Used to request that custom margins shall be used for printing.

public static final PaperView.MarginType
DEFAULT

Used to request that the default margins of the printer shall be used for printing.

public static final PaperView.MarginType
MINIMUM

Used to request that the minimum margins supported by the printer shall be used for printing.

pack-priv Printer.MarginType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Printer.MarginType
public static PaperView.MarginType
public static PaperView.MarginType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CUSTOMback to summary
public static final PaperView.MarginType CUSTOM

Used to request that custom margins shall be used for printing.

DEFAULTback to summary
public static final PaperView.MarginType DEFAULT

Used to request that the default margins of the printer shall be used for printing.

MINIMUMback to summary
public static final PaperView.MarginType MINIMUM

Used to request that the minimum margins supported by the printer shall be used for printing.

typeback to summary
pack-priv Printer.MarginType type

Constructor Detail

MarginTypeback to summary
private MarginType(Printer.MarginType type)

Method Detail

getPrinterMarginTypeback to summary
public Printer.MarginType getPrinterMarginType()
valueOfback to summary
public static PaperView.MarginType valueOf(String name)
valuesback to summary
public static PaperView.MarginType[] values()