Class ImageWidget
java.lang.Object
org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.ImageWidget
- All Implemented Interfaces:
Accessible
,org.openide.util.Lookup.Provider
A widget representing image. The origin of the widget is at its top-left corner.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.netbeans.api.visual.widget.Widget
Widget.Dependency
-
Constructor Summary
ConstructorsConstructorDescriptionImageWidget
(Scene scene) Creates an image widget.ImageWidget
(Scene scene, Image image) Creates an image widget. -
Method Summary
Modifier and TypeMethodDescriptionprotected Rectangle
Calculates a client area of the imagegetImage()
Returns an image.boolean
Returns whether the label is painted as disabled.protected void
Paints the image widget.void
Sets an imagevoid
setPaintAsDisabled
(boolean paintAsDisabled) Sets whether the label is painted as disabled.Methods inherited from class org.netbeans.api.visual.widget.Widget
addChild, addChild, addChild, addChild, addChildren, addDependency, bringToBack, bringToFront, 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, isHitAt, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyBackgroundChanged, notifyFontChanged, notifyForegroundChanged, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintChildren, 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
-
ImageWidget
-
ImageWidget
-
-
Method Details
-
getImage
-
setImage
-
isPaintAsDisabled
public boolean isPaintAsDisabled()Returns whether the label is painted as disabled.- Returns:
- true, if the label is painted as disabled
-
setPaintAsDisabled
public void setPaintAsDisabled(boolean paintAsDisabled) Sets whether the label is painted as disabled.- Parameters:
paintAsDisabled
- if true, then the label is painted as disabled
-
calculateClientArea
Calculates a client area of the image- Overrides:
calculateClientArea
in classWidget
- Returns:
- the calculated client area
-
paintWidget
-