CameraPane

open class CameraPane<T : LayoutView<*>>(    posX: Number = 0,     posY: Number = 0,     width: Number,     height: Number,     visual: Visual = Visual.EMPTY,     target: T) : ComponentView

A pane representing a camera view that can be used to display and manipulate a target layout view.

Parameters

posX

The x-coordinate of the camera pane's position on the screen. Default is 0.

posY

The y-coordinate of the camera pane's position on the screen. Default is 0.

width

The width of the camera pane.

height

The height of the camera pane.

visual

The visual representation of the camera pane. Default is an empty visual.

target

The target layout view that this camera pane will display.

T

The type of the target layout view. Must extend the LayoutView class.

Constructors

Link copied to clipboard
fun <T : LayoutView<*>> CameraPane(    posX: Number = 0,     posY: Number = 0,     width: Number,     height: Number,     visual: Visual = Visual.EMPTY,     target: T)

Functions

Link copied to clipboard
fun offset(offsetX: Number, offsetY: Number)

Adds an offset to this ComponentView's Position.

Link copied to clipboard
fun pan(    x: Number,     y: Number,     smooth: Boolean = false)

pans the view of the camera to the specified coordinates. The coordinates specified represent the upper-left corner of the view.

Link copied to clipboard
fun panBy(    xOffset: Number,     yOffset: Number,     smooth: Boolean = false)

pans the view of the camera by the given offsets.

Link copied to clipboard
fun removeFromParent(): ComponentView

Removes this component from its parent.

Link copied to clipboard
fun reposition(posX: Number, posY: Number)

Repositions this ComponentView to the specified coordinates.

Link copied to clipboard
fun resize(width: Number, height: Number)

Resizes this ComponentView to the specified width and height.

Link copied to clipboard
fun rotate(degrees: Number)

Rotates this ComponentView by the given number of degrees.

Link copied to clipboard
fun scale(scalar: Number)

Scales this ComponentView by the given scalar.

Link copied to clipboard
fun scaleX(scalar: Number)

Scales this ComponentView's width by the given scalar.

Link copied to clipboard
fun scaleY(scalar: Number)

Scales this ComponentView's height by the given scalar.

Link copied to clipboard
fun toBack()

Puts the ComponentView to the back inside its parent and Changes its zIndex accordingly.

Link copied to clipboard
fun toFront()

Puts the ComponentView to the front inside its parent and Changes its zIndex accordingly.

Properties

Link copied to clipboard
var actualHeight: Double

The actual height for this ComponentView considering scale.

Link copied to clipboard
var actualPosX: Double

Horizontal position of this ComponentView considering scale.

Link copied to clipboard
var actualPosY: Double

Vertical position of this ComponentView considering scale.

Link copied to clipboard
var actualWidth: Double

The actual width for this ComponentView considering scale.

Link copied to clipboard
var dropAcceptor: (DragEvent) -> Boolean? = null

Returns whether this ComponentView is a valid drop target for the dragged component in the given DragEvent or not.

Link copied to clipboard
var height: Double

The height for this ComponentView.

Link copied to clipboard
val heightProperty: DoubleProperty

Property for the height of this ComponentView.

Link copied to clipboard
var interactive: Boolean

Determines if the camera pane is interactive, which means that you can scroll to zoom and drag to move around.

Link copied to clipboard
val interactiveProperty: BooleanProperty

Property for the interactive state of the CameraPane.

Link copied to clipboard
var isDisabled: Boolean

Controls if user input events cause input functions of this ComponentView to get invoked.

Link copied to clipboard
val isDisabledProperty: BooleanProperty

Property that controls if user input events cause input functions of this ComponentView to get invoked.

Link copied to clipboard
var isFocusable: Boolean

Controls whether this ComponentView is focusable or not.

Link copied to clipboard
val isFocusableProperty: BooleanProperty

Property that controls whether this ComponentView is focusable or not.

Link copied to clipboard
var isHorizontalLocked: Boolean

Determines if the camera pane is locked horizontally, which means that you can only scroll vertically.

Link copied to clipboard
var isVerticalLocked: Boolean

Determines if the camera pane is locked vertically, which means that you can only scroll horizontally.

Link copied to clipboard
var isVisible: Boolean

Visibility of this ComponentView.

Link copied to clipboard
val isVisibleProperty: BooleanProperty

Property for the visibility of this ComponentView.

Link copied to clipboard
var isZoomLocked: Boolean

Determines if the camera pane is locked for zooming, which means that you can only scroll.

Link copied to clipboard
var layoutBounds: CoordinatePlain

Returns a CoordinatePlain containing the component's corner Coordinates and its layout bounds.

Link copied to clipboard
var name: String

Name field only for debugging purposes. Has no effect on rendering.

Link copied to clipboard
var onDragDropped: (DragEvent) -> Unit? = null

Gets invoked with a DragEvent whenever a drag and drop gesture finishes over this ComponentView and the dropAcceptor returns true for the given DragEvent.

Link copied to clipboard
var onDragGestureEntered: (DragEvent) -> Unit? = null

Gets invoked with a DragEvent whenever the mouse enters this ComponentView while performing a drag gesture.

Link copied to clipboard
var onDragGestureExited: (DragEvent) -> Unit? = null

Gets invoked with a DragEvent whenever the mouse leaves this ComponentView while performing a drag gesture.

Link copied to clipboard
var onKeyPressed: (KeyEvent) -> Unit? = null

Gets invoked with a KeyEvent whenever a key is pressed while this ComponentView has focus.

Link copied to clipboard
var onKeyReleased: (KeyEvent) -> Unit? = null

Gets invoked with a KeyEvent whenever a key is released while this ComponentView has focus.

Link copied to clipboard
var onKeyTyped: (KeyEvent) -> Unit? = null

Gets invoked with a KeyEvent whenever a Character is typed while this ComponentView has focus. Gets invoked after onKeyPressed.

Link copied to clipboard
var onMouseClicked: (MouseEvent) -> Unit? = null

Gets invoked with a MouseEvent whenever the mouse is clicked inside this ComponentView. Gets invoked after onMousePressed and onMouseReleased.

Link copied to clipboard
var onMouseEntered: (MouseEvent) -> Unit? = null

Gets invoked with a MouseEvent whenever the mouse enters this ComponentView.

Link copied to clipboard
var onMouseExited: (MouseEvent) -> Unit? = null

Gets invoked with a MouseEvent whenever the mouse leaves this ComponentView.

Link copied to clipboard
var onMousePressed: (MouseEvent) -> Unit? = null

Gets invoked with a MouseEvent whenever the mouse is pressed inside this ComponentView.

Link copied to clipboard
var onMouseReleased: (MouseEvent) -> Unit? = null

Gets invoked with a MouseEvent whenever the mouse is released inside this ComponentView.

Link copied to clipboard
var onScroll: (ScrollEvent) -> Unit? = null

Gets invoked with a ScrollEvent whenever the mouse wheel is turned while the mouse is inside this ComponentView.

Link copied to clipboard
var opacity: Double

Opacity of this ComponentView.

Link copied to clipboard
val opacityProperty: LimitedDoubleProperty

Property for the opacity of this ComponentView.

Link copied to clipboard
var panMouseButton: MouseButtonType

The mouse button that is used to pan the camera pane.

Link copied to clipboard
var parent: ComponentView? = null

The parent of this ComponentView.

Link copied to clipboard
var posX: Double

Horizontal position of this ComponentView.

Link copied to clipboard
val posXProperty: DoubleProperty

Property for the horizontal position of this ComponentView.

Link copied to clipboard
var posY: Double

Vertical position of this ComponentView.

Link copied to clipboard
val posYProperty: DoubleProperty

Property for the vertical position of this ComponentView.

Link copied to clipboard
var rotation: Double

Rotation of this ComponentView in degrees.

Link copied to clipboard
val rotationProperty: DoubleProperty

Property for the rotation of this ComponentView in degrees.

Link copied to clipboard
var scale: Double

Scale of this ComponentView.

Link copied to clipboard
var scaleX: Double

Horizontal scale of this ComponentView.

Link copied to clipboard
val scaleXProperty: DoubleProperty

Property for the horizontal scale of this ComponentView.

Link copied to clipboard
var scaleY: Double

Vertical scale of this ComponentView.

Link copied to clipboard
val scaleYProperty: DoubleProperty

Property for the vertical scale of this ComponentView.

Link copied to clipboard
val scroll: Coordinate

Upper-left corner of the current scrolling window. It is initialized at (0,0)

Link copied to clipboard
open var visual: Visual

Current Visual.

Link copied to clipboard
var width: Double

The width for this ComponentView.

Link copied to clipboard
val widthProperty: DoubleProperty

Property for the width of this ComponentView.

Link copied to clipboard
var zIndex: Int

for the order of ComponentView inside of parent.#

Link copied to clipboard
val zIndexProperty: IntegerProperty

Property for the order of ComponentView inside of parent.#

Link copied to clipboard
var zoom: Double

Zoom factor of the camera starting from 1.

Link copied to clipboard
val zoomProperty: DoubleProperty

Property for the zoom state of the CameraPane.