Class DatalinkPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class DatalinkPanel extends JPanel
Component that displays DataLink functionality of a table. It will display a LinksDoc, providing UI options for invoking the links that it defines.
Since:
6 Feb 2017
Author:
Mark Taylor
See Also:
  • Constructor Details

    • DatalinkPanel

      public DatalinkPanel(boolean canReplaceContents, boolean hasAutoInvoke)
      Constructor.
      Parameters:
      canReplaceContents - if true, a DataLink-type URL invocation will replace the DataLink contents of this panel with a new table; if false, such an invocation will open a new window
      hasAutoInvoke - true if URL panel should feature an auto-invoke button
  • Method Details

    • setLinksDoc

      public void setLinksDoc(uk.ac.starlink.vo.datalink.LinksDoc linksDoc)
      Sets the document to be displayed by this panel. The table in the supplied LinksDoc must be random access.
      Parameters:
      linksDoc - document to display
      Throws:
      IllegalArgumentException - if the supplied table is not random access
    • isAutoInvoke

      public boolean isAutoInvoke()
      Indicates whether this panel is currently set up for auto-invoke. If true, then selecting a row in the displayed links document will cause the link to be followed according to current settings without further manual user intervention.
      Returns:
      whether auto-invoke is in effect
    • getLinkRowPanel

      public LinkRowPanel getLinkRowPanel()
      Returns the panel displaying the datalink rows.
      Returns:
      link panel
    • configureJTable

      protected void configureJTable(JTable jtable, uk.ac.starlink.vo.datalink.LinksDoc linksDoc)
      Updates this panel's JTable using the contents of the supplied LinksDoc. This method is invoked by setLinksDoc(uk.ac.starlink.vo.datalink.LinksDoc) and simply sets JTable's model and column model appropriately, but it may be overridden by subclasses to supply modified behaviour.
      Parameters:
      jtable - this panel's JTable to be updated
      linksDoc - links document about to be displayed by this panel