Пример #1
0
 public TextMenuAction(MacromoleculeEditor editor, String textType, int actionType) {
   super(textType);
   this.editor = editor;
   this.textType = textType;
   this.actionType = actionType;
   viewer = TextViewer.getInstance(editor.getFrame());
 }
Пример #2
0
 public void processResult(String text) {
   switch (actionType) {
     case SHOW_ACTION_TYPE:
       viewer.setTitle(textType);
       viewer.setText(text);
       break;
     case COPY_ACTION_TYPE:
       ClipBoardProcessor.copy(text);
       break;
     case SAVE_ACTION_TYPE:
       save(text);
       break;
     default:
       break;
   }
 }