Class LevelOfDetailsWidget

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

public class LevelOfDetailsWidget extends Widget
This is a widget with a level-of-details feature. The visibility of children is based on the zoom factor of a scene.

For < hardMinimalZoom and > hardMaximalZoom the children are not painted.
For < softMinimalZoom and > sortMaximalZoom the children are partially painted using alpha-blending.
Between softMinimalZoom and softMaximalZoom the children are painted normally.

  • Constructor Details

    • LevelOfDetailsWidget

      public LevelOfDetailsWidget(Scene scene, double hardMinimalZoom, double softMinimalZoom, double softMaximalZoom, double hardMaximalZoom)
      Creates a level-of-details widget.
      Parameters:
      scene - the scene
      hardMinimalZoom - the hard minimal zoom factor
      softMinimalZoom - the sort minimal zoom factor
      softMaximalZoom - the sort maximal zoom factor
      hardMaximalZoom - the hard maximal zoom factor
  • Method Details

    • paintChildren

      public void paintChildren()
      Paints children based on the zoom factor.
      Overrides:
      paintChildren in class Widget
    • isHitAt

      public boolean isHitAt(Point localLocation)
      Checks whether a specified local location is a part of a widget based on the zoom factor.
      Overrides:
      isHitAt in class Widget
      Parameters:
      localLocation - the local location
      Returns:
      true, it it is