コード例 #1
0
            public virtual void ActionPerformed(ActionEvent e)
            {
                string com = e.GetActionCommand();

                switch (com)
                {
                case "Open File":
                {
                    File file = this._enclosing.GetFile(true);
                    if (file != null)
                    {
                        this._enclosing.OpenFile(file);
                    }
                    break;
                }

                case "Load URL":
                {
                    string url = this._enclosing.GetURL();
                    if (url != null)
                    {
                        this._enclosing.OpenURL(url);
                    }
                    break;
                }

                case "Exit":
                {
                    this._enclosing.Exit();
                    break;
                }

                case "Clear":
                {
                    this._enclosing.ClearDocument();
                    break;
                }

                case "Load CRF From File":
                {
                    File file = this._enclosing.GetFile(true);
                    if (file != null)
                    {
                        this._enclosing.LoadClassifier(file, true);
                    }
                    break;
                }

                case "Load CMM From File":
                {
                    File file = this._enclosing.GetFile(true);
                    if (file != null)
                    {
                        this._enclosing.LoadClassifier(file, false);
                    }
                    break;
                }

                case "Load Default CRF":
                {
                    this._enclosing.LoadDefaultClassifier(true);
                    break;
                }

                case "Load Default CMM":
                {
                    this._enclosing.LoadDefaultClassifier(false);
                    break;
                }

                case "Extract":
                {
                    this._enclosing.Extract();
                    break;
                }

                case "Save Untagged File":
                {
                    this._enclosing.SaveUntaggedContents(this._enclosing.loadedFile);
                    break;
                }

                case "Save Untagged File As ...":
                {
                    this._enclosing.SaveUntaggedContents(this._enclosing.GetFile(false));
                    break;
                }

                case "Save Tagged File As ...":
                {
                    NERGUI.SaveFile(this._enclosing.GetFile(false), this._enclosing.taggedContents);
                    break;
                }

                default:
                {
                    NERGUI.log.Info("Unknown Action: " + e);
                    break;
                }
                }
            }
コード例 #2
0
 internal ActionPerformer(NERGUI _enclosing)
 {
     this._enclosing = _enclosing;
 }
コード例 #3
0
 internal InputListener(NERGUI _enclosing)
 {
     this._enclosing = _enclosing;
 }