FakeResizableComponent


class FakeResizableComponent : FakeComponent


Fake implementation of ResizableComponent for testing.

Summary

Public constructors

Public functions

open Unit
addResizeEventListener(
    executor: Executor,
    resizeEventListener: ResizeEventListener
)

Adds the listener to the set of listeners that are invoked through the resize operation, such as start, ongoing and end.

open Unit

Removes the given listener from the set of listeners for the resize events.

Public properties

open Boolean

Sets whether or not content (including content of all child nodes) is auto-hidden during resizing.

open Boolean

Sets whether the size of the ResizableComponent is automatically updated to match during an ongoing resize (to match the proposed size as resize events are received).

open Float

Sets the aspect ratio of the entity during resizing.

open Boolean

Sets whether to force showing the resize overlay even when this entity is not being resized.

open Dimensions

Sets the maximum size constraint for the entity.

open Dimensions

Sets the minimum size constraint for the entity.

open Dimensions

Sets the size of the entity.

Public constructors

FakeResizableComponent

Added in 1.0.0-alpha04
FakeResizableComponent()

Public functions

addResizeEventListener

Added in 1.0.0-alpha04
open fun addResizeEventListener(
    executor: Executor,
    resizeEventListener: ResizeEventListener
): Unit

Adds the listener to the set of listeners that are invoked through the resize operation, such as start, ongoing and end.

The listener is invoked on the provided executor. If the app intends to modify the UI elements/views during the callback, the app should provide the thread executor that is appropriate for the UI operations. For example, if the app is using the main thread to render the UI, the app should provide the main thread (Looper.getMainLooper()) executor. If the app is using a separate thread to render the UI, the app should provide the executor for that thread.

Parameters
executor: Executor

The executor to use for the listener callback.

resizeEventListener: ResizeEventListener

The listener to be invoked when a resize event occurs.

removeResizeEventListener

Added in 1.0.0-alpha04
open fun removeResizeEventListener(resizeEventListener: ResizeEventListener): Unit

Removes the given listener from the set of listeners for the resize events.

Parameters
resizeEventListener: ResizeEventListener

The listener to be removed.

Public properties

autoHideContent

Added in 1.0.0-alpha04
open var autoHideContentBoolean

Sets whether or not content (including content of all child nodes) is auto-hidden during resizing. Defaults to true.

autoUpdateSize

Added in 1.0.0-alpha04
open var autoUpdateSizeBoolean

Sets whether the size of the ResizableComponent is automatically updated to match during an ongoing resize (to match the proposed size as resize events are received). Defaults to true.

fixedAspectRatio

Added in 1.0.0-alpha04
open var fixedAspectRatioFloat

Sets the aspect ratio of the entity during resizing.

The aspect ratio is determined by taking the panel's width over its height. A value of 0.0f (or negative) means there are no preferences.

This method does not immediately resize the entity. The new aspect ratio will be applied the next time the user resizes the entity through the reform UI. During this resize operation, the entity's current area will be preserved.

If a different resizing behavior is desired, such as fixing the width and adjusting the height, the client can manually resize the entity to the preferred dimensions before calling this method. No automatic resizing will occur when using the reform UI then.

forceShowResizeOverlay

Added in 1.0.0-alpha04
open var forceShowResizeOverlayBoolean

Sets whether to force showing the resize overlay even when this entity is not being resized. Defaults to false.

maximumSize

Added in 1.0.0-alpha04
open var maximumSizeDimensions

Sets the maximum size constraint for the entity.

The maximum size constraint is used to set constraints on how large the user can resize the bounding box of the entity up to. The size of the content inside that bounding box is fully controlled by the application.

minimumSize

Added in 1.0.0-alpha04
open var minimumSizeDimensions

Sets the minimum size constraint for the entity.

The minimum size constraint is used to set constraints on how small the user can resize the bounding box of the entity up to. The size of the content inside that bounding box is fully controlled by the application.

size

Added in 1.0.0-alpha04
open var sizeDimensions

Sets the size of the entity.

The size of the entity is the size of the bounding box that contains the content of the entity. The size of the content inside that bounding box is fully controlled by the application.