Top Description Fields Constructors Methods
com.calendarfx.view

public abstract Class CalendarFXControl

extends Control
Class Inheritance
Known Direct Subclasses
com.calendarfx.view.CalendarHeaderView, com.calendarfx.view.CalendarSelector, com.calendarfx.view.DateControl, com.calendarfx.view.DeveloperConsole, com.calendarfx.view.EntryViewBase, com.calendarfx.view.RecurrenceView, com.calendarfx.view.SearchResultView, com.calendarfx.view.SourceGridView, com.calendarfx.view.SourceView, com.calendarfx.view.TimeField, com.calendarfx.view.WeekFieldsView, com.calendarfx.view.print.PreviewPane, com.calendarfx.view.print.SettingsView, com.calendarfx.view.print.ViewTypeControl, com.calendarfx.view.print.ZoomPane, com.calendarfx.view.ButtonBar
Imports
javafx.collections.FXCollections, .ObservableList, javafx.scene.control.Control, org.controlsfx.control.PropertySheet, .PropertySheet.Item

Common superclass for all controls in the calendar framework.

Field Summary

Modifier and TypeField and Description
private static String

Constructor Summary

AccessConstructor and Description
protected
CalendarFXControl()

Constructs a new control.

Method Summary

Modifier and TypeMethod and Description
public ObservableList<PropertySheet.Item>

Returns:

the property sheet items
getPropertySheetItems
()

Returns a list of property items that can be shown by the PropertySheet of ControlsFX.

public final 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.

Inherited from javafx.scene.control.Control:
computeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthcontextMenuPropertycreateDefaultSkinexecuteAccessibleActiongetBaselineOffsetgetClassCssMetaDatagetContextMenugetControlCssMetaDatagetCssMetaDatagetInitialFocusTraversablegetSkingetTooltipisResizablelayoutChildrenqueryAccessibleAttributesetContextMenusetSkinsetTooltipskinPropertytooltipProperty

Field Detail

stylesheetback to summary
private static String stylesheet

Constructor Detail

CalendarFXControlback to summary
protected CalendarFXControl()

Constructs a new control.

Method Detail

getPropertySheetItemsback to summary
public ObservableList<PropertySheet.Item> getPropertySheetItems()

Returns a list of property items that can be shown by the PropertySheet of ControlsFX.

Returns:ObservableList<PropertySheet.Item>

the property sheet items

getUserAgentStylesheetback to summary
public final 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.
Returns:String

A string URL

Annotations
@Override