MonthPanel

open class MonthPanel(date: LocalDate, val itemVisualizer: ItemVisualizer<LocalDate, MonthPanel>? = null, selectionModel: SelectionModel<LocalDate>? = null, weekStart: DayOfWeek = SUNDAY) : View, Selectable<LocalDate> (source)

A panel that displays the days of a month in a particular year.

Parameters

date

whose month will be displayed

itemVisualizer

that maps LocalDate to View for each item in the panel. The default simply uses a Label to show each day's number.

selectionModel

that manages the panel's selection state

weekStart

indicates which day should be used as the start of the week

Constructors

Link copied to clipboard
constructor(date: LocalDate, itemVisualizer: ItemVisualizer<LocalDate, MonthPanel>? = null, selectionModel: SelectionModel<LocalDate>? = null, weekStart: DayOfWeek = SUNDAY)

Properties

Link copied to clipboard

Behavior used to render the panel itself.

Link copied to clipboard

Defines how the View representing each day should be aligned within its cell. The default is to have the View fill the cell.

Link copied to clipboard

The last date in the panel (i.e. the final day of the month shown)

Link copied to clipboard
open override val firstSelectable: LocalDate
Link copied to clipboard
open override val firstSelection: LocalDate?
Link copied to clipboard
Link copied to clipboard
open override val lastSelectable: LocalDate
Link copied to clipboard
open override val lastSelection: LocalDate?
Link copied to clipboard

Notifies of changes to the month the panel shows

Link copied to clipboard
open override val selection: Set<LocalDate>
Link copied to clipboard
open override val selectionAnchor: LocalDate?
Link copied to clipboard

Notifies of changes to the panel's selection.

Link copied to clipboard

Indicates whether days from the previous and subsequent months are displayed by the panel.

Link copied to clipboard

Indicates whether the month should always show 6 rows. This will avoid cases where months in a calendar have different row counts and therefore aren't aligned uniformly.

Link copied to clipboard

The first date in the panel (i.e. day 1 of the month shown).

Link copied to clipboard

Indicates which day should be used as the start of the week.

Inherited properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override var bounds: Rectangle
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open val children: ObservableList<View>
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
val displayChange: BooleanObservers
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val displayRectHandlingChanged: BooleanObservers
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val enabledChanged: BooleanObservers
Link copied to clipboard
Link copied to clipboard
val focusabilityChanged: BooleanObservers
Link copied to clipboard
open var focusable: Boolean
Link copied to clipboard
val focusChanged: BooleanObservers
Link copied to clipboard
protected val focusCycleRoot: View?
Link copied to clipboard
Link copied to clipboard
var font: Font?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override var height: Double
Link copied to clipboard
override var idealSize: Size?
Link copied to clipboard
protected open var insets: Insets
Link copied to clipboard
protected open var isFocusCycleRoot: Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected open var layout: Layout?
Link copied to clipboard
override var minimumSize: Size
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: View?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
override var position: Point
Link copied to clipboard
Link copied to clipboard
override var size: Size
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val visibilityChanged: BooleanObservers
Link copied to clipboard
override var visible: Boolean
Link copied to clipboard
override var width: Double
Link copied to clipboard
override var x: Double
Link copied to clipboard
override var y: Double
Link copied to clipboard
var zOrder: Int

Functions

Link copied to clipboard
protected open override fun addedToDisplay()
Link copied to clipboard
open override fun addSelection(items: Set<LocalDate>)
Link copied to clipboard
open override fun clearSelection()
Link copied to clipboard
open override fun next(after: LocalDate): LocalDate?
Link copied to clipboard
open override fun previous(before: LocalDate): LocalDate?
Link copied to clipboard
protected open override fun removedFromDisplay()
Link copied to clipboard
open override fun removeSelection(items: Set<LocalDate>)
Link copied to clipboard
open override fun render(canvas: Canvas)
Link copied to clipboard
fun scrollTo(day: Int)

Scrolls to the given day of the month @see LocalDate.dayOfMonth if the MonthPanel is within a ScrollPanel.

Link copied to clipboard

Scrolls the last selected item into view if the MonthPanel is within a ScrollPanel.

Link copied to clipboard
open override fun selectAll()
Link copied to clipboard
open override fun selected(item: LocalDate): Boolean
Link copied to clipboard
fun setDate(date: LocalDate)

Sets the date the panel uses to display the month.

Link copied to clipboard
open override fun setSelection(items: Set<LocalDate>)
Link copied to clipboard
open override fun toggleSelection(items: Set<LocalDate>)
Link copied to clipboard
protected fun update()

Inherited functions

Link copied to clipboard
protected open infix fun ancestorOf(view: View): Boolean
Link copied to clipboard
protected open fun child(at: Point): View?
Link copied to clipboard
protected operator fun contains(child: View): Boolean
open operator override fun contains(point: Point): Boolean
Link copied to clipboard
protected fun contentDirectionChanged()
Link copied to clipboard
protected fun cursorChanged(old: Cursor?, new: Cursor?)
Link copied to clipboard
protected open fun doLayout()
Link copied to clipboard
protected fun enabledChanged(old: Boolean, new: Boolean, filter: (View) -> Boolean)
Link copied to clipboard
protected open fun filterKeyEvent(event: KeyEvent)
Link copied to clipboard
protected open fun filterPointerEvent(event: PointerEvent)
Link copied to clipboard
protected open fun filterPointerMotionEvent(event: PointerEvent)
Link copied to clipboard
fun fromAbsolute(point: Point): Point
Link copied to clipboard
operator fun get(traversalType: FocusTraversalPolicy.TraversalType): Set<KeyState>?
Link copied to clipboard
protected open fun handleDisplayRectEvent(old: Rectangle, new: Rectangle)
Link copied to clipboard
protected open fun handleKeyEvent(event: KeyEvent)
Link copied to clipboard
protected open fun handlePointerEvent(event: PointerEvent)
Link copied to clipboard
protected open fun handlePointerMotionEvent(event: PointerEvent)
Link copied to clipboard
open infix fun intersects(point: Point): Boolean
Link copied to clipboard
protected open fun relayout()
Link copied to clipboard
fun rerender()
Link copied to clipboard
Link copied to clipboard
protected fun revalidate()
Link copied to clipboard
operator fun set(traversalType: FocusTraversalPolicy.TraversalType, keyStates: Set<KeyState>?)
Link copied to clipboard
protected open fun shouldHandlePointerEvent(event: PointerEvent): Boolean
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
protected fun styleChanged(filter: (View) -> Boolean)
Link copied to clipboard
fun toAbsolute(point: Point): Point
Link copied to clipboard
fun toLocal(point: Point, from: View?): Point
Link copied to clipboard
Link copied to clipboard
fun toParent(point: Point): Point