亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? acltextarea.java

?? JADE(JAVA Agent開發(fā)框架)是一個完全由JAVA語言開發(fā)的軟件,它簡化了多Agent系統(tǒng)的實現(xiàn)。
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:

  }


  protected void fireCaretEvent() {
    Object[] listeners = listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i--) {
      if (listeners[i] == CaretListener.class) {
        ((CaretListener)listeners[i + 1]).caretUpdate(caretEvent);
      }
    }

  }


  protected void updateBracketHighlight(int newCaretPosition) {
    if (newCaretPosition == 0) {
      bracketPosition = bracketLine = -1;
      return;
    }

    try {
      int offset = TextUtilities.findMatchingBracket(
        document, newCaretPosition - 1);
      if (offset != -1) {
        bracketLine = getLineOfOffset(offset);
        bracketPosition = offset - getLineStartOffset(bracketLine);
        return;
      }
    }
    catch (BadLocationException bl) {
      bl.printStackTrace();
    }

    bracketLine = bracketPosition = -1;
  }


  protected void documentChanged(DocumentEvent evt) {
    DocumentEvent.ElementChange ch = evt.getChange(
      document.getDefaultRootElement());

    int count;
    if (ch == null) {
      count = 0;
    }

    else {
      count = ch.getChildrenAdded().length -
        ch.getChildrenRemoved().length;
    }

    if (count == 0) {
      int line = getLineOfOffset(evt.getOffset());
      painter._invalidateLine(line);
    }
    else {
      int index = ch.getIndex();
      painter._invalidateLineRange(index, Math.max(getLineCount(),
        firstLine + visibleLines));
      updateScrollBars();
    }
  }


  public static class TextUtilities {
    /**
     *  Returns the offset of the bracket matching the one at the specified
     *  offset of the document, or -1 if the bracket is unmatched (or if the
     *  character is not a bracket).
     *
     * @param  doc                       The document
     * @param  offset                    The offset
     * @return                           Description of the Returned Value
     * @exception  BadLocationException  If an out-of-bounds access was
     *      attempted on the document text
     */
    public static int findMatchingBracket(Document doc, int offset)
       throws BadLocationException {
      if (doc.getLength() == 0) {
        return -1;
      }
      char c = doc.getText(offset, 1).charAt(0);
      char cprime;// c` - corresponding character
      boolean direction;// true = back, false = forward

      switch (c) {
        case '(':
          cprime = ')';
          direction = false;
          break;
        case ')':
          cprime = '(';
          direction = true;
          break;
        case '[':
          cprime = ']';
          direction = false;
          break;
        case ']':
          cprime = '[';
          direction = true;
          break;
        case '{':
          cprime = '}';
          direction = false;
          break;
        case '}':
          cprime = '{';
          direction = true;
          break;
        default:
          return -1;
      }

      int count;

      // How to merge these two cases is left as an exercise
      // for the reader.

      // Go back or forward
      if (direction) {
        // Count is 1 initially because we have already
        // `found' one closing bracket
        count = 1;

        // Get text[0,offset-1];
        String text = doc.getText(0, offset);

        // Scan backwards
        for (int i = offset - 1; i >= 0; i--) {
          // If text[i] == c, we have found another
          // closing bracket, therefore we will need
          // two opening brackets to complete the
          // match.
          char x = text.charAt(i);
          if (x == c) {
            count++;
          }

          // If text[i] == cprime, we have found a
          // opening bracket, so we return i if
          // --count == 0
          else if (x == cprime) {
            if (--count == 0) {
              return i;
            }
          }

        }
      }
      else {
        // Count is 1 initially because we have already
        // `found' one opening bracket
        count = 1;

        // So we don't have to + 1 in every loop
        offset++;

        // Number of characters to check
        int len = doc.getLength() - offset;

        // Get text[offset+1,len];
        String text = doc.getText(offset, len);

        // Scan forwards
        for (int i = 0; i < len; i++) {
          // If text[i] == c, we have found another
          // opening bracket, therefore we will need
          // two closing brackets to complete the
          // match.
          char x = text.charAt(i);

          if (x == c) {
            count++;
          }

          // If text[i] == cprime, we have found an
          // closing bracket, so we return i if
          // --count == 0
          else if (x == cprime) {
            if (--count == 0) {
              return i + offset;
            }
          }

        }
      }

      // Nothing found
      return -1;
    }
  }


  static class CaretBlinker implements ActionListener {
    public void actionPerformed(ActionEvent evt) {
      if (focusedComponent != null
         && focusedComponent.hasFocus()) {
        focusedComponent.blinkCaret();
      }

    }
  }


  private static class InputHandler implements KeyListener {

    /**
     *  Creates a new input handler with no key bindings defined.
     */
    public InputHandler() {
      bindings = currentBindings = new Hashtable();
    }


    public static ACLTextArea getTextArea(EventObject evt) {

      if (evt != null) {
        Object o = evt.getSource();
        if (o instanceof Component) {
          // find the parent text area
          Component c = (Component)o;
          for (; ; ) {
            if (c instanceof ACLTextArea) {
              return (ACLTextArea)c;
            }
            else if (c == null) {
              break;
            }
            if (c instanceof JPopupMenu) {
              c = ((JPopupMenu)c)
                .getInvoker();
            }

            else {
              c = c.getParent();
            }

          }
        }
      }

      // this shouldn't happen
      System.err.println("BUG: getTextArea() returning null");
      System.err.println("Report this to Slava Pestov <sp@gjt.org>");
      return null;
    }


    /**
     *  Converts a string to a keystroke. The string should be of the form <i>
     *  modifiers</i> +<i>shortcut</i> where <i>modifiers</i> is any
     *  combination of A for Alt, C for Control, S for Shift or M for Meta,
     *  and <i>shortcut </i> is either a single character, or a keycode name
     *  from the <code>KeyEvent</code> class, without the <code>VK_</code>
     *  prefix.
     *
     * @param  keyStroke  A string description of the key stroke
     * @return            Description of the Returned Value
     */
    public static KeyStroke parseKeyStroke(String keyStroke) {
      if (keyStroke == null) {
        return null;
      }
      int modifiers = 0;
      int ch = '\0';
      int index = keyStroke.indexOf('+');
      if (index != -1) {
        for (int i = 0; i < index; i++) {
          switch (Character.toUpperCase(keyStroke.charAt(i))) {
            case 'A':
              modifiers |= InputEvent.ALT_MASK;
              break;
            case 'C':
              modifiers |= InputEvent.CTRL_MASK;
              break;
            case 'M':
              modifiers |= InputEvent.META_MASK;
              break;
            case 'S':
              modifiers |= InputEvent.SHIFT_MASK;
              break;
          }
        }
      }

      String key = keyStroke.substring(index + 1);
      if (key.length() == 1) {
        ch = Character.toUpperCase(key.charAt(0));
      }

      else if (key.length() == 0) {
        System.err.println("Invalid key stroke: " + keyStroke);
        return null;
      }
      else {
        try {
          ch = KeyEvent.class.getField("VK_".concat(key))
            .getInt(null);
        }
        catch (Exception e) {
          System.err.println("Invalid key stroke: "
             + keyStroke);
          return null;
        }
      }

      return KeyStroke.getKeyStroke(ch, modifiers);
    }


    /**
     *  Sets up the default key bindings.
     */
    public void addDefaultKeyBindings() {
      addKeyBinding("BACK_SPACE", BACKSPACE);
      addKeyBinding("DELETE", DELETE);

      addKeyBinding("ENTER", INSERT_BREAK);
      addKeyBinding("TAB", INSERT_TAB);

      addKeyBinding("INSERT", OVERWRITE);

      addKeyBinding("HOME", HOME);
      addKeyBinding("END", END);
      addKeyBinding("S+HOME", SELECT_HOME);
      addKeyBinding("S+END", SELECT_END);

      addKeyBinding("PAGE_UP", PREV_PAGE);
      addKeyBinding("PAGE_DOWN", NEXT_PAGE);
      addKeyBinding("S+PAGE_UP", SELECT_PREV_PAGE);
      addKeyBinding("S+PAGE_DOWN", SELECT_NEXT_PAGE);

      addKeyBinding("LEFT", PREV_CHAR);
      addKeyBinding("S+LEFT", SELECT_PREV_CHAR);
      addKeyBinding("C+LEFT", PREV_WORD);
      addKeyBinding("CS+LEFT", SELECT_PREV_WORD);
      addKeyBinding("RIGHT", NEXT_CHAR);
      addKeyBinding("S+RIGHT", SELECT_NEXT_CHAR);
      addKeyBinding("C+RIGHT", NEXT_WORD);
      addKeyBinding("CS+RIGHT", SELECT_NEXT_WORD);
      addKeyBinding("UP", PREV_LINE);
      addKeyBinding("S+UP", SELECT_PREV_LINE);
      addKeyBinding("DOWN", NEXT_LINE);
      addKeyBinding("S+DOWN", SELECT_NEXT_LINE);
    }


    /**
     *  Adds a key binding to this input handler. The key binding is a list of
     *  white space separated key strokes of the form <i>[modifiers+]key</i>
     *  where modifier is C for Control, A for Alt, or S for Shift, and key is
     *  either a character (a-z) or a field name in the KeyEvent class
     *  prefixed with VK_ (e.g., BACK_SPACE)
     *
     * @param  keyBinding  The key binding
     * @param  action      The action
     */
    public void addKeyBinding(String keyBinding, ActionListener action) {
      Hashtable current = bindings;

      StringTokenizer st = new StringTokenizer(keyBinding);
      while (st.hasMoreTokens()) {
        KeyStroke keyStroke = parseKeyStroke(st.nextToken());
        if (keyStroke == null) {
          return;
        }

        if (st.hasMoreTokens()) {
          Object o = current.get(keyStroke);
          if (o instanceof Hashtable) {
            current = (Hashtable)o;
          }

          else {
            o = new Hashtable();
            current.put(keyStroke, o);
            current = (Hashtable)o;
          }
        }
        else {
          current.put(keyStroke, action);
        }

      }
    }


    /**
     *  Removes a key binding from this input handler. This is not yet
     *  implemented.
     *
     * @param  keyBinding  The key binding
     */
    public void removeKeyBinding(String keyBinding) {
      throw new InternalError("Not yet implemented");
    }


    /**
     *  Removes all key bindings from this input handler.
     */
    public void removeAllKeyBindings() {
      bindings.clear();
    }


    /**
     *  Handle a key pressed event. This will look up the binding for the key
     *  stroke and execute it.
     *
     * @param  evt  Description of Parameter
     */
    public void keyPressed(KeyEvent evt) {
      int keyCode = evt.getKeyCode();
      int modifiers = evt.getModifiers();
      if ((modifiers & ~KeyEvent.SHIFT_MASK) != 0
         || evt.isActionKey()
         || keyCode == KeyEvent.VK_BACK_SPACE
         || keyCode == KeyEvent.VK_DELETE
         || keyCode == KeyEvent.VK_ENTER
         || keyCode == KeyEvent.VK_TAB) {
        KeyStroke keyStroke = KeyStroke.getKeyStroke(keyCode,
          modifiers);
        Object o = currentBindings.get(keyStroke);
        if (o == null) {
          // Don't beep if the user presses some
          // key we don't know about unless a
          // prefix is active. Otherwise it will
          // beep when caps lock is pressed, etc.
          if (currentBindings != bindings) {
            Toolkit.getDefaultToolkit().beep();
            // F10 should be passed on, but C+e F10
            // shouldn't
            evt.consume();
          }
          currentBindings = bindings;
          return;
        }
        else if (o instanceof ActionListener) {
          ((ActionListener)o).actionPerformed(
            new ActionEvent(evt.getSource(),
            ActionEvent.ACTION_PERFORMED,
            null, modifiers));
          currentBindings = bindings;
          evt.consume();
          return;
        }
        else if (o instanceof Hashtable) {
          currentBindings = (Hashtable)o;
          evt.consume();
          return;
        }
        else if (keyCode != KeyEvent.VK_ALT
           && keyCode != KeyEvent.VK_CONTROL
           && keyCode != KeyEvent.VK_SHIFT
           && keyCode != KeyEvent.VK_META) {
          return;
        }
      }
    }


    /**
     *  Handle a key released event. These are ignored.
     *
     * @param  evt  Description of Parameter
     */
    public void keyReleased(KeyEvent evt) {
    }


    /**
     *  Handle a key typed event. This inserts the key into the text area.
     *
     * @param  evt  Description of Parameter
     */
    public void keyTyped(KeyEvent evt) {

      int modifiers = evt.getModifiers();
      char c = evt.getKeyChar();
      if (c != KeyEvent.CHAR_UNDEFINED &&
        (modifiers & KeyEvent.ALT_MASK) == 0) {
        if (c >= 0x20 && c != 0x7f) {
          ACLTextArea textArea = getTextArea(evt);
          if (!textArea.isEditable()) {
            textArea.getToolkit().beep();
            return;
          }

          currentBindings = bindings;

          textArea.overwriteSetSelectedText(String.valueOf(c));
        }
      }

    }


    public static class backspace implements ActionListener {
      public void actionPerformed(ActionEvent evt) {
        ACLTextArea textArea = getTextArea(evt);

        if (!textArea.isEditable()) {

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲高清视频中文字幕| 欧美96一区二区免费视频| 亚洲人成精品久久久久| 一区二区三区免费在线观看| 国产日韩欧美综合一区| 国产麻豆视频一区二区| 成人av电影在线观看| 欧美亚洲高清一区二区三区不卡| 欧美精品tushy高清| 懂色中文一区二区在线播放| 在线中文字幕一区二区| 欧美精品一区视频| 亚洲人快播电影网| 久久不见久久见中文字幕免费| 成人黄色在线视频| 538在线一区二区精品国产| 国产女主播在线一区二区| 欧美私模裸体表演在线观看| 91亚洲国产成人精品一区二区三 | 日本一区二区三区四区| 亚洲免费电影在线| 激情久久五月天| 色婷婷精品大在线视频| 欧美精品一区二区三区在线| 一区二区三区精密机械公司| 国产一区二区成人久久免费影院| 在线观看免费视频综合| 久久久www免费人成精品| 亚洲影院理伦片| 国产福利精品一区二区| 欧美日韩www| 亚洲色图在线看| 国产综合成人久久大片91| 欧美色综合影院| 91黄视频在线| 日本一区二区免费在线| 免费视频一区二区| 在线亚洲欧美专区二区| 国产欧美精品一区aⅴ影院 | 久久综合九色欧美综合狠狠| 亚洲综合激情网| 久久久电影一区二区三区| 久久久99精品久久| 日日夜夜精品免费视频| 一本色道亚洲精品aⅴ| 久久一日本道色综合| 日韩二区三区四区| 欧美综合在线视频| 亚洲日本乱码在线观看| 成人中文字幕合集| 26uuu久久天堂性欧美| 日本特黄久久久高潮| 欧美在线一区二区| 亚洲人成电影网站色mp4| 成人一级片网址| 久久久久久久性| 久久国产生活片100| 美女视频第一区二区三区免费观看网站| 亚洲午夜在线视频| 亚洲在线视频一区| 波多野结衣精品在线| 久久久久久久久久久久电影| 久久精品国产**网站演员| 在线91免费看| 午夜一区二区三区在线观看| 日本丶国产丶欧美色综合| 亚洲欧洲国产日本综合| 久久久噜噜噜久久人人看| 国产精品久久久久永久免费观看 | 日韩免费在线观看| 日韩国产欧美三级| 5566中文字幕一区二区电影| 丝袜诱惑亚洲看片| 在线不卡a资源高清| 日韩制服丝袜av| 在线成人高清不卡| 奇米精品一区二区三区四区| 91精品国产一区二区三区香蕉| 天涯成人国产亚洲精品一区av| 欧美精品一二三| 视频一区视频二区中文| 日韩一区二区高清| 久久精品国产免费| 久久久亚洲国产美女国产盗摄 | 日本一区二区综合亚洲| 国产成人免费视| 色婷婷久久久久swag精品| 夜夜嗨av一区二区三区网页| 欧美日韩小视频| 日韩精彩视频在线观看| 日韩欧美亚洲国产另类| 国产一区91精品张津瑜| 欧美国产成人在线| 色综合咪咪久久| 亚洲国产精品久久人人爱 | 国产乱码精品一品二品| 久久久精品天堂| www.色综合.com| 亚洲精品国产品国语在线app| 精品视频一区二区不卡| 男人操女人的视频在线观看欧美| 精品国产区一区| 成人高清视频免费观看| 悠悠色在线精品| 欧美一区二区三区在线观看| 国产精品正在播放| 亚洲日本在线观看| 91精品国产麻豆| 国产xxx精品视频大全| 亚洲欧美日韩一区二区 | 日本va欧美va欧美va精品| 欧美精品一区二区三区四区 | 国产亚洲精品久| 91麻豆精品国产无毒不卡在线观看 | 美女高潮久久久| 国产精品久久久久三级| 欧美日韩一区二区三区高清| 狠狠色丁香九九婷婷综合五月| 国产精品入口麻豆原神| 日韩欧美国产综合在线一区二区三区| 国产精品888| 亚洲一区中文日韩| 欧美精品一区二区三区久久久| 99国产精品久久久久久久久久 | 日韩美女一区二区三区| 丁香婷婷综合激情五月色| 亚洲高清久久久| 国产欧美精品一区| 69堂成人精品免费视频| 成人伦理片在线| 免费精品99久久国产综合精品| 中文字幕成人在线观看| 欧美精品乱码久久久久久按摩| 成人中文字幕在线| 美洲天堂一区二卡三卡四卡视频 | 欧美性生活一区| 国产成人精品亚洲午夜麻豆| 久久日一线二线三线suv| 欧美最猛性xxxxx直播| 成人一二三区视频| 九一九一国产精品| 亚洲第一激情av| 国产精品家庭影院| 精品欧美一区二区三区精品久久| 色婷婷av一区二区三区软件| 国产一区二区福利| 奇米影视在线99精品| 丰满放荡岳乱妇91ww| 亚洲乱码国产乱码精品精的特点 | 国产99久久久国产精品潘金| 首页国产欧美日韩丝袜| 一区二区三区免费网站| 中文av一区特黄| 欧美精品一区二区久久久| 欧美巨大另类极品videosbest | 亚洲一区二区欧美日韩| 国产精品妹子av| 久久这里只精品最新地址| 538prom精品视频线放| 日本黄色一区二区| 99久久婷婷国产综合精品电影| 国产一区二区精品久久91| 老司机一区二区| 水蜜桃久久夜色精品一区的特点 | 欧美日韩中文另类| 色综合天天综合色综合av | 欧美精品v国产精品v日韩精品 | yourporn久久国产精品| 欧美美女bb生活片| 国产成人在线免费观看| 精品无人码麻豆乱码1区2区 | 欧美精品一区二区三区蜜桃视频 | 国产激情精品久久久第一区二区 | 国产亚洲美州欧州综合国| 精品播放一区二区| 日韩欧美国产综合一区 | 国产精品一区专区| 久久99国产精品成人| 日本美女一区二区| 日韩av不卡一区二区| 日韩电影免费在线观看网站| 午夜精品一区二区三区电影天堂 | 国产精品夜夜爽| 国产一区二区美女诱惑| 狠狠色丁香久久婷婷综合丁香| 久久www免费人成看片高清| 免费视频最近日韩| 久久av资源网| 国模大尺度一区二区三区| 国内久久婷婷综合| 精品在线亚洲视频| 国产一区二区三区在线观看精品 | 午夜精品久久久久久久久久久| 亚洲丶国产丶欧美一区二区三区| 亚洲国产美女搞黄色| 亚洲一区中文日韩| 天天操天天干天天综合网| 日韩电影免费在线| 国内成+人亚洲+欧美+综合在线| 国产精品中文字幕日韩精品|