Class SeparatorSkin

All Implemented Interfaces:

public class SeparatorSkin extends SkinBase<Separator>
Default skin implementation for the Separator control.
See Also:
  • Constructor Details

    • SeparatorSkin

      public SeparatorSkin(Separator control)
      Creates a new SeparatorSkin instance, installing the necessary child nodes into the Control children list.
      control - The control that this skin should be installed onto.
  • Method Details

    • layoutChildren

      protected void layoutChildren(double x, double y, double w, double h)
      We only need to deal with the single "line" child region. The important thing here is that we want a horizontal separator to have a line which is as wide as the separator (less the left/right padding), but as thin as it can be (based on its own pref height). The same idea for a vertical separator. It should be as tall as the separator (less the top and bottom padding) but as thin as can be (the pref width of the line).

      Then position the line within the separator such that the alignment properties are honored.

      layoutChildren in class SkinBase<Separator>
      x - the x position
      y - the y position
      w - the width
      h - the height