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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? acltextarea.java

?? JADE(JAVA Agent開發框架)是一個完全由JAVA語言開發的軟件,它簡化了多Agent系統的實現。
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
    if (horizontal != null && width != 0) {
      horizontal.setValues(-horizontalOffset, width, 0, width * 5);
      horizontal.setUnitIncrement(painter.getFontMetrics()
        .charWidth('w'));
      horizontal.setBlockIncrement(width / 2);
    }
  }


  /**
   *  Ensures that the caret is visible by scrolling the text area if
   *  necessary.
   *
   * @return    True if scrolling was actually performed, false if the caret
   *      was already visible
   */
  public boolean scrollToCaret() {
    int line = getCaretLine();
    int lineStart = getLineStartOffset(line);
    int offset = Math.max(0, Math.min(getLineLength(line) - 1,
      getCaretPosition() - lineStart));

    return scrollTo(line, offset);
  }


  /**
   *  Ensures that the specified line and offset is visible by scrolling the
   *  text area if necessary.
   *
   * @param  line    The line to scroll to
   * @param  offset  The offset in the line to scroll to
   * @return         True if scrolling was actually performed, false if the
   *      line and offset was already visible
   */
  public boolean scrollTo(int line, int offset) {
    // visibleLines == 0 before the component is realized
    // we can't do any proper scrolling then, so we have
    // this hack...
    if (visibleLines == 0) {
      setFirstLine(Math.max(0, line - electricScroll));
      return true;
    }

    int newFirstLine = firstLine;
    int newHorizontalOffset = horizontalOffset;

    if (line < firstLine + electricScroll) {
      newFirstLine = Math.max(0, line - electricScroll);
    }

    else if (line + electricScroll >= firstLine + visibleLines) {
      newFirstLine = (line - visibleLines) + electricScroll + 1;
      if (newFirstLine + visibleLines >= getLineCount()) {
        newFirstLine = getLineCount() - visibleLines;
      }

      if (newFirstLine < 0) {
        newFirstLine = 0;
      }

    }

    int x = offsetToX(line, offset);
    int width = painter.getFontMetrics().charWidth('W');

    if (x < 0) {
      newHorizontalOffset = Math.min(0, horizontalOffset
         - x + width);
    }

    else if (x + width >= painter.getWidth()) {
      newHorizontalOffset = horizontalOffset +
        (painter.getWidth() - x) - width;
    }

    return setOrigin(newFirstLine, newHorizontalOffset);
  }


  /**
   *  Converts a line index to a y co-ordinate.
   *
   * @param  line  The line
   * @return       Description of the Returned Value
   */
  public int lineToY(int line) {
    FontMetrics fm = painter.getFontMetrics();
    return (line - firstLine) * fm.getHeight()
       - (fm.getLeading() + fm.getMaxDescent());
  }


  /**
   *  Converts a y co-ordinate to a line index.
   *
   * @param  y  The y co-ordinate
   * @return    Description of the Returned Value
   */
  public int yToLine(int y) {
    FontMetrics fm = painter.getFontMetrics();
    int height = fm.getHeight();
    return Math.max(0, Math.min(getLineCount() - 1,
      y / height + firstLine));
  }


  /**
   *  Converts an offset in a line into an x co-ordinate.
   *
   * @param  line    The line
   * @param  offset  The offset, from the start of the line
   * @return         Description of the Returned Value
   */
  public int offsetToX(int line, int offset) {
    ACLSLTokenMarker tokenMarker = getTokenMarker();

    /*
        Use painter's cached info for speed
      */
    FontMetrics fm = painter.getFontMetrics();

    getLineText(line, lineSegment);

    int segmentOffset = lineSegment.offset;
    int x = horizontalOffset;

    /*
        If syntax coloring is disabled, do simple translation
      */
    if (tokenMarker == null) {
      lineSegment.count = offset;
      return x + Utilities.getTabbedTextWidth(lineSegment,
        fm, x, painter, 0);
    }
    /*
        If syntax coloring is enabled, we have to do this because
        tokens can vary in width
      */
    else {
      ACLToken tokens;
      if (painter.currentLineIndex == line) {
        tokens = painter.currentLineTokens;
      }

      else {
        painter.currentLineIndex = line;
        tokens = painter.currentLineTokens
           = tokenMarker.markTokens(lineSegment, line);
      }

      Toolkit toolkit = painter.getToolkit();
      Font defaultFont = painter.getFont();
      ACLSytntaxStyle[] styles = painter.getStyles();

      for (; ; ) {
        byte id = tokens.id;
        if (id == ACLToken.END) {
          return x;
        }

        if (id == ACLToken.NULL) {
          fm = painter.getFontMetrics();
        }

        else {
          fm = styles[id].getFontMetrics(defaultFont);
        }

        int length = tokens.length;

        if (offset + segmentOffset < lineSegment.offset + length) {
          lineSegment.count = offset - (lineSegment.offset - segmentOffset);
          return x + Utilities.getTabbedTextWidth(
            lineSegment, fm, x, painter, 0);
        }
        else {
          lineSegment.count = length;
          x += Utilities.getTabbedTextWidth(
            lineSegment, fm, x, painter, 0);
          lineSegment.offset += length;
        }
        tokens = tokens.next;
      }
    }
  }


  /**
   *  Converts an x co-ordinate to an offset within a line.
   *
   * @param  line  The line
   * @param  x     The x co-ordinate
   * @return       Description of the Returned Value
   */
  public int xToOffset(int line, int x) {
    ACLSLTokenMarker tokenMarker = getTokenMarker();

    /*
        Use painter's cached info for speed
      */
    FontMetrics fm = painter.getFontMetrics();

    getLineText(line, lineSegment);

    char[] segmentArray = lineSegment.array;
    int segmentOffset = lineSegment.offset;
    int segmentCount = lineSegment.count;

    int width = horizontalOffset;

    if (tokenMarker == null) {
      for (int i = 0; i < segmentCount; i++) {
        char c = segmentArray[i + segmentOffset];
        int charWidth;
        if (c == '\t') {
          charWidth = (int)painter.nextTabStop(width, i)
             - width;
        }

        else {
          charWidth = fm.charWidth(c);
        }

        if (painter.isBlockCaretEnabled()) {
          if (x - charWidth <= width) {
            return i;
          }

          else
            if (x - charWidth / 2 <= width) {
            return i;
          }
        }

        width += charWidth;
      }

      return segmentCount;
    }
    else {
      ACLToken tokens;
      if (painter.currentLineIndex == line) {
        tokens = painter.currentLineTokens;
      }

      else {
        painter.currentLineIndex = line;
        tokens = painter.currentLineTokens
           = tokenMarker.markTokens(lineSegment, line);
      }

      int offset = 0;
      Toolkit toolkit = painter.getToolkit();
      Font defaultFont = painter.getFont();
      ACLSytntaxStyle[] styles = painter.getStyles();

      for (; ; ) {
        byte id = tokens.id;
        if (id == ACLToken.END) {
          return offset;
        }

        if (id == ACLToken.NULL) {
          fm = painter.getFontMetrics();
        }

        else {
          fm = styles[id].getFontMetrics(defaultFont);
        }

        int length = tokens.length;

        for (int i = 0; i < length; i++) {
          char c = segmentArray[segmentOffset + offset + i];
          int charWidth;
          if (c == '\t') {
            charWidth = (int)painter.nextTabStop(width, offset + i)
               - width;
          }

          else {
            charWidth = fm.charWidth(c);
          }

          if (painter.isBlockCaretEnabled()) {
            if (x - charWidth <= width) {
              return offset + i;
            }

            else
              if (x - charWidth / 2 <= width) {
              return offset + i;
            }
          }

          width += charWidth;
        }

        offset += length;
        tokens = tokens.next;
      }
    }
  }


  /**
   *  Converts a point to an offset, from the start of the text.
   *
   * @param  x  The x co-ordinate of the point
   * @param  y  The y co-ordinate of the point
   * @return    Description of the Returned Value
   */
  public int xyToOffset(int x, int y) {
    int line = yToLine(y);
    int start = getLineStartOffset(line);
    return start + xToOffset(line, x);
  }


  /**
   *  Selects from the start offset to the end offset. This is the general
   *  selection method used by all other selecting methods. The caret position
   *  will be start if start &lt; end, and end if end &gt; start.
   *
   * @param  start  The start offset
   * @param  end    The end offset
   */
  public void select(int start, int end) {
    int newStart;
    int newEnd;
    boolean newBias;
    if (start <= end) {
      newStart = start;
      newEnd = end;
      newBias = false;
    }
    else {
      newStart = end;
      newEnd = start;
      newBias = true;
    }

    if (newStart < 0 || newEnd > getDocumentLength()) {
      throw new IllegalArgumentException("Bounds out of"
         + " range: " + newStart + "," +
        newEnd);
    }

    // If the new position is the same as the old, we don't
    // do all this crap, however we still do the stuff at
    // the end (clearing magic position, scrolling)
    if (newStart != selectionStart || newEnd != selectionEnd
       || newBias != biasLeft) {
      int newStartLine = getLineOfOffset(newStart);
      int newEndLine = getLineOfOffset(newEnd);

      if (painter.isBracketHighlightEnabled()) {
        if (bracketLine != -1) {
          painter._invalidateLine(bracketLine);
        }

        updateBracketHighlight(end);
        if (bracketLine != -1) {
          painter._invalidateLine(bracketLine);
        }

      }

      painter._invalidateLineRange(selectionStartLine, selectionEndLine);
      painter._invalidateLineRange(newStartLine, newEndLine);

      selectionStart = newStart;
      selectionEnd = newEnd;
      selectionStartLine = newStartLine;
      selectionEndLine = newEndLine;
      biasLeft = newBias;

      fireCaretEvent();
    }

    // When the user is typing, etc, we don't want the caret
    // to blink
    blink = true;
    caretTimer.restart();

    // Clear the `magic' caret position used by up/down
    magicCaret = -1;

    if (!scrollToCaret()) {
      painter.fastRepaint();
    }

  }


  /**
   *  Similar to <code>setSelectedText()</code>, but overstrikes the
   *  appropriate number of characters if overwrite mode is enabled.
   *
   * @param  str  The string
   * @see         #setSelectedText(String)
   * @see         #isOverwriteEnabled()
   */
  public void overwriteSetSelectedText(String str) {
    // Don't overstrike if there is a selection
    if (!overwrite || selectionStart != selectionEnd) {
      setSelectedText(str);
      return;
    }

    // Don't overstrike if we're on the end of
    // the line
    int caret = getCaretPosition();
    int caretLineEnd = getLineEndOffset(getCaretLine());
    if (caretLineEnd - caret <= str.length()) {
      setSelectedText(str);
      return;
    }

    try {
      document.remove(caret, str.length());
      document.insertString(caret, str, null);
    }
    catch (BadLocationException bl) {
      bl.printStackTrace();
    }
  }


  /**
   *  Deletes the selected text from the text area and places it into the
   *  clipboard.
   */
  public void cut() {
    if (editable) {
      copy();
      setSelectedText("");
    }
  }


  /**
   *  Places the selected text into the clipboard.
   */
  public void copy() {
    if (selectionStart != selectionEnd) {
      Clipboard clipboard = getToolkit().getSystemClipboard();
      StringSelection selection = new StringSelection(
        getSelectedText());
      clipboard.setContents(selection, null);
    }
  }


  /**
   *  Inserts the clipboard contents into the text.
   */
  public void paste() {
    if (editable) {
      Clipboard clipboard = getToolkit().getSystemClipboard();
      try {
        String selection = (String)(clipboard.getContents(this).getTransferData(
          DataFlavor.stringFlavor));

        // The MacOS MRJ doesn't convert \r to \n,
        // so do it here
        setSelectedText(selection.replace('\r', '\n'));
      }
      catch (Exception e) {
        getToolkit().beep();
        System.err.println("Clipboard does not"
           + " contain a string");
      }
    }
  }


  /**
   *  Called by the AWT when this component is removed from it's parent. This
   *  stops any autoscrolling and clears the currently focused component.
   */
  public void removeNotify() {
    super.removeNotify();
    if (focusedComponent == this) {
      focusedComponent = null;
    }

    if (scrollTimer.isRunning()) {
      scrollTimer.stop();
    }

  }


  /**
   *  Description of the Method
   *
   * @param  e  Description of Parameter
   */
  protected void processFocusEvent(FocusEvent e) {
    super.processFocusEvent(e);
    if (e.getID() == e.FOCUS_LOST) {
      focusLost(e);
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合中文字幕国产 | 99精品国产99久久久久久白柏| 91精品国产麻豆| 亚洲成a人片综合在线| 欧美综合在线视频| 亚洲图片欧美色图| 欧美日韩国产123区| 日本一区中文字幕 | 欧美一区二区三区四区五区| 日韩精品一级二级| 日韩一区二区三区在线| 久久99精品国产麻豆婷婷| 91精品免费观看| 国产一区二区网址| 中文在线资源观看网站视频免费不卡 | 久久99精品久久久久久国产越南| 久久夜色精品一区| 成人福利视频在线看| 亚洲在线免费播放| 精品人伦一区二区色婷婷| 成人精品免费看| 亚洲综合久久久久| 日韩精品一区二区三区在线| 成人中文字幕在线| 亚洲一区在线电影| 2023国产精品| 日本高清不卡视频| 久久99久久久欧美国产| 舔着乳尖日韩一区| 日韩欧美一区二区三区在线| 成人av免费观看| 亚洲美女视频在线观看| 日韩欧美一级在线播放| 成人激情午夜影院| 日韩成人午夜电影| 国产精品久久久久久久第一福利| 欧美性色综合网| 国产一区二区在线视频| 艳妇臀荡乳欲伦亚洲一区| 精品久久国产97色综合| 91黄色免费版| 成人综合婷婷国产精品久久免费| 亚洲第一电影网| 欧美激情一区二区三区在线| 91精品国产综合久久香蕉麻豆| 成人三级伦理片| 日韩激情视频网站| 亚洲三级在线观看| 精品国产一区二区三区久久久蜜月| 色婷婷精品久久二区二区蜜臂av| 国产一区二区三区黄视频| 亚洲国产婷婷综合在线精品| 国产精品无遮挡| 欧美mv日韩mv| 欧美一级片在线观看| 一本久久综合亚洲鲁鲁五月天| 国产高清不卡二三区| 男男gaygay亚洲| 一区二区三区**美女毛片| 国产精品国产自产拍高清av| 欧美一区二区三区视频免费播放| 在线观看一区二区精品视频| 成人国产视频在线观看| 国产在线一区二区| 日韩中文字幕91| 有码一区二区三区| 最新高清无码专区| 中文字幕精品一区| 国产色爱av资源综合区| 精品国产3级a| 精品欧美久久久| 欧美一二三在线| 91精品国产综合久久小美女| 欧美日韩国产成人在线免费| 欧美亚洲国产bt| 在线一区二区视频| 日韩一区国产二区欧美三区| 欧美性色aⅴ视频一区日韩精品| 色婷婷激情久久| 91欧美一区二区| 99re这里只有精品视频首页| 成人精品国产福利| 99精品视频一区| 色婷婷精品久久二区二区蜜臀av | 日本不卡免费在线视频| 天天综合网 天天综合色| 五月激情综合色| 免费三级欧美电影| 久久精品久久精品| 国产成人在线视频播放| 成人一区二区视频| 91视频在线观看免费| 欧美性猛交一区二区三区精品| 欧美午夜精品理论片a级按摩| 欧美日本韩国一区二区三区视频| 欧美二区三区91| 日韩你懂的在线播放| 亚洲精品在线免费播放| 中文字幕巨乱亚洲| 一区二区三区四区亚洲| 天天综合天天综合色| 国产一区免费电影| 99这里只有久久精品视频| 欧美伊人久久久久久午夜久久久久| 欧美日韩国产美女| 日韩一二三区视频| 国产欧美日韩麻豆91| 亚洲女人的天堂| 日本中文在线一区| 不卡视频免费播放| 欧美亚一区二区| 日韩精品一区二区三区在线观看 | 青青草国产成人99久久| 国产美女视频91| 日本精品裸体写真集在线观看| 8x8x8国产精品| 国产欧美精品区一区二区三区| 国产精品福利影院| 婷婷亚洲久悠悠色悠在线播放| 国产精品正在播放| 色综合久久久久久久| 欧美成人video| 中文字幕字幕中文在线中不卡视频| 亚洲成av人片| 成人性生交大合| 91精品国产综合久久精品性色| 欧美国产精品v| 日韩在线卡一卡二| bt7086福利一区国产| 日韩一区二区免费电影| 中文字幕中文乱码欧美一区二区| 日精品一区二区三区| 成人av手机在线观看| 日韩一区二区三| 一区二区三区中文字幕电影| 国产一区日韩二区欧美三区| 欧美日本乱大交xxxxx| 国产精品视频你懂的| 久久精品国产精品亚洲精品| 色欧美日韩亚洲| 国产香蕉久久精品综合网| 丝瓜av网站精品一区二区| 成人av网站在线| 日韩一本二本av| 午夜精品福利一区二区蜜股av | 国产精品不卡视频| 奇米影视7777精品一区二区| 91蜜桃婷婷狠狠久久综合9色| 久久久久99精品一区| 美女在线视频一区| 欧美日韩色一区| 一区二区在线免费| 9久草视频在线视频精品| 日韩欧美你懂的| 五月综合激情婷婷六月色窝| 日韩欧美国产三级电影视频| 亚洲一区二区美女| 91在线观看成人| 国产精品视频线看| 国产成人午夜视频| 久久综合久久综合亚洲| 久久69国产一区二区蜜臀| 91精品福利在线一区二区三区| 亚洲自拍欧美精品| 欧美性生交片4| 亚洲国产sm捆绑调教视频| 欧美性videosxxxxx| 洋洋av久久久久久久一区| 91黄视频在线观看| 一区二区不卡在线视频 午夜欧美不卡在| 成人动漫一区二区| 1024成人网色www| jiyouzz国产精品久久| 国产精品美女一区二区在线观看| 国产一区不卡视频| 中文字幕国产一区二区| 粗大黑人巨茎大战欧美成人| 国产精品视频在线看| av资源站一区| 亚洲欧美精品午睡沙发| 在线观看www91| 天天操天天综合网| 日韩一区二区在线看| 极品少妇一区二区三区精品视频| 精品久久久久久久一区二区蜜臀| 国产自产2019最新不卡| 国产三级一区二区| 99久久国产综合精品色伊| 玉米视频成人免费看| 欧美精品久久久久久久多人混战 | 亚洲欧洲三级电影| 欧美专区日韩专区| 日本亚洲电影天堂| 久久女同精品一区二区| 成人免费黄色大片| 亚洲高清不卡在线| 精品福利在线导航| 99在线视频精品| 丝袜美腿亚洲综合| 久久久噜噜噜久久人人看|