Package ketUI.chord

Examples of ketUI.chord.Chord


    return Argument.cloneArgument(root);
  }

  public void actionPerformed(ActionEvent e) {
    Object source = e.getSource();
    Chord chord = getChord();
    // Use functions, symbolic functions and operations as arguments to an existing edit.
    if (source==function) {
      /*<?
      new FunctionMenuFrame(document, isPending(), function, FunctionMenuFrame.FUNCTIONS);
      getMathCollection().updateUndoStack();
View Full Code Here


  public Find getFind() {
    return find;
  }

  public void echo(String string) {
    Chord chord = getKeyboardEventHandler().getChord();
    setDocumentState(DocumentState.ECHO_FEEDBACK)
    message.setMessage(string);
    chord.setComplete(false);
    document.updateAndRepaint();
  }
View Full Code Here

    document.updateAndRepaint();
  }

  public void error(String string) {
    // TODO: Remove chord from the argument list.
    Chord chord = getKeyboardEventHandler().getChord();
    setDocumentState(DocumentState.ECHO_ERROR);
    message.setMessage(string);
    // Note: Error responder is not finished until a key is pressed to
    // clear the message.
    if (chord!=null) {
      // TODO: When called by mouse events, no ketUI.chord is given: fix.
      chord.setComplete(false);
      document.updateAndRepaint();
    }
  }
View Full Code Here

      "right child", "Append a new argument to the right of the current selection, 'ao'.");
  }

  @Override
  public void replaceByText(String text) {
    Chord chord = getChord();
    switch (text) {
      case "parent (prepending arguments)":
        getAddMode().prependPurpose(chord);
        break;
      case "parent (appending arguments)":
View Full Code Here

    }
  }

  public void toggleTextEquation() {
    Selection s = getSelection();
    Chord chord = document.getKeyboardEventHandler().getChord();
    String line = getLine();
    boolean nonblank = ! ("".equals(line));
    if (document.getModes().getDocumentState()==DocumentState.UPDATE_TEXT) { //! UPDATE_SUBSTITUTE UPDATE_TEXT
      // BROKEN
      document.getModes().setDocumentState(DocumentState.UPDATE_REPLACE);
View Full Code Here

      }
    }
  }

  public void appendEquation() {
    Chord chord = document.getKeyboardEventHandler().getChord();
    document.getModes().getAddMode().appendEquation(chord);
  }
View Full Code Here

    Argument current = getSelection().getCurrent();
    EquationList el = current.getEquationList();
    Equation appended = new Equation(new Token(new Text(getStart())));
    el.addBefore(current.getEquation(), appended);
    document.getKeyboardEventHandler().setToInitialState(); // Don't reset: record as done and move on.
    Chord chord = document.getKeyboardEventHandler().getChord();
    document.getModes().getNormalMode().replaceCurrentArgument(chord);
    setMessage(getEnd());
  }
View Full Code Here

  }

  public void actionPerformed(ActionEvent e) {
    document.getKeyboardEventHandler().setToInitialState();   // What about set-state?
    Object source = e.getSource();
    Chord chord = getChord();
    String text = null;
    if (source==mDeleteTrace) {
      getSelection().deleteTrace();
    } else if (source==mUndo) {
      getMathCollection().undo();
View Full Code Here

TOP

Related Classes of ketUI.chord.Chord

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.