PlacesDock

open class PlacesDock(val harbour: Harbour, val places: MutableObservableList<Place> = Places.sharedPlaces, id: String = ID) : Dock

A tree view of folders and files.

The root of the tree can be any folder within the list : places, and initially, the first Place in the list is used as the root.

The dock can be used to open files within your application, instead of the more traditional File->Open dialog. To do so, override openFile.

The default value of places in the constructor are taken from Places.sharedPlaces, which means these favourite places are shared by all Glok applications. If you prefer, your application can keep its own list of favourite places, which can be loaded and saved using Places.loadPlaces and Places.savePlaces.

Constructors

Link copied to clipboard
constructor(harbour: Harbour, places: MutableObservableList<Place> = Places.sharedPlaces, id: String = ID)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Which sides of the harbour this Dock can be moved to by the user.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Set this to false to prevent the user closing this Dock. Closing the Dock programmatically is not affected by this.

Link copied to clipboard
open override val children: ObservableList<Node>
Link copied to clipboard
Link copied to clipboard

The main content of the Dock.

Link copied to clipboard
Link copied to clipboard

The current favourite Place selected from places. Changing this will change the root of the tree.

Link copied to clipboard
Link copied to clipboard

Each side of the Harbour has two sets of Docks, primary or secondary. This decides if this Dock is placed in the primary set if not explicitly specified. See Harbour.add

Link copied to clipboard
Link copied to clipboard

Determines which side of the Harbour this Dock will be placed if not explicitly specified. See Harbour.add.

Link copied to clipboard

A Unique identifier. Used when loading/saving the meta-data.

Link copied to clipboard
Link copied to clipboard

Allows an application to use its own dialogs for renaming, copying and deleting files. In most cases the default value (StandardFileDialogFactory) is sufficient.

Link copied to clipboard
Link copied to clipboard

Filters which files to display in the PlacesDock. The default value is EXCLUDE_HIDDEN_FILES.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Filters which folders to display in the PlacesDock. The default value is EXCLUDE_HIDDEN_FILES.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

An optional icon, which is displayed to the left of the title in the ToggleButtons at the side of the Harbour as well as in the title-bar of the dock.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var parent: Node?
Link copied to clipboard
Link copied to clipboard

A list of "favourite" places. Any item in this list can be the root node of the tree.

Link copied to clipboard
Link copied to clipboard

Optional text which is appended (with a space) to the title in the ToggleButtons at the side of the Harbour. These can be used a visual hints for a shortcut, which makes this Dock visible.

Link copied to clipboard

Is this dock in the primary or secondary set of docks? If this Dock is not within a Harbour (yet), then this value is meaningless.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var scene: Scene?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
var side: Side

The side of the Harbour that this dock occupies. If this Dock is not within a Harbour (yet), then this value is meaningless.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Buttons (or other Nodes), which appear in the title-bar of this Dock. Initially, this contains only a close button. If you want the close button to remain on the far right, then add items at the front of the list.

Link copied to clipboard

Appears in to ToggleButton at the side of the Harbour, as well as in the title-bar of the dock.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun <E : Event> addEventFilter(eventType: EventType<E>, handler: EventHandler<E>, combination: HandlerCombination)
fun <E : Event> addEventFilter(eventType: EventType<E>, handlerCombination: HandlerCombination, handler: (E) -> Unit)
Link copied to clipboard
fun <E : Event> addEventHandler(eventType: EventType<E>, handler: EventHandler<E>, combination: HandlerCombination)
fun <E : Event> addEventHandler(eventType: EventType<E>, combination: HandlerCombination, handler: (E) -> Unit)
Link copied to clipboard
open fun close()

Removes this Dock.

Link copied to clipboard
fun containsScenePoint(sceneX: Float, sceneY: Float): Boolean
Link copied to clipboard

This PopupMenu appears when the user right-clicks the Dock's ToggleButton, or the Dock's title.

Link copied to clipboard
fun dump(prefix: String, borders: Boolean, size: Boolean, filter: (Node) -> Boolean)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun findDeepestNodeAt(sceneX: Float, sceneY: Float): Node
Link copied to clipboard
Link copied to clipboard
open fun findStylableProperty(propertyName: String): StylableProperty<*>?
Link copied to clipboard
fun firstToRoot(filter: (Node) -> Boolean): Node?
Link copied to clipboard
fun forEachDescending(block: (Node) -> Unit)
Link copied to clipboard
fun forEachFromRoot(block: (Node) -> Unit)
Link copied to clipboard
fun forEachToRoot(block: (Node) -> Unit)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun nodeMaxHeight(): Float
Link copied to clipboard
open override fun nodeMaxWidth(): Float
Link copied to clipboard
open fun nodeMinHeight(): Float
Link copied to clipboard
open fun nodeMinWidth(): Float
Link copied to clipboard
open override fun nodePrefHeight(): Float
Link copied to clipboard
open override fun nodePrefWidth(): Float
Link copied to clipboard
fun onFilesDropped(combination: HandlerCombination, handler: (DroppedFilesEvent) -> Unit)
Link copied to clipboard
fun onKeyPressed(combination: HandlerCombination, handler: (KeyEvent) -> Unit)
Link copied to clipboard
fun onKeyReleased(combination: HandlerCombination, handler: (KeyEvent) -> Unit)
Link copied to clipboard
fun onKeyTyped(combination: HandlerCombination, handler: (KeyTypedEvent) -> Unit)
Link copied to clipboard
fun onMouseClicked(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onMouseDragged(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onMouseEntered(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onMouseExited(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onMouseMoved(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onMousePressed(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onMouseReleased(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onPopupTrigger(combination: HandlerCombination, handler: (MouseEvent) -> Unit)
Link copied to clipboard
fun onScrolled(combination: HandlerCombination, handler: (ScrollEvent) -> Unit)
Link copied to clipboard
fun order(): Int

The position of this dock relative to its siblings. -1 when the dock is not added to a harbour (i.e. when owner == null).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun <E : Event> removeEventFilter(eventType: EventType<E>, handler: EventHandler<E>)
Link copied to clipboard
fun <E : Event> removeEventHandler(eventType: EventType<E>, handler: EventHandler<E>)
Link copied to clipboard
fun requestFocus(useFocusTraversable: Boolean, showFocusBorder: Boolean)
Link copied to clipboard
open fun requestLayout()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun scrollTo(descendant: Node)
fun scrollTo()
Link copied to clipboard
fun selectFile(file: File)

Expands tree items, so that file is visible in the tree, and then selects it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun treeVisitor(filter: (Node) -> Boolean, action: (Node) -> Unit)