Mastering Java 11
上QQ阅读APP看书,第一时间看更新

Implications for Java 9, 10, and 11

Prior to Java 9, JavaFX controls and CSS functionality were only available to developers by interfacing with internal APIs. Java 9's modularization has made the internal APIs inaccessible. Therefore, JEP 253 was created to define public, instead of internal, APIs. 

This was a larger undertaking than it might seem. Here are a few actions that were taken as part of this JEP:

  • Moving JavaFX control skins from the internal to public API (javafx.scene.skin)
  • Ensuring API consistencies
  • Generation of a thorough javadoc

The following classes were moved from internal packages to a public javafx.scene.control.skin package:

    
AccordionSkin           ButtonBarSkin           ButtonSkin           CellSkinBase
CheckBoxSkin           ChoiceBoxSkin           ColorPickerSkin           ComboBoxBaseSkin
ComboBoxListViewSkin           ComboBoxPopupControl           ContextMenuSkin           DateCellSkin
DatePickerSkin           HpyerLinkSkin           LabelSkin           LabeledSkinBase
ListCellSkin           ListViewSkin           MenuBarSkin           MenuButtonSkin
MenuButtonSkinBase           NestedTableColumnHeader           PaginationSkin           ProgressBarSkin
ProgressIndicatorSkin           RadioButtonSkin           ScrollBarSkin           ScrollPanelSkin
SeparatorSkin           SliderSkin           SpinnerSkin           SplitMenuButtonSkin
SplitPaneSkin           TabPaneSkin           TableCellSkin           TableCellSkinBase
TableColumnHeader           TableHeaderRow           TableHeaderSkin           TabelRowSkinBase
TableViewSkin           TableViewSkinBase           TextAreaSkin           TextFieldSkin
TextInputControlSkin           TitledPaneSkin           ToggleButtonSkin           ToolBarSkin
TooltipSkin           TreeCellSkin           TreeTableCellSkin           TreeTableRowSkin
TreeTableViewSkin           TreeViewSkin           VirtualContainerBase           VirtualFlow

 

The public javafx.css package now has the following additional classes:

  • CascadingStyle.java:public class CascadingStyle implements Comparable<CascadingStyle>
  • CompoundSelector.java:final public class CompoundSelector extends Selector
  • CssError.java:public class CssError
  • Declaration.java:final public class Declaration
  • Rule.java:final public class Rule
  • Selector.java:abstract public class Selector
  • SimpleSelector.java:final public class SimpleSelector extends Selector
  • Size.java:final public class Size
  • Style.java:final public class Style
  • Stylesheet.java:public class Stylesheet
  • CssParser.java:final public class CssParser