Package edu.harvard.wcfia.yoshikoder.dictionary

Examples of edu.harvard.wcfia.yoshikoder.dictionary.Node



  public void actionPerformed(ActionEvent e) {
    if (yoshikoder.getProject().getDocumentList().size() > 1){

      Node n = yoshikoder.getSelectedNode();
      CategoryNode cnode = null;
      if (n instanceof CategoryNode)
        cnode = (CategoryNode)n;
      else // patternnode
      cnode = (CategoryNode)n.getParent();
      final CategoryNode catnode = cnode;

      File file;
      try {
        int resp = chooser.showSaveDialog(yoshikoder);
View Full Code Here


      }
      return map;
    }
   
    public void actionPerformed(ActionEvent e) {
        final Node n = yoshikoder.getSelectedNode();
        if (n == null)
            return;
        final int wsize = yoshikoder.getWindowSize();
        final YKDocument[] docs = yoshikoder.getSelectedDocuments();
        if (docs == null || docs.length == 0)
View Full Code Here

    super(yk, AddWordsToCategoryAction.class.getName());
  }
 
  @Override
  public void actionPerformed(ActionEvent e) {
    Node node = yoshikoder.getSelectedNode();
    YKDictionary dict = yoshikoder.getDictionary();
    CategoryNode cnode = null;
    if (node instanceof CategoryNode)
      cnode = (CategoryNode)node;
    else
      cnode = (CategoryNode)node.getParent();
   
    if (area == null){
      area = new JTextArea(20,30);
      area.setEditable(true);
      area.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
View Full Code Here

    public AddCategoryAction(Yoshikoder yk) {
        super(yk, AddCategoryAction.class.getName());
    }

    public void actionPerformed(ActionEvent e) {
        Node n = yoshikoder.getSelectedNode();
        if ((n != null) && (n instanceof CategoryNode)) {
            JDialog dia = new NewCategoryDialog(yoshikoder, (CategoryNode)n);
            dia.setVisible(true);
        }
    }
View Full Code Here

    public EditNodeAction(Yoshikoder yk) {
        super(yk, EditNodeAction.class.getName());
    }

    public void actionPerformed(ActionEvent e) {
        Node node = yoshikoder.getSelectedNode();
        if (node != null){
            if (node instanceof CategoryNode) {
                CategoryNode n = (CategoryNode)node;
                JDialog dia =
                    new EditCategoryDialog(yoshikoder, (CategoryNode)n.getParent(), n);
View Full Code Here

 
    public void actionPerformed(ActionEvent e) {
        if (yoshikoder.getProject().getDocumentList().size() > 1){

          Node n = yoshikoder.getSelectedNode();
            CategoryNode cnode = null;
            if (n instanceof CategoryNode)
              cnode = (CategoryNode)n;
            else // patternnode
              cnode = (CategoryNode)n.getParent();
            final CategoryNode catnode = cnode;
         
          File file;
          try {
            int resp = chooser.showSaveDialog(yoshikoder);
View Full Code Here

    }

    // select the next child down, or the parent, in that order.
    // there always will be a parent
    protected Node chooseNextSelection(Node n){
        Node parent = (Node)n.getParent();
        int index = parent.getIndex(n);
        if ((index+1) < parent.getChildCount())
            return (Node)parent.getChildAt(index+1);
        else
            return parent;
    }
View Full Code Here

        else
            return parent;
    }
   
    public void actionPerformed(ActionEvent e) {
        Node n = yoshikoder.getSelectedNode();
        if (n != null){
            if ((n instanceof PatternNode) ||
                    ((n instanceof CategoryNode) && (n.getParent() != null))){
                Node selected = chooseNextSelection(n);
                yoshikoder.getDictionary().remove(n);
                yoshikoder.setSelectedNode(selected);
                yoshikoder.setUnsavedChanges(true);
            }
        }
View Full Code Here

    public void actionPerformed(ActionEvent e) {
        final Map<YKDocument,Concordance> concmap = yoshikoder.getDocumentConcordanceMap();
        if (concmap == null || concmap.size()==0)
          return;

        Node n = yoshikoder.getSelectedNode();
        CategoryNode cnode = null;
        if (n instanceof CategoryNode)
          cnode = (CategoryNode)n;
        else // patternnode
          cnode = (CategoryNode)n.getParent();
        final CategoryNode catnode = cnode;
       
        TaskWorker tworker = new TaskWorker(yoshikoder){
            YKDictionaryReportDialog dia;
          Map<YKDocument,EntryFrequencyMap> efmMap;
View Full Code Here

        super(yk, AddPatternAction.class.getName());

    }

    public void actionPerformed(ActionEvent e) {
        Node node = yoshikoder.getSelectedNode();
        if ((node != null) && (node instanceof CategoryNode)){
            JDialog dia = new NewPatternDialog(yoshikoder, (CategoryNode)node);
            dia.setVisible(true);
        }
    }
View Full Code Here

TOP

Related Classes of edu.harvard.wcfia.yoshikoder.dictionary.Node

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.