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

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

?? propertysheettablemodel.java.orig

?? 精美開源Swing組件
?? ORIG
?? 第 1 頁 / 共 2 頁
字號(hào):
/**
 * L2FProd.com Common Components 7.3 License.
 *
 * Copyright 2005-2007 L2FProd.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.l2fprod.common.propertysheet;

import com.l2fprod.common.swing.ObjectTableModel;

import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;

import javax.swing.table.AbstractTableModel;

/**
 * PropertySheetTableModel. <br>
 *  
 */
public class PropertySheetTableModel
  extends AbstractTableModel
  implements PropertyChangeListener, PropertySheet, ObjectTableModel {
  public static final int NAME_COLUMN = 0;
  public static final int VALUE_COLUMN = 1;
  public static final int NUM_COLUMNS = 2;

  private PropertyChangeSupport listeners = new PropertyChangeSupport(this);
  private List model;
  private List publishedModel;
  private List properties;
  private int mode;
  private boolean sortingCategories;
  private boolean sortingProperties;
  private Comparator categorySortingComparator;
  private Comparator propertySortingComparator;

  public PropertySheetTableModel() {
    model = new ArrayList();
    publishedModel = new ArrayList();
    properties = new ArrayList();
    mode = PropertySheet.VIEW_AS_FLAT_LIST;
    sortingCategories = false;
    sortingProperties = false;
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#setProperties(com.l2fprod.common.propertysheet.Property[])
   */
  public void setProperties(Property[] newProperties) {
    // unregister the listeners from previous properties
    for (Iterator iter = properties.iterator(); iter.hasNext();) {
      Property prop = (Property) iter.next();
      prop.removePropertyChangeListener(this);
      
      Property[] subProp = prop.getSubProperties();
      if (subProp != null)
        for (int i = 0; i < subProp.length; ++i)
    	  subProp[i].removePropertyChangeListener(this);
    }

    // replace the current properties
    properties.clear();
    properties.addAll(Arrays.asList(newProperties));

    // add listeners
    for (Iterator iter = properties.iterator(); iter.hasNext();) {
      Property prop = (Property) iter.next();
      prop.addPropertyChangeListener(this);
      
      Property[] subProp = prop.getSubProperties();
      if (subProp != null)
        for (int i = 0; i < subProp.length; ++i)
    	  subProp[i].addPropertyChangeListener(this);
    }

    buildModel();
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#getProperties()
   */
  public Property[] getProperties() {
    return (Property[]) properties.toArray(new Property[properties.size()]);
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#addProperty(com.l2fprod.common.propertysheet.Property)
   */
  public void addProperty(Property property) {
    properties.add(property);
    property.addPropertyChangeListener(this);
    buildModel();
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#addProperty(int, com.l2fprod.common.propertysheet.Property)
   */
  public void addProperty(int index, Property property) {
    properties.add(index, property);
    property.addPropertyChangeListener(this);
    buildModel();
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#removeProperty(com.l2fprod.common.propertysheet.Property)
   */
  public void removeProperty(Property property) {
    properties.remove(property);
    property.removePropertyChangeListener(this);
    buildModel();
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#getPropertyCount()
   */
  public int getPropertyCount() {
    return properties.size();
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.propertysheet.PropertySheet#propertyIterator()
   */
  public Iterator propertyIterator() {
    return properties.iterator();
  }

  /**
   * Set the current mode, either {@link PropertySheet#VIEW_AS_CATEGORIES}
   * or {@link PropertySheet#VIEW_AS_FLAT_LIST}. 
   */
  public void setMode(int mode) {
    if (this.mode == mode) {
      return;
    }
    this.mode = mode;
    buildModel();
  }

  /**
   * Get the current mode, either {@link PropertySheet#VIEW_AS_CATEGORIES}
   * or {@link PropertySheet#VIEW_AS_FLAT_LIST}.
   */
  public int getMode() {
    return mode;
  }

  /* (non-Javadoc)
   * @see javax.swing.table.TableModel#getColumnClass(int)
   */
  public Class getColumnClass(int columnIndex) {
    return super.getColumnClass(columnIndex);
  }

  /* (non-Javadoc)
   * @see javax.swing.table.TableModel#getColumnCount()
   */
  public int getColumnCount() {
    return NUM_COLUMNS;
  }

  /* (non-Javadoc)
   * @see javax.swing.table.TableModel#getRowCount()
   */
  public int getRowCount() {
    return publishedModel.size();
  }

  /* (non-Javadoc)
   * @see com.l2fprod.common.swing.ObjectTableModel#getObject(int)
   */
  public Object getObject(int rowIndex) {
    return getPropertySheetElement(rowIndex);
  }

  /**
   * Get the current property sheet element, of type {@link Item}, at
   * the specified row.
   */
  public Item getPropertySheetElement(int rowIndex) {
    return (Item) publishedModel.get(rowIndex);
  }

  /**
   * Get whether this model is currently sorting categories.
   */
  public boolean isSortingCategories() {
    return sortingCategories;
  }

  /**
   * Set whether this model is currently sorting categories.
   * If this changes the sorting, the model will be rebuilt.
   */
  public void setSortingCategories(boolean value) {
    boolean old = sortingCategories;
    sortingCategories = value;
    if (sortingCategories != old)
      buildModel();
  }

  /**
   * Get whether this model is currently sorting properties.
   */
  public boolean isSortingProperties() {
    return sortingProperties;
  }

  /**
   * Set whether this model is currently sorting properties.
   * If this changes the sorting, the model will be rebuilt.
   */
  public void setSortingProperties(boolean value) {
    boolean old = sortingProperties;
    sortingProperties = value;
    if (sortingProperties != old)
      buildModel();
  }

  /**
   * Set the comparator used for sorting categories.  If this
   * changes the comparator, the model will be rebuilt.
   */
  public void setCategorySortingComparator(Comparator comp) {
    Comparator old = categorySortingComparator;
    categorySortingComparator = comp;
    if (categorySortingComparator != old)
      buildModel();
  }

  /**
   * Set the comparator used for sorting properties.  If this
   * changes the comparator, the model will be rebuilt.
   */
  public void setPropertySortingComparator(Comparator comp) {
    Comparator old = propertySortingComparator;
    propertySortingComparator = comp;
    if (propertySortingComparator != old)
      buildModel();
  }

  /**
   * Retrieve the value at the specified row and column location.
   * When the row contains a category or the column is
   * {@link #NAME_COLUMN}, an {@link Item} object will be returned.
   * If the row is a property and the column is {@link #VALUE_COLUMN},
   * the value of the property will be returned.
   * 
   * @see javax.swing.table.TableModel#getValueAt(int, int)
   */
  public Object getValueAt(int rowIndex, int columnIndex) {
    Object result = null;
    Item item = getPropertySheetElement(rowIndex);

    if (item.isProperty()) {
      switch (columnIndex) {
        case NAME_COLUMN:
          result = item;
          break;
          
        case VALUE_COLUMN:

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久爱www久久做| 七七婷婷婷婷精品国产| 成人免费观看av| 中文久久乱码一区二区| 成人免费视频caoporn| 亚洲丝袜美腿综合| 欧美午夜精品一区| 欧美aa在线视频| 久久亚区不卡日本| 国产suv精品一区二区6| 国产精品传媒在线| 欧美亚洲国产bt| 蜜桃视频在线一区| 日本一区二区三级电影在线观看 | 大美女一区二区三区| 国产日韩欧美电影| 91丨porny丨在线| 丝袜诱惑制服诱惑色一区在线观看 | 自拍偷拍国产亚洲| 69堂成人精品免费视频| 国产一区二区免费视频| 亚洲少妇最新在线视频| 日韩一区二区在线播放| 国产成人精品在线看| 一区二区三区四区国产精品| 欧美大胆人体bbbb| 成人视屏免费看| 日本一区中文字幕| 日本一区二区三区四区在线视频| 欧美午夜不卡视频| 国产一区在线看| 亚洲自拍偷拍综合| 久久久777精品电影网影网| 91国偷自产一区二区开放时间| 日韩精品欧美成人高清一区二区| 亚洲国产精品传媒在线观看| 欧美人伦禁忌dvd放荡欲情| 国产风韵犹存在线视精品| 亚洲午夜激情网页| 国产人成亚洲第一网站在线播放| 欧美亚洲日本一区| 成人免费看的视频| 久久成人综合网| 一区二区不卡在线视频 午夜欧美不卡在| 日韩三级中文字幕| 日本高清视频一区二区| 国产馆精品极品| 日本欧美一区二区| 亚洲一级二级三级| 欧美激情综合在线| 精品国产一区二区三区不卡| 99精品视频在线免费观看| 韩国欧美国产1区| 日韩二区三区在线观看| 一区二区三区美女| 中文字幕中文字幕一区二区| 2019国产精品| 日韩午夜中文字幕| 欧美精品色综合| 欧美系列在线观看| 91麻豆福利精品推荐| 国产不卡在线一区| 国产一区二区在线免费观看| 人人精品人人爱| 亚洲高清免费观看| 一级做a爱片久久| 亚洲免费av观看| 亚洲人吸女人奶水| 国产精品护士白丝一区av| 久久久久久免费网| 久久综合久久综合久久综合| 精品国产免费人成电影在线观看四季| 欧美日韩精品久久久| 欧美亚一区二区| 欧美三级乱人伦电影| 在线免费一区三区| 日本韩国欧美在线| 欧美天天综合网| 欧美日韩国产在线观看| 欧美视频一区二区| 欧美日韩免费观看一区三区| 欧美色综合影院| 欧美色网一区二区| 欧美日本一区二区三区四区 | 国产91在线|亚洲| 国产99精品在线观看| 成人福利视频在线看| 97精品超碰一区二区三区| 日本精品视频一区二区| 欧美无砖砖区免费| 日韩一二三区不卡| 久久这里只有精品首页| 国产精品美女久久久久av爽李琼| 国产精品成人免费精品自在线观看| 日韩美女啊v在线免费观看| 亚洲精品国产成人久久av盗摄| 亚洲一区二区三区影院| 午夜精品成人在线视频| 精品一区二区三区影院在线午夜 | 亚洲欧美日韩国产综合| 一区二区欧美在线观看| 性做久久久久久久久| 精品一区二区三区视频在线观看| 国产一区二区在线视频| 99久久久免费精品国产一区二区 | 日本大胆欧美人术艺术动态| 国产一区二区伦理| 99久久国产综合精品麻豆| 欧美视频日韩视频在线观看| 日韩欧美一区二区三区在线| 中文字幕精品三区| 亚洲一区二区视频在线观看| 日韩电影在线一区| 成人在线综合网| 欧美在线看片a免费观看| 精品三级av在线| 亚洲免费视频中文字幕| 久久99国产精品久久| 97精品视频在线观看自产线路二| 91精品欧美一区二区三区综合在| 欧美激情一区在线| 亚洲一区二区在线观看视频| 国产在线视频不卡二| 欧美性大战久久久久久久蜜臀 | 成人av片在线观看| 欧美群妇大交群中文字幕| 欧美激情一区二区三区| 亚洲成人午夜电影| av在线播放不卡| 久久青草欧美一区二区三区| 一区二区三区美女视频| 高清不卡一区二区在线| 欧美一区二区三区在| 综合激情成人伊人| 国产精品一区在线观看乱码 | 国产日韩三级在线| 日韩电影免费在线观看网站| 91丨porny丨首页| 久久精品欧美一区二区三区不卡 | 国产精品卡一卡二卡三| 精品亚洲成a人| 欧美日韩成人综合天天影院| 中文字幕永久在线不卡| 丰满放荡岳乱妇91ww| 欧美一级电影网站| 亚洲国产视频一区| 99久久婷婷国产综合精品| 久久先锋影音av鲁色资源网| 日韩成人免费电影| 精品视频1区2区| 亚洲精品成人少妇| 97精品视频在线观看自产线路二| 久久精品一区二区| 经典三级在线一区| 精品日本一线二线三线不卡| 免费成人结看片| 91精品国产综合久久福利软件 | 精品国产sm最大网站| 奇米四色…亚洲| 欧美一区二区三区在线看| 午夜视频在线观看一区二区| 在线观看亚洲专区| 亚洲精品久久久久久国产精华液| 成av人片一区二区| 国产精品视频一二三区| 大白屁股一区二区视频| 国产色综合一区| 国产成人精品亚洲777人妖| 久久久亚洲欧洲日产国码αv| 国精产品一区一区三区mba桃花 | 日韩一区国产二区欧美三区| 日产国产欧美视频一区精品| 欧美一区二区三区视频免费| 久久国产精品无码网站| 欧美成人高清电影在线| 精品一区二区三区久久| 国产三级一区二区| 成人国产精品免费网站| 中文字幕精品三区| 日本高清不卡在线观看| 亚洲国产一区二区a毛片| 91精品国产免费| 国产精品自拍三区| 国产亚洲一二三区| 91麻豆免费观看| 亚洲成人av中文| 精品久久久久av影院| 国产成人精品免费看| 中文字幕佐山爱一区二区免费| 91黄视频在线| 日韩电影一区二区三区四区| 久久综合色婷婷| 97精品久久久午夜一区二区三区 | 18成人在线观看| 欧美日韩色综合| 国产一区福利在线| 亚洲欧美成人一区二区三区| 欧美久久久影院| 国产高清无密码一区二区三区| 亚洲色图一区二区|