当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
LevelOfDetailsWidget (Visual Library API) - NetBeans API Javadoc (Current Development Version)
org.netbeans.api.visual.widget
Class LevelOfDetailsWidget
java.lang.Object
org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.LevelOfDetailsWidget
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 Summary |
LevelOfDetailsWidget(Scene scene,
double hardMinimalZoom,
double softMinimalZoom,
double softMaximalZoom,
double hardMaximalZoom)
Creates a level-of-details widget. |
Method Summary |
boolean |
isHitAt(Point localLocation)
Checks whether a specified local location is a part of a widget based on the zoom factor. |
void |
paintChildren()
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, getFont, getForeground, getGraphics, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintWidget, removeChild, removeChildren, removeChildren, removeDependency, removeFromParent, repaint, resolveBounds, revalidate, revalidate, setAccessibleContext, setBackground, setBorder, setBorder, setCheckClipping, setChildConstraint, setCursor, setEnabled, setFont, setForeground, setLayout, setMaximumSize, setMinimumSize, setOpaque, setPreferredBounds, setPreferredLocation, setPreferredSize, setState, setToolTipText, setVisible |
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
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