Module javafx.controls
Package javafx.scene.control

## Interface Skin<C extends Skinnable>

- Type Parameters:
    `C` - A subtype of Skinnable that the Skin represents. This allows for Skin implementation to access the `Skinnable` implementation, which is usually a `Control` implementation.
  All Known Implementing Classes:
    `AccordionSkin`, `ButtonBarSkin`, `ButtonSkin`, `CellSkinBase`, `CheckBoxSkin`, `ChoiceBoxSkin`, `ColorPickerSkin`, `ComboBoxBaseSkin`, `ComboBoxListViewSkin`, `ComboBoxPopupControl`, `ContextMenuSkin`, `DateCellSkin`, `DatePickerSkin`, `HTMLEditorSkin`, `HyperlinkSkin`, `LabeledSkinBase`, `LabelSkin`, `ListCellSkin`, `ListViewSkin`, `MenuBarSkin`, `MenuButtonSkin`, `MenuButtonSkinBase`, `PaginationSkin`, `ProgressBarSkin`, `ProgressIndicatorSkin`, `RadioButtonSkin`, `ScrollBarSkin`, `ScrollPaneSkin`, `SeparatorSkin`, `SkinBase`, `SliderSkin`, `SpinnerSkin`, `SplitMenuButtonSkin`, `SplitPaneSkin`, `TableCellSkin`, `TableCellSkinBase`, `TableRowSkin`, `TableRowSkinBase`, `TableViewSkin`, `TableViewSkinBase`, `TabPaneSkin`, `TextAreaSkin`, `TextFieldSkin`, `TextInputControlSkin`, `TitledPaneSkin`, `ToggleButtonSkin`, `ToolBarSkin`, `TooltipSkin`, `TreeCellSkin`, `TreeTableCellSkin`, `TreeTableRowSkin`, `TreeTableViewSkin`, `TreeViewSkin`, `VirtualContainerBase`

      public interface Skin<C extends Skinnable>

  Base class for defining the visual representation of user interface controls by defining a scene graph of nodes to represent the skin. A user interface control is abstracted behind the `Skinnable` interface.
  Since:
    JavaFX 2.0

- - ### Method Summary

    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `dispose()` | Called by a Skinnable when the Skin is replaced on the Skinnable.
    `Node` | `getNode()` | Gets the Node which represents this Skin.
    `C` | `getSkinnable()` | Gets the Skinnable to which this Skin is assigned.

- - ### Method Detail

    - #### getSkinnable

          C getSkinnable()

      Gets the Skinnable to which this Skin is assigned. A Skin must be created for one and only one Skinnable. This value will only ever go from a non-null to null value when the Skin is removed from the Skinnable, and only as a consequence of a call to `dispose()`.

      The caller who constructs a Skinnable must also construct a Skin and properly establish the relationship between the Control and its Skin.

      Returns:
        A non-null Skinnable, or null value if disposed.

    - #### getNode

          Node getNode()

      Gets the Node which represents this Skin. This must never be null, except after a call to `dispose()`, and must never change except when changing to null.
      Returns:
        A non-null Node, except when the Skin has been disposed.

    - #### dispose

          void dispose()

      Called by a Skinnable when the Skin is replaced on the Skinnable. This method allows a Skin to implement any logic necessary to clean up itself after the Skin is no longer needed. It may be used to release native resources. The methods `getSkinnable()` and `getNode()` should return null following a call to dispose. Calling dispose twice has no effect.