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

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

?? acltextarea.java

?? JADE(JAVA Agent開發框架)是一個完全由JAVA語言開發的軟件,它簡化了多Agent系統的實現。
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************
 * JADE - Java Agent DEvelopment Framework is a framework to develop
 * multi-agent systems in compliance with the FIPA specifications.
 * Copyright (C) 2002 TILAB S.p.A.
 *
 * This file is donated by Acklin B.V. to the JADE project.
 *
 *
 * GNU Lesser General Public License
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation,
 * version 2.1 of the License.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA  02111-1307, USA.
 * ***************************************************************/
package jade.tools.gui;

import java.awt.*;
import java.awt.Component;
import java.awt.Toolkit;
import java.awt.datatransfer.*;
import java.awt.event.*;
import java.awt.event.*;
import java.awt.event.*;
import java.awt.event.ActionListener;
import java.awt.event.KeyListener;
import java.lang.*;
import java.lang.reflect.*;
import java.util.EventObject;
import java.util.Hashtable;
import java.util.StringTokenizer;
import javax.swing.*;
import javax.swing.*;
import javax.swing.JPopupMenu;
import javax.swing.KeyStroke;

import javax.swing.border.EtchedBorder;
import javax.swing.event.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.text.*;

import jade.lang.acl.ACLMessage;
import jade.tools.sl.SLFormatter;

/**
 *  jEdit's text area component. The original file is written by Slava Pestov
 *  and altered to fit ACL/SL
 *
 * @author     Slava Pestov
 * @created    June 8, 2002
 * @version    $Id: ACLTextArea.java 5581 2005-02-23 08:59:06Z caire $
 */
public class ACLTextArea extends JComponent {
  /**
   *  Creates a new JEditTextArea with the default settings.
   */
  public ACLTextArea() {
    // Enable the necessary events
    enableEvents(AWTEvent.KEY_EVENT_MASK);

    // Initialize some misc. stuff
    painter = new ACLTextAreaPainter(this);
    AutoScroll scroller = new AutoScroll();
    scrollTimer = new Timer(200, scroller);
    documentHandler = new DocumentHandler();
    listenerList = new EventListenerList();
    caretEvent = new MutableCaretEvent();
    lineSegment = new Segment();
    bracketLine = bracketPosition = -1;
    blink = true;
    caretTimer = new Timer(500, new CaretBlinker());
    caretTimer.setInitialDelay(500);
    caretTimer.start();

    // Initialize the GUI
    setBorder(new EtchedBorder(EtchedBorder.LOWERED));
    setLayout(new java.awt.BorderLayout());

    add(painter, BorderLayout.CENTER);

    add(vertical = new JScrollBar(JScrollBar.VERTICAL), BorderLayout.EAST);
    add(horizontal = new JScrollBar(JScrollBar.HORIZONTAL), BorderLayout.SOUTH);
//    vertical.setVisibleAmount(20);
//    horizontal.setVisibleAmount(50);
    // Add some event listeners
    vertical.addAdjustmentListener(new AdjustHandler());
    horizontal.addAdjustmentListener(new AdjustHandler());
    painter.addComponentListener(new ComponentHandler());
    painter.addMouseListener(new MouseHandler());
    painter.addMouseMotionListener(scroller);
    addFocusListener(new FocusHandler());

    // Load the defaults
    InputHandler DEFAULT_INPUT_HANDLER = new InputHandler();
    DEFAULT_INPUT_HANDLER.addDefaultKeyBindings();

    setInputHandler(DEFAULT_INPUT_HANDLER);
    setDocument(new ACLSyntaxDocument());
    editable = true;
    caretVisible = true;
    caretBlinks = true;
    electricScroll = 3;

    // We don't seem to get the initial focus event?
    focusedComponent = this;

    //set tokenMarker
    setTokenMarker(new ACLSLTokenMarker());
  }


  /**
   *  Returns if this component can be traversed by pressing the Tab key. This
   *  returns false.
   *
   * @return    The ManagingFocus value
   */
  public final boolean isManagingFocus() {
    return true;
  }


  /**
   *  Returns the object responsible for painting this text area.
   *
   * @return    The Painter value
   */
  public final ACLTextAreaPainter getPainter() {
    return painter;
  }


  /**
   *  Returns the input handler.
   *
   * @return    The InputHandler value
   */
  public final InputHandler getInputHandler() {
    return inputHandler;
  }


  /**
   *  Returns true if the caret is blinking, false otherwise.
   *
   * @return    The CaretBlinkEnabled value
   */
  public final boolean isCaretBlinkEnabled() {
    return caretBlinks;
  }


  /**
   *  Returns true if the caret is visible, false otherwise.
   *
   * @return    The CaretVisible value
   */
  public final boolean isCaretVisible() {
    return (!caretBlinks || blink) && caretVisible;
  }


  /**
   *  Returns the number of lines from the top and button of the text area
   *  that are always visible.
   *
   * @return    The ElectricScroll value
   */
  public final int getElectricScroll() {
    return electricScroll;
  }


  /**
   *  Returns the line displayed at the text area's origin.
   *
   * @return    The FirstLine value
   */
  public final int getFirstLine() {
    return firstLine;
  }


  /**
   *  Returns the number of lines visible in this text area.
   *
   * @return    The VisibleLines value
   */
  public final int getVisibleLines() {
    return visibleLines;
  }


  /**
   *  Returns the horizontal offset of drawn lines.
   *
   * @return    The HorizontalOffset value
   */
  public final int getHorizontalOffset() {
    return horizontalOffset;
  }


  /**
   *  Returns the document this text area is editing.
   *
   * @return    The Document value
   */
  public final ACLSyntaxDocument getDocument() {
    return document;
  }


  /**
   *  Returns the document's token marker. Equivalent to calling <code>getDocument().getTokenMarker()</code>
   *  .
   *
   * @return    The TokenMarker value
   */
  public final ACLSLTokenMarker getTokenMarker() {
    return document.getTokenMarker();
  }


  /**
   *  Returns the length of the document. Equivalent to calling <code>getDocument().getLength()</code>
   *  .
   *
   * @return    The DocumentLength value
   */
  public final int getDocumentLength() {
    return document.getLength();
  }


  /**
   *  Returns the number of lines in the document.
   *
   * @return    The LineCount value
   */
  public final int getLineCount() {
    return document.getDefaultRootElement().getElementCount();
  }


  /**
   *  Returns the line containing the specified offset.
   *
   * @param  offset  The offset
   * @return         The LineOfOffset value
   */
  public final int getLineOfOffset(int offset) {
    return document.getDefaultRootElement().getElementIndex(offset);
  }


  /**
   *  Returns the specified substring of the document.
   *
   * @param  start  The start offset
   * @param  len    The length of the substring
   * @return        The substring, or null if the offsets are invalid
   */
  public final String getText(int start, int len) {
    try {
      return document.getText(start, len);
    }
    catch (BadLocationException bl) {
      return null;
    }
  }


  /**
   *  Copies the specified substring of the document into a segment. If the
   *  offsets are invalid, the segment will contain a null string.
   *
   * @param  start    The start offset
   * @param  len      The length of the substring
   * @param  segment  The segment
   */
  public final void getText(int start, int len, Segment segment) {
    try {
      document.getText(start, len, segment);
    }
    catch (BadLocationException bl) {
      segment.offset = segment.count = 0;
    }
  }


  /**
   *  Returns the text on the specified line.
   *
   * @param  lineIndex  The line
   * @return            The text, or null if the line is invalid
   */
  public final String getLineText(int lineIndex) {
    int start = getLineStartOffset(lineIndex);
    return getText(start, getLineEndOffset(lineIndex) - start - 1);
  }


  /**
   *  Copies the text on the specified line into a segment. If the line is
   *  invalid, the segment will contain a null string.
   *
   * @param  lineIndex  The line
   * @param  segment    Description of Parameter
   */
  public final void getLineText(int lineIndex, Segment segment) {
    int start = getLineStartOffset(lineIndex);
    getText(start, getLineEndOffset(lineIndex) - start - 1, segment);
  }


  /**
   *  Returns the selection start offset.
   *
   * @return    The SelectionStart value
   */
  public final int getSelectionStart() {
    return selectionStart;
  }


  /**
   *  Returns the selection start line.
   *
   * @return    The SelectionStartLine value
   */
  public final int getSelectionStartLine() {
    return selectionStartLine;
  }


  /**
   *  Returns the selection end offset.
   *
   * @return    The SelectionEnd value
   */
  public final int getSelectionEnd() {
    return selectionEnd;
  }


  /**
   *  Returns the selection end line.
   *
   * @return    The SelectionEndLine value
   */
  public final int getSelectionEndLine() {
    return selectionEndLine;
  }


  /**
   *  Returns the caret position. This will either be the selection start or
   *  the selection end, depending on which direction the selection was made
   *  in.
   *
   * @return    The CaretPosition value
   */
  public final int getCaretPosition() {
    return (biasLeft ? selectionStart : selectionEnd);
  }


  /**
   *  Returns the caret line.
   *
   * @return    The CaretLine value
   */
  public final int getCaretLine() {
    return (biasLeft ? selectionStartLine : selectionEndLine);
  }


  /**
   *  Returns the mark position. This will be the opposite selection bound to
   *  the caret position.
   *
   * @return    The MarkPosition value
   * @see       #getCaretPosition()
   */
  public final int getMarkPosition() {
    return (biasLeft ? selectionEnd : selectionStart);
  }


  /**
   *  Returns the mark line.
   *
   * @return    The MarkLine value
   */
  public final int getMarkLine() {
    return (biasLeft ? selectionEndLine : selectionStartLine);
  }


  /**
   *  Returns the selected text, or null if no selection is active.
   *
   * @return    The SelectedText value
   */
  public final String getSelectedText() {
    if (selectionStart == selectionEnd) {
      return null;
    }
    return getText(selectionStart,
      selectionEnd - selectionStart);
  }


  /**
   *  Returns true if this text area is editable, false otherwise.
   *
   * @return    The Editable value
   */
  public final boolean isEditable() {
    return editable;
  }


  /**
   *  Returns the right click popup menu.
   *
   * @return    The RightClickPopup value
   */
  public final JPopupMenu getRightClickPopup() {
    return popup;
  }


  /**
   *  Returns the `magic' caret position. This can be used to preserve the
   *  column position when moving up and down lines.
   *
   * @return    The MagicCaretPosition value
   */
  public final int getMagicCaretPosition() {
    return magicCaret;
  }


  /**
   *  Returns true if overwrite mode is enabled, false otherwise.
   *
   * @return    The OverwriteEnabled value
   */
  public final boolean isOverwriteEnabled() {
    return overwrite;
  }


  /**
   *  Returns the position of the highlighted bracket (the bracket matching
   *  the one before the caret)
   *
   * @return    The BracketPosition value
   */
  public final int getBracketPosition() {
    return bracketPosition;
  }


  /**
   *  Returns the line of the highlighted bracket (the bracket matching the
   *  one before the caret)
   *
   * @return    The BracketLine value
   */
  public final int getBracketLine() {
    return bracketLine;
  }


  /**
   *  Sets the number of lines from the top and bottom of the text area that
   *  are always visible
   *
   * @param  electricScroll  The number of lines always visible from the top
   *      or bottom
   */
  public final void setElectricScroll(int electricScroll) {
    this.electricScroll = electricScroll;
  }


  /**
   *  Sets the document's token marker. Equivalent to caling <code>getDocument().setTokenMarker()</code>
   *  .
   *
   * @param  tokenMarker  The token marker

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品国模大尺度视频| 欧美韩日一区二区三区| 国产精品超碰97尤物18| 日韩av中文字幕一区二区| www.av亚洲| 久久理论电影网| 日韩电影免费在线| 日本国产一区二区| 国产精品乱码人人做人人爱 | 久久综合五月天婷婷伊人| 亚洲永久免费视频| gogogo免费视频观看亚洲一| 精品剧情v国产在线观看在线| 亚洲va韩国va欧美va精品| 不卡一二三区首页| 久久久精品免费网站| 日韩av不卡一区二区| 在线观看日韩毛片| 中文字幕在线观看一区二区| 国产在线精品一区二区不卡了 | 99久久99久久综合| 国产亚洲精品中文字幕| 久久激五月天综合精品| 欧美日韩aaaaa| 亚洲主播在线观看| 91在线精品秘密一区二区| 国产欧美视频在线观看| 精品一区二区三区不卡| 日韩欧美视频一区| 蜜臀久久久99精品久久久久久| 欧美日韩在线三区| 亚洲一区二区在线观看视频| 91亚洲精品久久久蜜桃网站| 国产精品―色哟哟| 丁香五精品蜜臀久久久久99网站| 精品久久国产97色综合| 日韩精品亚洲专区| 91麻豆精品国产91久久久久久| 亚洲另类在线一区| 日本电影亚洲天堂一区| 一区二区三区在线视频播放| 91成人网在线| 亚洲一区精品在线| 精品1区2区3区| 日韩中文字幕亚洲一区二区va在线| 欧美伊人久久久久久午夜久久久久| 亚洲午夜久久久久中文字幕久| 在线一区二区三区四区五区 | 一区二区国产盗摄色噜噜| 91视视频在线观看入口直接观看www | 亚洲最色的网站| 在线免费不卡电影| 香港成人在线视频| 日韩视频免费观看高清完整版| 日本强好片久久久久久aaa| 欧美一区二区三区在线视频| 青青草成人在线观看| 亚洲精品一区在线观看| 激情综合五月天| 中文在线一区二区 | 日本免费在线视频不卡一不卡二| 制服.丝袜.亚洲.另类.中文| 久久精品国产亚洲一区二区三区| 精品国免费一区二区三区| 国产馆精品极品| 中文字幕一区二区三区乱码在线| 日本精品裸体写真集在线观看 | 国产精品毛片大码女人| 色妞www精品视频| 丝袜美腿亚洲一区二区图片| 欧美成人三级电影在线| 高清成人免费视频| 亚洲卡通动漫在线| 91精品国产91久久综合桃花 | 亚洲高清中文字幕| 日韩一区二区三| 成人综合在线视频| 亚洲一区二区三区免费视频| 欧美成人乱码一区二区三区| 国产69精品久久99不卡| 亚洲午夜电影网| 亚洲精品一线二线三线| 91免费观看视频| 日韩精品色哟哟| 国产精品丝袜在线| 欧美视频精品在线观看| 久久精品av麻豆的观看方式| 国产精品区一区二区三| 欧美色倩网站大全免费| 韩国精品久久久| 一区二区在线观看免费| 日韩一级完整毛片| a级高清视频欧美日韩| 午夜久久久久久久久| 久久久九九九九| 欧美日韩电影在线| 国产精品1区二区.| 亚洲不卡av一区二区三区| 国产亚洲成年网址在线观看| 欧美日韩国产三级| 国产成人鲁色资源国产91色综| 亚洲成在人线免费| 国产欧美一区二区三区在线看蜜臀| 在线一区二区三区四区| 国产成人亚洲综合a∨婷婷| 亚洲精品亚洲人成人网在线播放| 亚洲精品一区二区三区精华液| 在线观看不卡一区| 国产乱对白刺激视频不卡| 亚洲资源中文字幕| 国产精品三级av在线播放| 91精品综合久久久久久| 91影视在线播放| 国产精品一区二区在线观看不卡| 亚洲成a人v欧美综合天堂下载| 国产精品久久久久久久久免费相片| 91精品国产色综合久久ai换脸 | 国产一区二区影院| 午夜电影网一区| 自拍偷拍欧美精品| 久久精品人人爽人人爽| 欧美高清性hdvideosex| 99re这里只有精品首页| 国产精品一品二品| 日本va欧美va精品| 亚洲高清在线视频| 亚洲男人的天堂在线aⅴ视频 | 欧美影视一区在线| av一区二区三区在线| 国产一区二区三区久久悠悠色av| 午夜一区二区三区在线观看| 亚洲欧美视频在线观看视频| 国产视频一区二区在线观看| 日韩精品一区二区三区四区视频| 欧美日韩亚洲高清一区二区| 日本高清无吗v一区| 99这里只有精品| 成人午夜精品在线| 国产精品一区二区在线观看不卡| 另类的小说在线视频另类成人小视频在线 | 欧美一区二区三区视频在线| 欧美人体做爰大胆视频| 日本精品一区二区三区四区的功能| 99视频在线观看一区三区| 国产成人午夜视频| 国产福利91精品一区二区三区| 久久不见久久见免费视频1| 日本伊人色综合网| 日本vs亚洲vs韩国一区三区| 日本亚洲电影天堂| 日韩在线一区二区| 日韩影院免费视频| 日韩av一区二区三区| 日韩av在线免费观看不卡| 日韩在线a电影| 男女性色大片免费观看一区二区 | 日本成人在线不卡视频| 日韩经典一区二区| 日韩国产欧美视频| 日韩avvvv在线播放| 蜜臀a∨国产成人精品| 日本aⅴ亚洲精品中文乱码| 日本成人中文字幕| 久久爱www久久做| 国产精品综合在线视频| 国产精品一区二区在线观看不卡| 国产黄色精品视频| 成人精品电影在线观看| 99久久久久久| 在线看国产一区二区| 欧美丝袜丝交足nylons| 欧美三级电影精品| 欧美精品日日鲁夜夜添| 91精品久久久久久蜜臀| 91精品国产欧美一区二区| 精品99一区二区| 国产免费观看久久| 亚洲女与黑人做爰| 天天影视色香欲综合网老头| 蜜臀精品久久久久久蜜臀| 国产精品亚洲一区二区三区在线 | 蜜臀av亚洲一区中文字幕| 国产一区二区三区四区五区美女| 成人免费视频播放| 日本高清不卡aⅴ免费网站| 欧美美女一区二区在线观看| 精品国产伦一区二区三区免费| 欧美激情艳妇裸体舞| 亚洲精品老司机| 日本免费新一区视频| 国产很黄免费观看久久| 日本电影欧美片| 精品日韩av一区二区| 国产精品久久久久久久第一福利| 一区二区激情小说| 极品销魂美女一区二区三区| av不卡在线观看| 国产精品色哟哟网站| 亚洲一区二区三区在线| 亚洲欧美欧美一区二区三区|