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

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

The newest version!
package GuiTool.Gui;
import java.awt.*;
import javax.swing.*;
/*************************************************************************
* This class show the dialog for inputing category and inflection for inflection
* No constructor is provided since only static methods are used.
**************************************************************************/
public class InflectionCatInflDialog
{
    public static void AddInflectionCatInflDialog(JFrame owner, 
        DefaultListModel selectedModel)
    {
        // display the category inflection panel
        CatInflDialog catInflD = new CatInflDialog(owner,
            "Value of selected categories: ",
            "Value of selected inflections: ",
            "Category & Inflection Selection");
        catInflD.setVisible(true);
        // check the input category and inflection, then update
        if((catInflD.GetCategoryStr() != null)
        && (catInflD.GetInflectionStr() != null))
        {
            selectedModel.addElement("ici~" + catInflD.GetCategoryValue() + 
                "+" + catInflD.GetInflectionValue());
        }
    }
    public static void InsertInflectionCatInflDialog(JFrame owner, 
        DefaultListModel selectedModel, int tarIndex)
    {
        // display the category inflection panel
        CatInflDialog catInflD = new CatInflDialog(owner,
            "Value of selected categories: ",
            "Value of selected inflections: ",
            "Category & Inflection Selection");
        catInflD.setVisible(true);
        // check the input category and inflection, then update
        if((catInflD.GetCategoryStr() != null)
        && (catInflD.GetInflectionStr() != null))
        {
            selectedModel.insertElementAt(("ici~" + catInflD.GetCategoryValue()
                + "+" + catInflD.GetInflectionValue()), tarIndex);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy