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

public class ImageWidget extends Widget
A widget representing image. The origin of the widget is at its top-left corner.
  • Constructor Details

    • 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 Details

    • 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