decodes.dupdcpgui.JEnumCellEditor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opendcs Show documentation
Show all versions of opendcs Show documentation
A collection of software for aggregatting and processing environmental data such as from NOAA GOES satellites.
The newest version!
package decodes.dupdcpgui;
import javax.swing.DefaultCellEditor;
import javax.swing.JComboBox;
/**
Used within a JTable for having a combo-box in a table cell.
The choices are presented to the user when the cell is clicked.
*/
public class JEnumCellEditor extends DefaultCellEditor
{
/**
Constructor.
param choices[]
*/
public JEnumCellEditor(String[] choices)
{
super(new JComboBox());
if (choices == null)
return;
// populate JCombo with choices values
JComboBox jcb = (JComboBox)this.getComponent();
int len = choices.length;
for (int x=0;x