Package ucar.unidata.idv.control
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 Summary
ConstructorsConstructorDescriptionColorTableWidget(DisplayControlImpl theDisplayControl, ColorTableManager colorTableManager, ColorTable ct, Range r) Construct a ColorTableWidgetColorTableWidget(DisplayControlImpl theDisplayControl, ColorTable ct) Construct a ColorTableWidget -
Method Summary
Modifier and TypeMethodDescriptionvoiddoEdit()Called to edit color tablevoiddoRemove()Called to remove this from the display.voiduse the default colortablevoidFill the list of components and set them in a certain number of columns.Get the color table.getLegendPanel(int legendType) Get the component for the legend panel.getRange()Get the range for the datamakeMenu()Make the menu for the color table.Make the menu items for the widget.voidPublic implemenation for property changesvoidShow the change range dialogprotected voidRevert to the default range of the color table (control dependent)voidsetColorPalette(float[][] palette) Set the color palette on the previews.voidsetColorTable(ColorTable colorTable) Set the color table.voidSet the range for the color table.voidSet the value in the min max fields in the range dialogvoidsetRangeFromPopup(String cmd) Set the range in the dialogvoidSet the transparencyvoidChange the rangevoidShow menu anchored at the component locationMethods inherited from class ucar.unidata.idv.control.ControlWidget
actionPerformed, fillList, fillList, getDisplayControl, getDisplayConventions, logException, userMessage
-
Constructor Details
-
ColorTableWidget
public ColorTableWidget(DisplayControlImpl theDisplayControl, ColorTableManager colorTableManager, ColorTable ct, Range r) throws RemoteException, VisADException Construct a ColorTableWidget- Parameters:
theDisplayControl- the associated DisplayControlcolorTableManager- the color table managerct- the color tabler- range for the table- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
ColorTableWidget
public ColorTableWidget(DisplayControlImpl theDisplayControl, ColorTable ct) throws RemoteException, VisADException Construct a ColorTableWidget- Parameters:
theDisplayControl- the associated DisplayControlct- the color table- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
-
Method Details
-
doRemove
public void doRemove()Called to remove this from the display.- Specified by:
doRemovein interfaceRemovable- Overrides:
doRemovein classControlWidget
-
getLegendPanel
Get the component for the legend panel.- Parameters:
legendType- type of legend- Returns:
- component for legend panel
- See Also:
-
setRangeFromPopup
Set the range in the dialog- Parameters:
cmd- Which one
-
setRangeDialog
Set the value in the min max fields in the range dialog- Specified by:
setRangeDialogin interfaceRangeWidget- 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 implemenation for property changes- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
e- event for property change.
-
showMenu
Show menu anchored at the component location- Parameters:
from- component for anchoring
-
makeMenu
Make the menu for the color table.- Returns:
- menu of menu items.
- See Also:
-
doUseDefault
public void doUseDefault()use the default colortable -
setTransparency
Set the transparency- Parameters:
v- Integer, 0-100, of the inverse transparency
-
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
Get the range for the data- Returns:
- the range
-
setRange
Set the range for the color table.- Parameters:
r- range of table
-
setColorPalette
Set the color palette on the previews.- Parameters:
palette- new palette- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
setColorTable
Set the color table.- Parameters:
colorTable- new color table- Throws:
RemoteException- Java RMI errorVisADException- VisAD error
-
getColorTable
Get the color table.- Returns:
- the color table
-
fillList
Fill the list of components and set them in a certain number of columns.- Overrides:
fillListin classControlWidget- Parameters:
l- List of componentscolumns- number of columns
-