SaveFileLightBox
classin packageklyn.gui.windows.dialogs
public class SaveFileLightBox extends FileDialogLightBox:
└ SaveFileLightBox

Modal lightbox that selects a destination filename without writing it.

The lightbox provides the same filters, extension inference, and overwrite confirmation as SaveFileDialog.

chooser = SaveFileLightBox("Save report")
chooser.suggestedName = "report"
chooser.filters = [FileDialogFilter("JSON document", "*.json")]
chooser.accepted += lambda(event: ActionEvent): print(chooser.selectedFile)
window.centralWidget.add(chooser)
chooser.open()
Properties
Modifier and Type Member Description
public property confirmOverwrite
confirmOverwrite as Boolean = true
Whether an existing destination requires explicit confirmation.
public property defaultExtension
defaultExtension as String = ""
Explicit extension appended when the filename has none.
public property filterIndex
filterIndex as Int = 0
Zero-based filter selected when the lightbox opens and after acceptance.
public property filters
filters as IList<FileDialogFilter> = []
Available filename filters.
public readonly property selectedFile
selectedFile as FilePath:
Destination selected by the last accepted interaction, or null.
public property suggestedName
suggestedName as String = ""
Filename proposed when the lightbox opens.
Inherited Properties
propertyInherited Properties from FileDialogLightBox: initialFolder, title
propertyInherited Properties from LightBox: content, minPanelHeight, minPanelWidth, paddingX, paddingY, panelHeight, panelWidth
propertyInherited Properties from Container: autoRelayout, childCount, layout, padding
propertyInherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isPressed, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, width, window, x, y
Inherited Events
eventInherited Events from FileDialogLightBox: accepted, cancelled
eventInherited Events from Widget: focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public SaveFileLightBox
SaveFileLightBox(title as String = "Save file"):
Creates an inactive save-file lightbox.
Methods
Modifier and Type Member Description
public open
open() as Void:
Opens the lightbox over its containing window.
Inherited Methods
methodInherited Methods from FileDialogLightBox: close
methodInherited Methods from LightBox: close, paint, setActive, setBounds
methodInherited Methods from Container: add, applyLayout, attachWindow, children, clear, paintOverlay, remove, withLayout
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintOverlay, preferredSizeIncludesContentZoom, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget:, operator[](index as UInt) as Widget: