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

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

?? jcomboboxbinding.java

?? java屬性邦定的(JSR-295)的一個(gè)實(shí)現(xiàn)
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/*
 * Copyright (C) 2007 Sun Microsystems, Inc. All rights reserved. Use is
 * subject to license terms.
 */

package org.jdesktop.swingbinding;

import javax.swing.*;
import javax.swing.event.*;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import org.jdesktop.beansbinding.AutoBinding;
import org.jdesktop.beansbinding.Property;
import org.jdesktop.beansbinding.PropertyStateEvent;
import org.jdesktop.beansbinding.PropertyStateListener;
import org.jdesktop.swingbinding.impl.AbstractColumnBinding;
import org.jdesktop.swingbinding.impl.ListBindingManager;
import static org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.*;

/**
 * Binds a {@code List} of objects to act as the items of a {@code JComboBox}.
 * Each object in the source {@code List} is an item in the {@code JComboBox}.
 * Instances of {@code JComboBoxBinding} are obtained by calling one of the
 * {@code createJComboBoxBinding} methods in the {@code SwingBindings} class.
 * <p>
 * Here is an example of creating a binding from a {@code List} of {@code Country}
 * objects to a {@code JComboBox}:
 * <p>
 * <pre><code>
 *    // create the country list
 *    List<Country> countries = createCountryList();
 *
 *    // create the binding from List to JComboBox
 *    JComboBoxBinding cb = SwingBindings.createJComboBoxBinding(READ, countries, jComboBox);
 *
 *    // realize the binding
 *    cb.bind();
 * </code></pre>
 * <p>
 * If the {@code List} is an instance of {@code ObservableList}, then changes to
 * the {@code List} contents (such as adding, removing or replacing an object)
 * are reflected in the {@code JComboBox}. <b>Important:</b> Changing the contents
 * of a non-observable {@code List} while it is participating in a
 * {@code JComboBoxBinding} is unsupported, resulting in undefined behavior and
 * possible exceptions.
 * <p>
 * <a name="CLARIFICATION">{@code JComboBoxBinding} requires</a>
 * extra clarification on the operation of the
 * {@code refresh} and {@code save} methods and the meaning of the update
 * strategy. The target property of a {@code JComboBoxBinding} is not the
 * target {@code JComboBox} property provided in the constructor, but rather a
 * private synthetic property representing the {@code List} of objects to show
 * in the target {@code JComboBox}. This synthetic property is readable/writeable
 * only when the {@code JComboBoxBinding} is bound and the target {@code JComboBox}
 * property is readable with a {@code non-null} value.
 * <p>
 * It is this private synthetic property on which the {@code refresh} and
 * {@code save} methods operate; meaning that these methods simply cause syncing
 * between the value of the source {@code List} property and the value of the
 * synthetic target property (representing the {@code List} to be shown in the
 * target {@code JComboBox}). These methods do not, therefore, have anything to do
 * with refreshing <i>values</i> in the {@code JComboBox}. Likewise, the update
 * strategy, which simply controls when {@code refresh} and {@code save} are
 * automatically called, also has nothing to do with refreshing <i>values</i>
 * in the {@code JComboBox}.
 * <p>
 * <b>Note:</b> At the current time, the {@code READ_WRITE} update strategy
 * is not useful for {@code JComboBoxBinding}. To prevent unwanted confusion,
 * {@code READ_WRITE} is translated to {@code READ} by {@code JComboBoxBinding's}
 * constructor.
 * <p>
 * {@code JComboBoxBinding} works by installing a custom model on the target
 * {@code JComboBox}, as appropriate, to represent the source {@code List}. The
 * model is installed on a target {@code JComboBox} with the first succesful call
 * to {@code refresh} with that {@code JComboBox} as the target. Subsequent calls
 * to {@code refresh} update the elements in this already-installed model.
 * The model is uninstalled from a target {@code JComboBox} when either the
 * {@code JComboBoxBinding} is unbound or when the target {@code JComboBox} property
 * changes to no longer represent that {@code JComboBox}. Note: When the model is
 * uninstalled from a {@code JComboBox}, it is replaced with a {@code DefaultComboBoxModel},
 * in order to leave the {@code JComboBox} functional.
 * <p>
 * Some of the above is easier to understand with an example. Let's consider
 * a {@code JComboBoxBinding} ({@code binding}), with update strategy
 * {@code READ}, between a property representing a {@code List} ({@code listP})
 * and a property representing a {@code JComboBox} ({@code jComboBoxP}). {@code listP}
 * and {@code jComboBoxP} both start off readable, referring to a {@code non-null}
 * {@code List} and {@code non-null} {@code JComboBox} respectively. Let's look at
 * what happens for each of a sequence of events:
 * <p>
 * <table border=1>
 *   <tr><th>Sequence</th><th>Event</th><th>Result</th></tr>
 *   <tr valign="baseline">
 *     <td align="center">1</td>
 *     <td>explicit call to {@code binding.bind()}</td>
 *     <td>
 *         - synthetic target property becomes readable/writeable
 *         <br>
 *         - {@code refresh()} is called
 *         <br>
 *         - model is installed on target {@code JComboBox}, representing list of objects
 *     </td>
 *   </tr>
 *   <tr valign="baseline">
 *     <td align="center">2</td>
 *     <td>{@code listP} changes to a new {@code List}</td>
 *     <td>
 *         - {@code refresh()} is called
 *         <br>
 *         - model is updated with new list of objects
 *     </td>
 *   </tr>
 *   <tr valign="baseline">
 *     <td align="center"><a name="STEP3" href="#NOTICE">3</a></td>
 *     <td>{@code jComboBoxP} changes to a new {@code JComboBox}</td>
 *     <td>
 *         - model is uninstalled from old {@code JComboBox}
 *     </td>
 *   </tr>
 *   <tr valign="baseline">
 *     <td align="center">4</td>
 *     <td>explicit call to {@code binding.refresh()}</td>
 *     <td>
 *         - model is installed on target {@code JComboBox}, representing list of objects
 *     </td>
 *   </tr>
 *   <tr valign="baseline">
 *     <td align="center">5</td>
 *     <td>{@code listP} changes to a new {@code List}</td>
 *     <td>
 *         - {@code refresh()} is called
 *         <br>
 *         - model is updated with new list of objects
 *     </td>
 *   </tr>
 *   <tr valign="baseline">
 *     <td align="center">6</td>
 *     <td>explicit call to {@code binding.unbind()}</td>
 *     <td>
 *         - model is uninstalled from target {@code JComboBox}
 *     </td>
 *   </tr>
 * </table>
 * <p>
 * <a name="NOTICE">Notice</a> that in <a href="#STEP3">step 3</a>, when the value
 * of the {@code JComboBox} property changed, the new {@code JComboBox} did not
 * automatically get the model with the elements applied to it. A change to the
 * target value should not cause an {@code AutoBinding} to sync the target from
 * the source. Step 4 forces a sync by explicitly calling {@code refresh}.
 * Alternatively, it could be caused by any other action that results
 * in a {@code refresh} (for example, the source property changing value, or an
 * explicit call to {@code unbind} followed by {@code bind}).
 * <p>
 * In addition to binding the items of a {@code JComboBox}, it is possible to
 * bind to the selected item of a {@code JComboBox}.
 * See the list of <a href="package-summary.html#SWING_PROPS">
 * interesting swing properties</a> in the package summary for more details.
 *
 * @param <E> the type of elements in the source {@code List}
 * @param <SS> the type of source object (on which the source property resolves to {@code List})
 * @param <TS> the type of target object (on which the target property resolves to {@code JComboBox})
 *
 * @author Shannon Hickey
 */
public final class JComboBoxBinding<E, SS, TS> extends AutoBinding<SS, List<E>, TS, List> {

    private Property<TS, ? extends JComboBox> comboP;
    private ElementsProperty<TS> elementsP;
    private Handler handler = new Handler();
    private JComboBox combo;
    private BindingComboBoxModel model;

    /**
     * Constructs an instance of {@code JComboBoxBinding}.
     *
     * @param strategy the update strategy
     * @param sourceObject the source object
     * @param sourceListProperty a property on the source object that resolves to the {@code List} of elements
     * @param targetObject the target object
     * @param targetJComboBoxProperty a property on the target object that resolves to a {@code JComboBox}
     * @param name a name for the {@code JComboBoxBinding}
     * @throws IllegalArgumentException if the source property or target property is {@code null}
     */
    protected JComboBoxBinding(UpdateStrategy strategy, SS sourceObject, Property<SS, List<E>> sourceListProperty, TS targetObject, Property<TS, ? extends JComboBox> targetJComboBoxProperty, String name) {
        super(strategy == READ_WRITE ? READ : strategy,
              sourceObject, sourceListProperty, targetObject, new ElementsProperty<TS>(), name);

        if (targetJComboBoxProperty == null) {
            throw new IllegalArgumentException("target JComboBox property can't be null");
        }

        comboP = targetJComboBoxProperty;
        elementsP = (ElementsProperty<TS>)getTargetProperty();
    }

    protected void bindImpl() {
        elementsP.setAccessible(isComboAccessible());

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91免费国产在线| 97久久精品人人做人人爽50路| 国产黄人亚洲片| 欧美精品三级在线观看| 国产无一区二区| 色综合中文字幕国产| 亚洲精品成人悠悠色影视| 国产精品一区二区不卡| 中文字幕一区二区三区乱码在线| 国产精品77777| 亚洲视频一二三区| 欧美丝袜丝交足nylons| 奇米精品一区二区三区在线观看一 | 国产久卡久卡久卡久卡视频精品| 亚洲亚洲人成综合网络| 国产欧美一区二区三区在线看蜜臀 | 欧美成人综合网站| 狠狠色丁香九九婷婷综合五月| 国产精品久久久久久久久快鸭| 97se亚洲国产综合自在线不卡| 亚洲一区二区在线视频| 久久精品亚洲精品国产欧美 | 蜜臀久久99精品久久久画质超高清| 国产欧美日韩在线观看| 国产乱理伦片在线观看夜一区| 久久久精品影视| 91九色最新地址| 久久er精品视频| 依依成人综合视频| 久久精品欧美一区二区三区麻豆| 94-欧美-setu| 国产一区二区女| 亚洲成在线观看| 国产目拍亚洲精品99久久精品| 91久久久免费一区二区| 成人中文字幕合集| 日韩av一区二区在线影视| 国产精品国产三级国产aⅴ中文| 欧美日韩电影在线| 欧美性色综合网| 91免费看片在线观看| 国产乱色国产精品免费视频| 肉肉av福利一精品导航| 亚洲综合一区在线| 亚洲色图欧洲色图婷婷| 亚洲国产激情av| 久久先锋影音av| 久久久久久久久久久久电影 | 国产高清不卡一区二区| 日韩电影免费一区| 丝袜美腿亚洲一区| 婷婷丁香激情综合| 日韩在线一二三区| 美女国产一区二区| 九九精品视频在线看| 天天综合色天天综合色h| 麻豆成人91精品二区三区| 丁香啪啪综合成人亚洲小说| 激情小说欧美图片| 亚洲国产精品久久久久婷婷884 | 一区二区三区中文字幕电影| 欧美日韩国产一级二级| 粉嫩av亚洲一区二区图片| 三级成人在线视频| 亚洲丝袜美腿综合| bt7086福利一区国产| 一区二区三区四区高清精品免费观看| 91丨porny丨中文| 日本中文字幕不卡| 国产精品国产成人国产三级| 91影院在线免费观看| 色偷偷久久人人79超碰人人澡| 日韩一区二区影院| 成人教育av在线| 久久国产精品无码网站| 成人在线综合网站| 国产成人一区二区精品非洲| 在线视频国内自拍亚洲视频| 欧美日韩一区视频| 成人v精品蜜桃久久一区| 国产馆精品极品| 欧美精品第1页| 成人欧美一区二区三区1314| 丝袜诱惑亚洲看片| 国产a久久麻豆| 色哟哟一区二区在线观看| 丁香天五香天堂综合| 欧美精品精品一区| 国产精品色婷婷久久58| 午夜精品久久久久久久久久久 | 亚洲成人高清在线| 粉嫩av亚洲一区二区图片| 337p日本欧洲亚洲大胆精品| 国产99久久久久久免费看农村| 亚洲三级在线免费观看| 91老司机福利 在线| 9191成人精品久久| 成人欧美一区二区三区1314| 久久精品国产精品亚洲综合| 91麻豆免费看| 国产精品久久久久一区| 日韩一区二区高清| 成人18视频日本| 日韩精品中文字幕一区| 亚洲男帅同性gay1069| 国产精品一二三四五| 欧美精品三级在线观看| 亚洲电影第三页| 国产精品亲子伦对白| 精品久久免费看| 欧美色国产精品| 丁香婷婷综合激情五月色| 亚洲精品一区二区三区四区高清| 无码av免费一区二区三区试看| 日本久久精品电影| 天堂va蜜桃一区二区三区| 日韩欧美一区二区免费| 激情文学综合网| 精品国产乱码久久久久久久久| 久草精品在线观看| 中文字幕亚洲不卡| 91久久精品网| 国内精品伊人久久久久影院对白| 欧美精品一区二区高清在线观看 | 成人黄色电影在线| 亚洲男帅同性gay1069| 国产亚洲欧美激情| 亚洲精品一线二线三线| 一本到高清视频免费精品| 亚洲一区视频在线观看视频| 久久久综合网站| 欧美嫩在线观看| 欧美亚洲综合久久| av不卡免费电影| 国产精品亚洲第一| 美国十次了思思久久精品导航| 亚洲视频小说图片| 中文字幕亚洲成人| 中文字幕在线观看不卡| 日韩一区二区三区视频在线 | 91精品综合久久久久久| 欧洲激情一区二区| 在线精品观看国产| 欧美日韩精品高清| 欧美视频一区在线| 欧美日韩精品免费| 欧美高清视频www夜色资源网| 91免费视频大全| 欧美三级在线看| 欧美日本一道本| 日韩一区二区中文字幕| 日韩欧美视频在线| 国产午夜精品福利| 自拍偷拍亚洲欧美日韩| 国产精品对白交换视频| 一区二区三区免费在线观看| 日韩伦理电影网| 亚洲一区二区三区四区在线观看| 亚洲精品乱码久久久久久| 一级女性全黄久久生活片免费| 一区二区三区日韩欧美精品 | 欧美aaaaaa午夜精品| 亚洲成人免费视频| 久久99精品一区二区三区三区| 精品一区二区三区香蕉蜜桃| 国产一区二区三区观看| 99久久国产综合精品麻豆| 欧美日韩精品一区二区三区蜜桃| 日韩色在线观看| 国产精品初高中害羞小美女文| 一区二区三区 在线观看视频| 久久精品久久久精品美女| 成人高清在线视频| 日韩精品在线一区二区| 亚洲激情一二三区| 福利电影一区二区三区| 91精品一区二区三区在线观看| 国产亚洲福利社区一区| 亚洲成精国产精品女| a亚洲天堂av| 久久综合九色综合欧美98| 亚洲观看高清完整版在线观看 | 亚洲日本一区二区三区| 成人性视频免费网站| 欧美在线999| 亚洲人成精品久久久久| 国产精品一区二区91| 日韩免费视频一区二区| 天堂午夜影视日韩欧美一区二区| 99久久综合狠狠综合久久| 国产精品蜜臀av| 黄色日韩网站视频| 精品久久久久久久久久久久包黑料 | 日韩理论电影院| av色综合久久天堂av综合| 亚洲人成人一区二区在线观看| 国产精品一区二区三区99| 久久午夜色播影院免费高清| 极品美女销魂一区二区三区| 欧美va亚洲va在线观看蝴蝶网|