Class ParamDefaultsEditor.ParamDefaultsTable

java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTable
ucar.unidata.idv.ui.ParamDefaultsEditor.ParamDefaultsTable
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable
Enclosing class:
ParamDefaultsEditor

public class ParamDefaultsEditor.ParamDefaultsTable extends JTable
A JTable that holds a list of ParamInfo objects and provides display and editing capabilities
See Also:
  • Constructor Details

    • ParamDefaultsTable

      public ParamDefaultsTable(List infos, boolean editable)
      Create the table
      Parameters:
      infos - List of ParamInfo
      editable - Are the ParamInfos editable
  • Method Details

    • selectParamInfo

      public void selectParamInfo(ParamInfo info)
      Select the param info
      Parameters:
      info - info
    • getParamInfoList

      public List getParamInfoList()
      Return the list of ParamInfo-s held by this table
      Returns:
      List of param infos
    • getSelectedParamInfoList

      public List getSelectedParamInfoList()
      Get the list of selected param infos
      Returns:
      list of selected param infos
    • getInfo

      public ParamInfo getInfo(int row)
      Return the ParamInfo
      Parameters:
      row -
      Returns:
      The ParamInfo
    • editRow

      public boolean editRow(ParamInfo paramInfo)
      Edit the param info
      Parameters:
      paramInfo - param info to edit
      Returns:
      user pressed ok
    • editRow

      public boolean editRow(ParamInfo paramInfo, boolean removeOnCancel)
      Edit row
      Parameters:
      paramInfo - param info
      removeOnCancel - Should remove param info if user presses cancel_
      Returns:
      ok
    • viewColorTable

      protected void viewColorTable(int row)
      Show the colortable in the color table editor for the given row
      Parameters:
      row - The given row
    • errorMsg

      protected void errorMsg(String msg)
      Helper to show an error message
      Parameters:
      msg - The message
    • getToolTipText

      public String getToolTipText(MouseEvent event)
      Tool tip for the table
      Overrides:
      getToolTipText in class JTable
      Parameters:
      event - The event
      Returns:
      The tooltip text
    • findByName

      public ParamInfo findByName(String name)
      Find the ParamInfo from the name
      Parameters:
      name - name
      Returns:
      param info
    • add

      public void add(ParamInfo i)
      Add the ParamInfo into the table
      Parameters:
      i -
    • addBeginning

      public void addBeginning(ParamInfo i)
      Add the ParamInfo into the table
      Parameters:
      i -
    • addNewRow

      public void addNewRow()
      Add a new row
    • removeRow

      protected void removeRow(int row)
      Remove the given row
      Parameters:
      row - The given row
    • makeCTMenuItems

      public ArrayList makeCTMenuItems(int row)
      Make the color table menu items
      Parameters:
      row - The given row
      Returns:
      List of menu items
    • tableChanged

      public void tableChanged()
      Table changed
    • getColorTableFromName

      protected ColorTable getColorTableFromName(String name)
      Map the name of the color table to the ColorTable
      Parameters:
      name - Name of the color table
      Returns:
      The ColorTable