Top Inners Constructors Methods
com.dlsc.gemsfx.skins

public Class PhotoViewSkin

extends SkinBase<PhotoView>
Class Inheritance
Imports
com.dlsc.gemsfx.PhotoView, .PhotoView.ClipShape, javafx.application.Platform, javafx.beans.InvalidationListener, javafx.beans.binding.Bindings, javafx.concurrent.Service, .Task, javafx.geometry.Pos, javafx.scene.Cursor, .Node, javafx.scene.control.SkinBase, .Slider, javafx.scene.effect.DropShadow, .InnerShadow, javafx.scene.image.Image, .ImageView, .PixelReader, .WritableImage, javafx.scene.layout.Priority, .Region, .StackPane, .VBox, javafx.scene.shape.Circle, .Rectangle, java.util.function.Supplier

Nested and Inner Type Summary

Modifier and TypeClass and Description
public class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthconsumeMouseEventsdisposeexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutChildrenlayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Constructor Detail

PhotoViewSkinback to summary
public PhotoViewSkin(PhotoView view)
com.dlsc.gemsfx.skins back to summary

public Class PhotoViewSkin.ImageBox

extends StackPane
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private final Circle
private final PhotoViewSkin.ImageBox.CropService
private final ImageView
private final Rectangle
private double
private double

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
crop()

private void
protected void
layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

private void
private void
private void
private void
updatePlaceholder(Node oldPlaceholder, Node newPlaceholder)

private void
Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginrequestLayoutsetAlignmentsetAlignmentsetMargin

Field Detail

circleback to summary
private final Circle circle
cropServiceback to summary
private final PhotoViewSkin.ImageBox.CropService cropService
imageViewback to summary
private final ImageView imageView
rectangleback to summary
private final Rectangle rectangle
startXback to summary
private double startX
startYback to summary
private double startY

Constructor Detail

ImageBoxback to summary
public ImageBox(PhotoView view)

Method Detail

cropback to summary
public void crop()
doCropback to summary
private void doCrop()
layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
updateBorderShapeback to summary
private void updateBorderShape()
updateCircleClipback to summary
private void updateCircleClip()
updateClipback to summary
private void updateClip()
updatePlaceholderback to summary
private void updatePlaceholder(Node oldPlaceholder, Node newPlaceholder)
updateRectangleClipback to summary
private void updateRectangleClip()
com.dlsc.gemsfx.skins back to summary

pack-priv Class PhotoViewSkin.ImageBox.CropService

extends Service<Void>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Constructor Detail

CropServiceback to summary
pack-priv CropService()

Method Detail

createTaskback to summary
protected Task<Void> createTask()

Implements abstract javafx.concurrent.Service.createTask.

Doc from javafx.concurrent.Service.createTask.

Invoked after the Service is started on the JavaFX Application Thread. Implementations should save off any state into final variables prior to creating the Task, since accessing properties defined on the Service within the background thread code of the Task will result in exceptions. For example:


    protected Task createTask() {
        final String url = myService.getUrl();
        return new Task<String>() {
            protected String call() {
                URL u = new URL("http://www.oracle.com");
                BufferedReader in = new BufferedReader(
                        new InputStreamReader(u.openStream()));
                String result = in.readLine();
                in.close();
                return result;
            }
        }
    }

If the Task is a pre-defined class (as opposed to being an anonymous class), and if it followed the recommended best-practice, then there is no need to save off state prior to constructing the Task since its state is completely provided in its constructor.

protected Task createTask() {
        // This is safe because getUrl is called on the FX Application
        // Thread and the FirstLineReaderTasks stores it as an
        // immutable property
        return new FirstLineReaderTask(myService.getUrl());
    }
Annotations
@Override
com.dlsc.gemsfx.skins back to summary

pack-priv Class PhotoViewSkin.ImageBox.CropTask

extends Task<Void>
Class Inheritance

Constructor Summary

AccessConstructor and Description
pack-priv

Constructor Detail

CropTaskback to summary
pack-priv CropTask()

Method Detail

callback to summary
protected Void call() throws Exception

Implements abstract javafx.concurrent.Task.call.

Doc from javafx.concurrent.Task.call.

Invoked when the Task is executed, the call method must be overridden and implemented by subclasses. The call method actually performs the background thread logic. Only the updateProgress, updateMessage, updateValue and updateTitle methods of Task may be called from code within this method. Any other interaction with the Task from the background thread will result in runtime exceptions.

Annotations
@Override
Exceptions
Exception:
an unhandled exception which occurred during the background operation