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

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

?? xlist.java

?? 借的別人的 只想在這里下點東西
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
package at.ac.uni_linz.tk.vchat;

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.text.*;


/************************************************************************
 * A XList offers a list with extended functionality, such as
 * changing columns' width dynamically, formating text, forcing
 * line breaks, etc.
 *
 * @author      Arno Huetter
 * (C)opyright by the Institute for Computer Science, Telecooperation Department, University of Linz
 ************************************************************************/

public class XList extends Panel implements MouseListener, MouseMotionListener, KeyListener, AdjustmentListener {

  private static final int VERTICAL_CELL_SPACING = 2;
  private static final int HORIZONTAL_CELL_SPACING = 4;
  private static final int MINIMUM_COLUMNWIDTH = 30;
  private static final int MINIMUM_VISIBLELINES = 4;

  public static final int LEFT = 0;
  public static final int RIGHT = 1;
  public static final int FLOW = 2;

  private static final int SCROLLBAR_WIDTH = 16;

  private Vector vecContent[], vecKey, vecColor;
  private Scrollbar scbBar;
  private int iNrOfColumns, iSelectedRow, iNrOfLines, iFirstVisibleLine, iNrOfVisibleLines,  iColumnDraggedX, iColumnSeparator, iSortCriteria;
  private Font fntFont;
  private int iColumnWidth[], iColumnOrientation[], iNrOfLinesPerRow[], iNrOfLinesUntilRow[];
  private String strColumnHeader[];
  private boolean bSelectable, bSorted;

  private Image imgBuffer;


 /************************************************************************
  * Creates a new XList.
  * @param iNrOfColumnsParam           the number of columns
  ************************************************************************/

  public XList(int iNrOfColumnsParam) {
    fntFont = ChatRepository.FIXED_FONT;
    iNrOfColumns = Math.max(iNrOfColumnsParam, 1);
    iNrOfVisibleLines = MINIMUM_VISIBLELINES;

    iFirstVisibleLine = 0;
    bSelectable = true;
    bSorted = false;
    iSortCriteria = 0;
    iSelectedRow = 0;

    vecContent = new Vector[iNrOfColumns];
    vecKey = new Vector();
    vecColor = new Vector();
    strColumnHeader = new String[iNrOfColumns];
    iColumnOrientation = new int[iNrOfColumns];
    iColumnWidth = new int[iNrOfColumns];
    for (int i = 0; i < iNrOfColumns; i++) {
      vecContent[i] = new Vector();
      strColumnHeader[i] = "";
      iColumnOrientation[i] = FLOW;
    }

    scbBar = new Scrollbar(Scrollbar.VERTICAL, 0, 0, 0, 0);
    setLayout(new BorderLayout());
    add("East", scbBar);

    addMouseListener(this);
    addMouseMotionListener(this);
    addKeyListener(this);
    scbBar.addAdjustmentListener(this);

    setSize(getCalculatedSize());
  }


  /************************************************************************
   * Sets the header for each column.
   * @param strColumnHeaderParam      an array of Strings which contains
   *                                  the headers
   ************************************************************************/

  public void setColumnHeaders(String strColumnHeaderParam[]) {
    if (strColumnHeaderParam.length == iNrOfColumns) {
      strColumnHeader = strColumnHeaderParam;
    }
    repaint();
  }


  /************************************************************************
   * Sets the width for each column.
   * @param iColumnWidthParam      an array of integers which contains
   *                               the widths
   ************************************************************************/

  public void setColumnWidths(int iColumnWidthParam[]) {
    if (iColumnWidthParam.length == iNrOfColumns) {
      iColumnWidth = iColumnWidthParam;
    }
    setSize(getCalculatedSize());
  }


  /************************************************************************
   * Sets the orientation for each column.
   * @param iColumnOrientationParam      an array of integers which
   *                                     contains the orientations (must be
   *                                     XList.LEFT, XList.RIGHT or
   *                                     XList.FLOW)
   ************************************************************************/

  public void setColumnOrientations(int iColumnOrientationParam[]) {
    if (iColumnOrientationParam.length == iNrOfColumns) {
      iColumnOrientation = iColumnOrientationParam;
    }
    repaint();
  }


  /************************************************************************
   * Clears the XList.
   ************************************************************************/

  public synchronized void clear() {
    for (int i = 0; i < iNrOfColumns; i++) {
      vecContent[i] = new Vector();
    }
    vecKey = new Vector();
    vecColor = new Vector();
    iNrOfLines = 0;
    iFirstVisibleLine = 0;
    iSelectedRow = 0;
    repaint();
  }


  /************************************************************************
   * Sets the text for a certain cell.
   * @param iRowParam            the index of the cell's row
   * @param iColumnParam         the index of the cell's column
   * @param strContentParam      the new cell text
   ************************************************************************/

  public synchronized void setCellText(int iRowParam, int iColumnParam, String strContentParam) {
    if (iRowParam < getNrOfRows() && iColumnParam < iNrOfColumns) {
      vecContent[iColumnParam].removeElementAt(iRowParam);
      vecContent[iColumnParam].insertElementAt(strContentParam, iRowParam);
      repaint();
    }
  }


  /************************************************************************
   * Returns the text of a certain cell.
   * @param iRowParam            the index of the cell's row
   * @param iColumnParam         the index of the cell's column
   ************************************************************************/

  public synchronized String getCellText(int iRowParam, int iColumnParam) {
    if (iRowParam < getNrOfRows() && iColumnParam < iNrOfColumns) {
      return (String)vecContent[iColumnParam].elementAt(iRowParam);
    }
    else {
      return "";
    }
  }


  /************************************************************************
   * Sets the text Color for a certain row.
   * @param iRowParam      the index of the cell's row
   * @param colParam       the Color to be used
   ************************************************************************/

  public synchronized void setRowColor(int iRowParam, Color colParam) {
    if (iRowParam < getNrOfRows()) {
      vecColor.setElementAt(colParam, iRowParam);
      repaint();
    }
  }


  /************************************************************************
   * Adds a row at the bottom of the XList.
   * @param strRowParam      an array of Strings which contains each cell's
   *                         text
   ************************************************************************/

  public synchronized void addRow(String strRowParam[]) {
    addRow(strRowParam, -1, Color.black);
  }


  /************************************************************************
   * Adds a row at the bottom of the XList.
   * @param strRowParam      an array of Strings which contains each cell's
   *                         text
   * @param iKeyParam        an int value working as an index key for the
   *                         row
   * @param colParam         the text Color of the row
   ************************************************************************/

  public synchronized void addRow(String strRowParam[], int iKeyParam, Color colParam) {
    if (strRowParam.length == iNrOfColumns) {
      if (bSorted) {
        addSortedRow(strRowParam, iKeyParam, colParam);
      }
      else {
        for (int i = 0; i < iNrOfColumns; i++) {
          vecContent[i].addElement(strRowParam[i]);
        }
        vecKey.addElement(new Integer(iKeyParam));
        vecColor.addElement(colParam);
      }
      repaint();
    }
  }


  /************************************************************************
   * Adds a row at its sorted index.
   * @param strRowParam      an array of Strings which contains each cell's
   *                         text
   * @param iKeyParam        an int value working as an index key for the
   *                         row
   * @param colParam         the text Color of the row
   ************************************************************************/

  private synchronized void addSortedRow(String strRowParam[], int iKeyParam, Color colParam) {
    int iIndex;
    iIndex = getSortedRowIndex(strRowParam[iSortCriteria]);

    for (int i = 0; i < iNrOfColumns; i++) {
      vecContent[i].insertElementAt(strRowParam[i], iIndex);
    }
    vecKey.insertElementAt(new Integer(iKeyParam), iIndex);
    vecColor.insertElementAt(colParam, iIndex);
    repaint();
  }


  /************************************************************************
   * Returns the row-index of a certain text depending on the XList's
   * sorting criteria.
   * @param strParam      the text to be indexed
   ************************************************************************/

  private synchronized int getSortedRowIndex(String strParam) {
    Collator collator;
    collator = Collator.getInstance();
    for (int i = 0; i < getNrOfRows(); i++) {
      if (collator.compare((String)vecContent[iSortCriteria].elementAt(i), strParam) > 0) {
        return i;
      }
    }
    return getNrOfRows();
  }


  /************************************************************************
   * Returns the key value of a certain row.
   * @param iRowParam      the index of the row
   ************************************************************************/

  public synchronized int getKey(int iRowParam) {
    return ((Integer)vecKey.elementAt(iRowParam)).intValue();
  }


  /************************************************************************
   * Returns the number of rows.
   ************************************************************************/

  public synchronized int getNrOfRows() {
    return vecContent[0].size();
  }


  /************************************************************************
   * Returns the index of the currently selected row. Will be -1 in case
   * the XList is marked as being unselectable.
   ************************************************************************/

  public synchronized int getSelectedRow() {
    return iSelectedRow;
  }


  /************************************************************************
   * Determines wheter items of the BXList can be selected or not.
   *
   * @param bSelectableParam      true if items should be selectable, false
   *                              if not
   ************************************************************************/

  public void setSelectable(boolean bSelectableParam) {
    bSelectable = bSelectableParam;
    repaint();
  }


  /************************************************************************
   * Determines wheter the XList should be sorted or not.
   *
   * @param bSortedParam      true if the XList should be sorted, false if
   *                          not
   ************************************************************************/

  public void setSorted(boolean bSortedParam) {
    bSorted = bSortedParam;
  }


  /************************************************************************
   * Returns the BXList's preferred size.
   ************************************************************************/

  public Dimension getPreferredSize() {
    return getCalculatedSize();
  }


  /************************************************************************
   * Returns the BXList's minimum size.
   ************************************************************************/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩欧美亚洲国产精品字幕久久久| 欧美色图在线观看| 天天影视色香欲综合网老头| 日本一区二区免费在线| 精品日韩在线一区| 6080国产精品一区二区| 欧美日韩三级一区二区| 欧亚洲嫩模精品一区三区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 激情国产一区二区| 九色|91porny| 国产成人午夜99999| 国内精品第一页| 国产成人午夜片在线观看高清观看| 精品一区二区三区免费| 黄页视频在线91| 国内成人精品2018免费看| 国产在线精品免费av| 国产一区二区美女诱惑| 成人性生交大片免费看视频在线 | 极品瑜伽女神91| 国内精品伊人久久久久av影院| 国产美女精品一区二区三区| 国产精品白丝av| 91麻豆123| 欧美日韩aaa| 久久久久久日产精品| 国产精品麻豆欧美日韩ww| 一区二区三区在线免费播放 | 欧洲一区在线观看| 日韩亚洲电影在线| 国产丝袜欧美中文另类| 亚洲精品伦理在线| 天天色综合成人网| 国产一区美女在线| 色综合久久天天| 日韩视频在线你懂得| 国产精品素人视频| 午夜精品影院在线观看| 国产在线播精品第三| 色94色欧美sute亚洲线路一ni| 欧美一级专区免费大片| 国产精品久久久久毛片软件| 亚洲 欧美综合在线网络| 国产精品一二三区在线| 在线观看av一区| 国产精品免费观看视频| 日韩成人av影视| 99久久精品国产导航| 日韩精品一区二区三区视频在线观看 | 国产成人精品免费一区二区| 欧日韩精品视频| 国产精品日韩精品欧美在线| 午夜精品一区在线观看| 99久久综合狠狠综合久久| 日韩精品中文字幕一区二区三区 | 亚洲色图一区二区三区| 久久国产婷婷国产香蕉| 欧日韩精品视频| 国产精品久久久久7777按摩| 精品一区二区三区在线播放| 欧美丝袜丝nylons| 亚洲视频香蕉人妖| 福利一区二区在线观看| 精品成人一区二区三区四区| 性欧美疯狂xxxxbbbb| 99久久国产综合精品女不卡| 国产婷婷色一区二区三区在线| 日本aⅴ亚洲精品中文乱码| 色噜噜狠狠成人中文综合| 国产午夜久久久久| 韩国三级电影一区二区| 欧美不卡视频一区| 蜜桃精品视频在线观看| 欧美丝袜自拍制服另类| 一区二区三区毛片| 99国产麻豆精品| 国产精品久久久久毛片软件| 国产大片一区二区| 国产午夜精品一区二区三区四区| 久久精品国产亚洲高清剧情介绍| 欧美一区二区三区视频在线| 午夜精品在线看| 日韩一区二区不卡| 经典一区二区三区| 久久久精品黄色| 国产成人精品免费| 国产精品午夜电影| jvid福利写真一区二区三区| 国产精品国产三级国产aⅴ入口| 风间由美一区二区三区在线观看 | 日韩欧美专区在线| 久久精品久久久精品美女| 日韩欧美国产综合一区 | 26uuu另类欧美| 国产一区二区三区国产| 国产午夜精品久久久久久久| 国产成人免费9x9x人网站视频| 欧美高清在线一区二区| av资源网一区| 亚洲一区二区欧美日韩| 91精品免费在线| 精品一区二区av| 国产精品女主播在线观看| 一本大道久久精品懂色aⅴ| 亚洲国产精品久久不卡毛片| 正在播放亚洲一区| 国产米奇在线777精品观看| 亚洲国产精品成人综合| 91网站在线播放| 无码av免费一区二区三区试看| 欧美日韩国产综合一区二区| 久久不见久久见免费视频1| 国产欧美日韩三级| 欧美丝袜丝交足nylons图片| 激情综合色播五月| 亚洲婷婷在线视频| 欧美人与性动xxxx| 国产99久久久国产精品潘金网站| 亚洲欧美激情在线| 日韩美女一区二区三区| 94-欧美-setu| 久久疯狂做爰流白浆xx| 亚洲少妇最新在线视频| 日韩欧美在线一区二区三区| av午夜精品一区二区三区| 日韩成人一区二区| 亚洲情趣在线观看| 精品国产欧美一区二区| 色天使久久综合网天天| 国产麻豆成人传媒免费观看| 亚洲午夜精品在线| 国产精品视频在线看| 欧美一激情一区二区三区| 色综合中文字幕国产 | 欧美日韩一区二区在线观看| 国内精品久久久久影院一蜜桃| 亚洲图片欧美视频| 国产精品久久久久四虎| www国产亚洲精品久久麻豆| 欧美精品亚洲一区二区在线播放| 成人免费av在线| 国产一区二区在线观看免费 | 欧美日韩一级二级三级| 99视频精品在线| 成人少妇影院yyyy| 国产乱码精品1区2区3区| 日本不卡免费在线视频| 亚洲在线视频免费观看| 亚洲少妇屁股交4| 国产精品国产馆在线真实露脸 | 精彩视频一区二区| 久久国产三级精品| 精品亚洲免费视频| 美女网站一区二区| 蜜桃av一区二区三区| 日本不卡中文字幕| 青草av.久久免费一区| 日韩福利视频网| 免费成人av在线播放| 免费观看成人av| 九一九一国产精品| 精品一区二区三区蜜桃| 国内成人免费视频| 国产一区二区在线观看免费| 国产在线视频精品一区| 久久精品国产99| 国产伦精品一区二区三区免费迷 | 久久久99精品免费观看| 久久精品欧美一区二区三区不卡 | 国产成人高清在线| 成人网页在线观看| 色婷婷av一区二区三区之一色屋| 色哟哟国产精品免费观看| 欧洲视频一区二区| 91精品国产色综合久久| 精品国产欧美一区二区| 日本一区二区免费在线观看视频| 亚洲欧美影音先锋| 亚洲国产日韩av| 久久国产尿小便嘘嘘| 高清国产午夜精品久久久久久| bt7086福利一区国产| 欧美亚洲丝袜传媒另类| 日韩一级片网址| 国产欧美精品一区二区色综合| 中文字幕在线不卡视频| 污片在线观看一区二区| 国产精品一品视频| 欧美在线色视频| 欧美一级高清片在线观看| 国产精品视频免费| 午夜日韩在线电影| 国产精品 欧美精品| 日本道精品一区二区三区| 日韩一区二区在线免费观看| 久久精品日产第一区二区三区高清版| 亚洲人成网站影音先锋播放| 久久国产夜色精品鲁鲁99| 91在线丨porny丨国产|