Class AbstractImageComponent

All Implemented Interfaces:
com.globalmentor.beans.PropertyBindable, com.globalmentor.beans.PropertyConstrainable, Component, ImageComponent, Displayable, ImageModel, InfoModel, LabelModel, Model, PresentationModel, DepictedObject
Direct Known Subclasses:
Image, ImageActionControl, Picture

public abstract class AbstractImageComponent extends AbstractComponent implements ImageComponent
An abstract implementation of an image component. This component installs a default export strategy supporting export of the following content types:
  • text/uri-list
  • The label content type.
Author:
Garret Wilson
  • Field Details

    • DEFAULT_EXPORT_STRATEGY

      protected static final ExportStrategy<ImageComponent> DEFAULT_EXPORT_STRATEGY
      The default export strategy for this component type.
  • Constructor Details

    • AbstractImageComponent

      public AbstractImageComponent(InfoModel infoModel, ImageModel imageModel)
      Info model and image model constructor.
      Parameters:
      infoModel - The component info model.
      imageModel - The component image model.
      Throws:
      NullPointerException - if the given info model and/or iamge model is null.
  • Method Details

    • getImageModel

      protected ImageModel getImageModel()
      Returns:
      The image model used by this component.
    • getImageURI

      public URI getImageURI()
      Specified by:
      getImageURI in interface ImageModel
      Returns:
      The image URI, which may be a resource URI, or null if there is no image URI.
    • setImageURI

      public void setImageURI(URI newImageURI)
      Description copied from interface: ImageModel
      Sets the URI of the image. This is a bound property.
      Specified by:
      setImageURI in interface ImageModel
      Parameters:
      newImageURI - The new URI of the image, which may be a resource URI.
      See Also: