gov.nih.nlm.nls.lvg.Tools.GuiTool.Gui.InflectionCatInflDialog Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lvg2010dist Show documentation
Show all versions of lvg2010dist Show documentation
LVG tools is used by Apache cTAKES.
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