All Downloads are FREE. Search and download functionalities are using the official Maven repository.

gov.nih.nlm.nls.lvg.Tools.GuiTool.Gui.DerivationCatDialog Maven / Gradle / Ivy

The newest version!
package GuiTool.Gui;
import java.awt.*;
import javax.swing.*;
/*************************************************************************
* This class show the dialog for selecting category for derivation.
* No constructor is provided since only static methods are used.
**************************************************************************/
public class DerivationCatDialog
{
    public static void AddDerivationCatDialog(JFrame owner, 
        DefaultListModel selectedModel)
    {
        // display the category panel
        String catStr = CategoryDialog.ShowDialog(owner, 0);
        if(catStr != null)
        {
            selectedModel.addElement("dc~" + catStr);
        }
    }
    public static void InsertDerivationCatDialog(JFrame owner, 
        DefaultListModel selectedModel, int tarIndex)
    {
        // display the word size input panel
        String catStr = CategoryDialog.ShowDialog(owner, 0);
        if(catStr != null)
        {
            selectedModel.insertElementAt(("dc~" + catStr), tarIndex);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy