Class ColorTableWidget

java.lang.Object
ucar.unidata.idv.control.ControlWidget
ucar.unidata.idv.control.ColorTableWidget
All Implemented Interfaces:
ActionListener, PropertyChangeListener, EventListener, RangeWidget, Removable

public class ColorTableWidget extends ControlWidget implements PropertyChangeListener, RangeWidget, Removable
A ControlWidget for the color table information in the control window
Version:
$Revision: 1.105 $
Author:
Jeff McWhirter
  • Constructor Details

  • Method Details

    • doRemove

      public void doRemove()
      Called to remove this from the display.
      Specified by:
      doRemove in interface Removable
      Overrides:
      doRemove in class ControlWidget
    • getLegendPanel

      public JComponent getLegendPanel(int legendType)
      Get the component for the legend panel.
      Parameters:
      legendType - type of legend
      Returns:
      component for legend panel
      See Also:
    • setRangeFromPopup

      public void setRangeFromPopup(String cmd)
      Set the range in the dialog
      Parameters:
      cmd - Which one
    • setRangeDialog

      public void setRangeDialog(Range r)
      Set the value in the min max fields in the range dialog
      Specified by:
      setRangeDialog in interface RangeWidget
      Parameters:
      r - The range
    • rangePopup

      public void rangePopup()
      Show the change range dialog
    • showChangeRangeDialog

      public void showChangeRangeDialog()
      Change the range
    • doEdit

      public void doEdit()
      Called to edit color table
    • propertyChange

      public void propertyChange(PropertyChangeEvent e)
      Public implemenation for property changes
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      e - event for property change.
    • showMenu

      public void showMenu(Component from)
      Show menu anchored at the component location
      Parameters:
      from - component for anchoring
    • makeMenu

      public JMenu makeMenu()
      Make the menu for the color table.
      Returns:
      menu of menu items.
      See Also:
    • doUseDefault

      public void doUseDefault()
      use the default colortable
    • setTransparency

      public void setTransparency(Integer v)
      Set the transparency
      Parameters:
      v - Integer, 0-100, of the inverse transparency
    • makeMenuItems

      public ArrayList makeMenuItems()
      Make the menu items for the widget.
      Returns:
      the list of menus
    • revertToDefaultRange

      protected void revertToDefaultRange()
      Revert to the default range of the color table (control dependent)
    • getRange

      public Range getRange()
      Get the range for the data
      Returns:
      the range
    • setRange

      public void setRange(Range r)
      Set the range for the color table.
      Parameters:
      r - range of table
    • setColorPalette

      public void setColorPalette(float[][] palette) throws RemoteException, VisADException
      Set the color palette on the previews.
      Parameters:
      palette - new palette
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • setColorTable

      public void setColorTable(ColorTable colorTable) throws RemoteException, VisADException
      Set the color table.
      Parameters:
      colorTable - new color table
      Throws:
      RemoteException - Java RMI error
      VisADException - VisAD error
    • getColorTable

      public ColorTable getColorTable()
      Get the color table.
      Returns:
      the color table
    • fillList

      public void fillList(List l, int columns)
      Fill the list of components and set them in a certain number of columns.
      Overrides:
      fillList in class ControlWidget
      Parameters:
      l - List of components
      columns - number of columns