Class ScrollWidget

java.lang.Object
org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.ScrollWidget
All Implemented Interfaces:
Accessible, org.openide.util.Lookup.Provider

public class ScrollWidget extends Widget
This a scroll widget similar to JScrollPane. A scrolled widget is could be manipulated with getView and setView methods. The scroll-bars are automatically visible when the scrolled widget is bigger than the widget.
  • Constructor Details

    • ScrollWidget

      public ScrollWidget(Scene scene)
      Creates a scroll widget.
      Parameters:
      scene -
    • ScrollWidget

      public ScrollWidget(Scene scene, Widget view)
      Creates a scroll widget.
      Parameters:
      scene - the scene
      view - the scrolled view
  • Method Details

    • getView

      public final Widget getView()
      Returns an inner widget.
      Returns:
      the inner widget
    • setView

      public final void setView(Widget view)
      Sets an scrolled widget.
      Parameters:
      view - the scrolled widget
    • calculateClientArea

      protected Rectangle calculateClientArea()
      Calculates a client area as from the scroll widget preferred bounds.
      Overrides:
      calculateClientArea in class Widget
      Returns:
      the calculated client area