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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
Widget.Dependency
-
Constructor Summary
ConstructorsConstructorDescriptionLevelOfDetailsWidget
(Scene scene, double hardMinimalZoom, double softMinimalZoom, double softMaximalZoom, double hardMaximalZoom) Creates a level-of-details widget. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether a specified local location is a part of a widget based on the zoom factor.void
Paints children based on the zoom factor.Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, calculateClientArea, convertLocalToScene, convertLocalToScene, convertSceneToLocal, convertSceneToLocal, createActions, equals, getAccessibleContext, getActions, getActions, getBackground, getBorder, getBounds, getChildConstraint, getChildren, getClientArea, getCursor, getCursorAt, getDependencies, getFont, getForeground, getGraphics, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getResourceTable, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyBackgroundChanged, notifyFontChanged, notifyForegroundChanged, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintWidget, removeChild, removeChildren, removeChildren, removeDependency, removeFromParent, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBackgroundFromResource, setBorder, setBorder, setCheckClipping, setChildConstraint, setCursor, setEnabled, setFont, setFontFromResource, setForeground, setForegroundFromResource, setLayout, setMaximumSize, setMinimumSize, setOpaque, setPreferredBounds, setPreferredLocation, setPreferredSize, setResourceTable, setState, setToolTipText, setVisible, updateResources
-
Constructor Details
-
LevelOfDetailsWidget
public LevelOfDetailsWidget(Scene scene, double hardMinimalZoom, double softMinimalZoom, double softMaximalZoom, double hardMaximalZoom) Creates a level-of-details widget.- Parameters:
scene
- the scenehardMinimalZoom
- the hard minimal zoom factorsoftMinimalZoom
- the sort minimal zoom factorsoftMaximalZoom
- the sort maximal zoom factorhardMaximalZoom
- the hard maximal zoom factor
-
-
Method Details
-
paintChildren
public void paintChildren()Paints children based on the zoom factor.- Overrides:
paintChildren
in classWidget
-
isHitAt
-