Class IconNodeWidget

java.lang.Object
org.netbeans.api.visual.widget.Widget
org.netbeans.api.visual.widget.general.IconNodeWidget
All Implemented Interfaces:
Accessible, org.openide.util.Lookup.Provider

public class IconNodeWidget extends Widget
This class represents a general icon node widget which is rendered as a image and a label placed to the right or bottom from the image. By default uses vertical/horizontal flow layout.
  • Constructor Details

    • IconNodeWidget

      public IconNodeWidget(Scene scene)
      Creates an icon node widget with bottom-center orientation.
      Parameters:
      scene - the scene
    • IconNodeWidget

      public IconNodeWidget(Scene scene, IconNodeWidget.TextOrientation orientation)
      Creates an icon node widget with a specified orientation.
      Parameters:
      scene - the scene
      orientation - the text orientation
  • Method Details

    • notifyStateChanged

      public void notifyStateChanged(ObjectState previousState, ObjectState state)
      Implements the widget-state specific look of the widget.
      Overrides:
      notifyStateChanged in class Widget
      Parameters:
      previousState - the previous state
      state - the new state
    • setImage

      public final void setImage(Image image)
      Sets an image.
      Parameters:
      image - the image
    • setLabel

      public final void setLabel(String label)
      Sets a label.
      Parameters:
      label - the label
    • getImageWidget

      public final ImageWidget getImageWidget()
      Returns the image widget part of the icon node widget.
      Returns:
      the image widget
    • getLabelWidget

      public final LabelWidget getLabelWidget()
      Returns the label widget part of the icon node widget.
      Returns:
      the label widget