# Class MetadataSummary

Object
Widget
MetadataSummary

All Implemented Interfaces:
  `Localized`

@DefaultProperty("metadata") public class MetadataSummary extends Widget
A panel showing a summary of metadata.

Since:
  1.1

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final ObjectProperty<Metadata>`
  `metadataProperty`
  The metadata shown in this pane.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MetadataSummary()`
  Creates an initially empty metadata overview.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final Locale`
  `getLocale()`
  Returns the locale used by this widget for controls and messages.
  `final Metadata`
  `getMetadata()`
  Returns the metadata currently shown, or `null` if none.
  `final Region`
  `getView()`
  Returns the region containing the visual components managed by this `MetadataSummary`.
  `final void`
  `setError(Throwable exception)`
  Clears the metadata panel and write instead an exception report.
  `void`
  `setMetadata(Resource resource)`
  Fetches the metadata in a background thread and delegates to `setMetadata(Metadata)` when ready.
  `final void`
  `setMetadata(Metadata metadata)`
  Sets the content of this pane to the given metadata.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### metadataProperty

    public final ObjectProperty<Metadata> metadataProperty
    The metadata shown in this pane.
    See Also:
      - `getMetadata()`
      - `setMetadata(Metadata)`
      - `setMetadata(Resource)`

- ## Constructor Details

  - ### MetadataSummary

    public MetadataSummary()
    Creates an initially empty metadata overview.

- ## Method Details

  - ### getView

    public final Region getView()
    Returns the region containing the visual components managed by this `MetadataSummary`. The subclass is implementation dependent and may change in any future version.
    Specified by:
      `getView` in class `Widget`
    Returns:
      the region to show.

  - ### setMetadata

    public void setMetadata(Resource resource)
    Fetches the metadata in a background thread and delegates to `setMetadata(Metadata)` when ready.
    Parameters:
      `resource` - the resource for which to show metadata, or `null`.

  - ### setMetadata

    public final void setMetadata(Metadata metadata)
    Sets the content of this pane to the given metadata. This is a convenience method for setting `metadataProperty` value.
    Parameters:
      `metadata` - the metadata to show, or `null`.
    See Also:
      - `metadataProperty`
      - `setMetadata(Resource)`

  - ### getMetadata

    public final Metadata getMetadata()
    Returns the metadata currently shown, or `null` if none. This is a convenience method for fetching `metadataProperty` value.
    Returns:
      the metadata currently shown, or `null` if none.
    See Also:
      - `metadataProperty`
      - `setMetadata(Metadata)`

  - ### setError

    public final void setError(Throwable exception)
    Clears the metadata panel and write instead an exception report.
    Parameters:
      `exception` - the exception that occurred.

  - ### getLocale

    public final Locale getLocale()
    Returns the locale used by this widget for controls and messages.
    Specified by:
      `getLocale` in interface `Localized`
    Overrides:
      `getLocale` in class `Widget`
    Returns:
      the locale for controls in this widget.