Top Fields Constructors Methods
com.dlsc.gemsfx

public Class YearMonthView

extends Control
Class Inheritance
Imports
com.dlsc.gemsfx.skins.YearMonthViewSkin, javafx.beans.property.BooleanProperty, .ObjectProperty, .SimpleBooleanProperty, .SimpleObjectProperty, javafx.scene.control.Control, .Skin, javafx.util.StringConverter, java.time.Month, .YearMonth, java.time.format.TextStyle, java.util.Locale, .Objects

Field Summary

Modifier and TypeField and Description
private final ObjectProperty<StringConverter<Month>>
private final ObjectProperty<YearMonth>
private final ObjectProperty<YearMonth>
private final BooleanProperty
private final ObjectProperty<YearMonth>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final ObjectProperty<StringConverter<Month>>
protected Skin<?>
createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control.

public final ObjectProperty<YearMonth>

Returns:

the earliest selectable month
earliestMonthProperty
()

Determines the earliest month that the user can select in the view.

public final StringConverter<Month>
public final YearMonth
public final YearMonth
public String
getUserAgentStylesheet()

Overrides javafx.scene.layout.Region.getUserAgentStylesheet.

An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method.

public final YearMonth
public final boolean
public final ObjectProperty<YearMonth>

Returns:

the latest selectable month
latestMonthProperty
()

Determines the latest month that the user can select in the view.

public final void
public final void
setEarliestMonth(YearMonth earliestMonth)

public final void
public final void
setShowYear(boolean showYear)

public final void
public final BooleanProperty

Returns:

true if the year will be shown
showYearProperty
()

Determines if the view willl display the current year at the top or not.

public final ObjectProperty<YearMonth>
Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertyexecuteAccessibleActiongetBaselineOffsetgetClassCssMetaDatagetContextMenugetControlCssMetaDatagetCssMetaDatagetInitialFocusTraversablegetSkingetTooltipisResizablelayoutChildrenqueryAccessibleAttributesetContextMenusetSkinsetTooltipskinPropertytooltipProperty

Field Detail

converterback to summary
private final ObjectProperty<StringConverter<Month>> converter
earliestMonthback to summary
private final ObjectProperty<YearMonth> earliestMonth
latestMonthback to summary
private final ObjectProperty<YearMonth> latestMonth
showYearback to summary
private final BooleanProperty showYear
valueback to summary
private final ObjectProperty<YearMonth> value

Constructor Detail

YearMonthViewback to summary
public YearMonthView()

Method Detail

converterPropertyback to summary
public final ObjectProperty<StringConverter<Month>> converterProperty()
createDefaultSkinback to summary
protected Skin<?> createDefaultSkin()

Overrides javafx.scene.control.Control.createDefaultSkin.

Doc from javafx.scene.control.Control.createDefaultSkin.

Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).

Annotations
@Override
earliestMonthPropertyback to summary
public final ObjectProperty<YearMonth> earliestMonthProperty()

Determines the earliest month that the user can select in the view.

Returns:ObjectProperty<YearMonth>

the earliest selectable month

getConverterback to summary
public final StringConverter<Month> getConverter()
getEarliestMonthback to summary
public final YearMonth getEarliestMonth()
getLatestMonthback to summary
public final YearMonth getLatestMonth()
getUserAgentStylesheetback to summary
public String getUserAgentStylesheet()

Overrides javafx.scene.layout.Region.getUserAgentStylesheet.

Doc from javafx.scene.layout.Region.getUserAgentStylesheet.

An implementation may specify its own user-agent styles for this Region, and its children, by overriding this method. These styles are used in addition to whatever user-agent stylesheets are in use. This provides a mechanism for third parties to introduce styles for custom controls.

The URL is a hierarchical URI of the form [scheme:][//authority][path]. If the URL does not have a [scheme:] component, the URL is considered to be the [path] component only. Any leading '/' character of the [path] is ignored and the [path] is treated as a path relative to the root of the application's classpath.

Subclasses overriding this method should not assume any particular implementation approach as to the number and frequency with which it is called. For this reason, attempting any kind of dynamic implementation (i.e. returning different user agent stylesheet values) based on some state change is highly discouraged, as there is no guarantee when, or even if, this method will be called. Some JavaFX CSS implementations may choose to cache this response for an indefinite period of time, and therefore there should be no expectation around when this method is called.



package com.example.javafx.app;

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MyApp extends Application {

    @Override public void start(Stage stage) {
        Scene scene = new Scene(new Group());
        scene.getStylesheets().add("/com/example/javafx/app/mystyles.css");
        stage.setScene(scene);
        stage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}
For additional information about using CSS with the scene graph, see the CSS Reference Guide.
Annotations
@Override
getValueback to summary
public final YearMonth getValue()
isShowYearback to summary
public final boolean isShowYear()
latestMonthPropertyback to summary
public final ObjectProperty<YearMonth> latestMonthProperty()

Determines the latest month that the user can select in the view.

Returns:ObjectProperty<YearMonth>

the latest selectable month

setConverterback to summary
public final void setConverter(StringConverter<Month> converter)
setEarliestMonthback to summary
public final void setEarliestMonth(YearMonth earliestMonth)
setLatestMonthback to summary
public final void setLatestMonth(YearMonth latestMonth)
setShowYearback to summary
public final void setShowYear(boolean showYear)
setValueback to summary
public final void setValue(YearMonth value)
showYearPropertyback to summary
public final BooleanProperty showYearProperty()

Determines if the view willl display the current year at the top or not. When this control is used standalone, then showing the year is usually necessary. If the control is part of a more complex control like the CalendarView then showing the year might not be needed as it becomes obvious from the overall context.

Returns:BooleanProperty

true if the year will be shown

valuePropertyback to summary
public final ObjectProperty<YearMonth> valueProperty()