Class AbstractViewPanel<V extends ResourceView>

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
uno.anahata.asi.swing.agi.resources.view.AbstractViewPanel<V>
Type Parameters:
V - The view type this panel renders.
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
MediaViewPanel, TextViewPanel

public abstract class AbstractViewPanel<V extends ResourceView> extends JPanel
Common base for view-specific metadata panels.

This class provides the standard sectored layout for semantic interpreter metadata. It is managed by the Resource2Panel which authoritatively swaps these panels based on the resource type.

Author:
anahata
See Also:
  • Field Details

    • agiPanel

      protected final AgiPanel agiPanel
      The parent AgiPanel providing session context.
    • view

      protected V extends ResourceView view
      The current view being displayed.
    • gbc

      protected final GridBagConstraints gbc
      The layout constraints for property labels/fields.
  • Constructor Details

    • AbstractViewPanel

      protected AbstractViewPanel(AgiPanel agiPanel)
      Constructs a new view panel with a standard GridBag layout.
      Parameters:
      agiPanel - The parent session panel.
  • Method Details

    • setView

      public final void setView(V view)
      Sets the view to display and triggers a UI refresh.
      Parameters:
      view - The view instance.
    • addProperty

      protected void addProperty(String label, Component component)
      Helper to add a labelled property to the grid.
      Parameters:
      label - The property label.
      component - The value component.
    • refresh

      public abstract void refresh()
      Refreshes the UI components with the current view's metadata.

      Access Authority: This method is public to allow the Resource2Panel to trigger refreshes when the underlying resource state changes.