Top Description Inners Fields Constructors Methods
com.dlsc.gemsfx

public Class MaskedView

extends Control
Class Inheritance
Imports
com.dlsc.gemsfx.skins.MaskedViewSkin, javafx.beans.property.DoubleProperty, .SimpleObjectProperty, javafx.css.CssMetaData, .Styleable, .StyleableDoubleProperty, .StyleableProperty, javafx.css.converter.SizeConverter, javafx.scene.Node, javafx.scene.control.Control, .Skin, java.util.ArrayList, .Collections, .List

A view that takes a content node and applies advanced clipping so that its left and right side will "fade out". This is especially useful in combination with controls that want to show scrolling controls on both sides for moving things to the left and right as those controls will then be nicely visible. The StripView control is using the masked view inside its skin.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final SimpleObjectProperty<Node>
private static final int
private DoubleProperty

Constructor Summary

AccessConstructor and Description
public
MaskedView()

Constructs a new masked view.

public
MaskedView(Node content)

Constructs a new masked view for the given content.

Method Summary

Modifier and TypeMethod and Description
public final SimpleObjectProperty<Node>

Returns:

the content node
contentProperty
()

The content that will be shown inside the masked view.

protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

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

public final DoubleProperty

Returns:

the size of the side fading areas / clip areas
fadingSizeProperty
()

The width of the clips on the left and right hand side of the view.

public static List<CssMetaData<? extends Styleable, ?>>
getClassCssMetaData()

Hides javafx.scene.control.Control.getClassCssMetaData.

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

public final Node
protected List<CssMetaData<? extends Styleable, ?>>
getControlCssMetaData()

Overrides javafx.scene.control.Control.getControlCssMetaData.

Gets the unmodifiable list of the control's CSS-styleable properties.

public final double
public final void
setContent(Node content)

public final void
setFadingSize(double fadingSize)

Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertyexecuteAccessibleActiongetBaselineOffsetgetContextMenugetCssMetaDatagetInitialFocusTraversablegetSkingetTooltipisResizablelayoutChildrenqueryAccessibleAttributesetContextMenusetSkinsetTooltipskinPropertytooltipProperty

Field Detail

contentback to summary
private final SimpleObjectProperty<Node> content
DEFAULT_FADING_SIZEback to summary
private static final int DEFAULT_FADING_SIZE
fadingSizeback to summary
private DoubleProperty fadingSize

Constructor Detail

MaskedViewback to summary
public MaskedView()

Constructs a new masked view. Content can be specified later by calling setContent(Node).

MaskedViewback to summary
public MaskedView(Node content)

Constructs a new masked view for the given content.

Method Detail

contentPropertyback to summary
public final SimpleObjectProperty<Node> contentProperty()

The content that will be shown inside the masked view.

Returns:SimpleObjectProperty<Node>

the content node

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(...).

Annotations
@Override
fadingSizePropertyback to summary
public final DoubleProperty fadingSizeProperty()

The width of the clips on the left and right hand side of the view. This property defines how big the fade in / out areas will be.

Returns:DoubleProperty

the size of the side fading areas / clip areas

getClassCssMetaDataback to summary
public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData()

Hides javafx.scene.control.Control.getClassCssMetaData.

Doc from javafx.scene.control.Control.getClassCssMetaData.

Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses.

getContentback to summary
public final Node getContent()
getControlCssMetaDataback to summary
protected List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData()

Overrides javafx.scene.control.Control.getControlCssMetaData.

Doc from javafx.scene.control.Control.getControlCssMetaData.

Gets the unmodifiable list of the control's CSS-styleable properties.

Annotations
@Override
getFadingSizeback to summary
public final double getFadingSize()
setContentback to summary
public final void setContent(Node content)
setFadingSizeback to summary
public final void setFadingSize(double fadingSize)
com.dlsc.gemsfx back to summary

private Class MaskedView.StyleableProperties

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final CssMetaData<MaskedView, Number>
private static final List<CssMetaData<? extends Styleable, ?>>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

FADING_SIZEback to summary
private static final CssMetaData<MaskedView, Number> FADING_SIZE
STYLEABLESback to summary
private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES

Constructor Detail

StyleablePropertiesback to summary
private StyleableProperties()