站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

ImageWidget (Visual Library API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.visual 2.2

org.netbeans.api.visual.widget
Class ImageWidget

java.lang.Object
  extended by org.netbeans.api.visual.widget.Widget
      extended by org.netbeans.api.visual.widget.ImageWidget

public class ImageWidget
extends Widget

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
ImageWidget(Scene scene)
          Creates an image widget.
ImageWidget(Scene scene, Image image)
          Creates an image widget.
 
Method Summary
protected  Rectangle calculateClientArea()
          Calculates a client area of the image
 Image getImage()
          Returns an image.
 boolean isPaintAsDisabled()
          Returns whether the label is painted as disabled.
protected  void paintWidget()
          Paints the image widget.
 void setImage(Image image)
          Sets an image
 void 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, getFont, getForeground, getGraphics, getLayout, getLocation, getLookup, getMaximumSize, getMinimumSize, getParentWidget, getPreferredBounds, getPreferredLocation, getPreferredSize, getScene, getState, getToolTipText, hashCode, isCheckClipping, isEnabled, isHitAt, isOpaque, isPreferredBoundsSet, isRepaintRequiredForRevalidating, isValidated, isVisible, notifyAdded, notifyRemoved, notifyStateChanged, paint, paintBackground, paintBorder, paintChildren, 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageWidget

public ImageWidget(Scene scene)
Creates an image widget.

Parameters:
scene - the scene

ImageWidget

public ImageWidget(Scene scene,
                   Image image)
Creates an image widget.

Parameters:
scene - the scene
image - the image
Method Detail

getImage

public Image getImage()
Returns an image.

Returns:
the image

setImage

public void setImage(Image image)
Sets an image

Parameters:
image - the image

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

protected Rectangle calculateClientArea()
Calculates a client area of the image

Overrides:
calculateClientArea in class Widget
Returns:
the calculated client area

paintWidget

protected void paintWidget()
Paints the image widget.

Overrides:
paintWidget in class Widget

org.netbeans.api.visual 2.2

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.