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

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

?? jlistbinding.java

?? java屬性邦定的(JSR-295)的一個實現
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:

    private boolean isListAccessible(Object value) {
        return value != null && value != PropertyStateEvent.UNREADABLE;
    }

    private void cleanupForLast() {
        if (list == null) {
            return;
        }

        resetListSelection();
        list.setModel(new DefaultListModel());
        list = null;
        model.setElements(null, true);
        model = null;
    }
    
    /**
     * Creates a {@code DetailBinding} and sets it as the {@code DetailBinding}
     * for this {@code JListBinding}. A {@code DetailBinding} specifies the property
     * of the objects in the source {@code List} to be used as the elements of the
     * {@code JList}. If the {@code detailProperty} parameter is {@code null}, the
     * {@code DetailBinding} specifies that the objects themselves be used.
     *
     * @param detailProperty the property with which to derive each list value
     *        from its corresponding object in the source {@code List}
     * @return the {@code DetailBinding}
     */
    public DetailBinding setDetailBinding(Property<E, ?> detailProperty) {
        return setDetailBinding(detailProperty, null);
    }

    /**
     * Creates a named {@code DetailBinding} and sets it as the {@code DetailBinding}
     * for this {@code JListBinding}. A {@code DetailBinding} specifies the property
     * of the objects in the source {@code List} to be used as the elements of the
     * {@code JList}. If the {@code detailProperty} parameter is {@code null}, the
     * {@code DetailBinding} specifies that the objects themselves be used.
     *
     * @param detailProperty the property with which to derive each list value
     *        from its corresponding object in the source {@code List}
     * @return the {@code DetailBinding}
     */
    public DetailBinding setDetailBinding(Property<E, ?> detailProperty, String name) {
        throwIfBound();

        if (name == null && JListBinding.this.getName() != null) {
            name = JListBinding.this.getName() + ".DETAIL_BINDING";
        }

        detailBinding = detailProperty == null ?
                        new DetailBinding(ObjectProperty.<E>create(), name) :
                        new DetailBinding(detailProperty, name);
        return detailBinding;
    }

    /**
     * Returns the {@code DetailBinding} for this {@code JListBinding}.
     * A {@code DetailBinding} specifies the property of the source {@code List} elements
     * to be used as the elements of the {@code JList}.
     *
     * @return the {@code DetailBinding}
     * @see #setDetailBinding(Property, String)
     */
    public DetailBinding getDetailBinding() {
        return detailBinding;
    }

    private final Property DETAIL_PROPERTY = new Property() {
        public Class<Object> getWriteType(Object source) {
            return Object.class;
        }

        public Object getValue(Object source) {
            throw new UnsupportedOperationException();
        }

        public void setValue(Object source, Object value) {
            throw new UnsupportedOperationException();
        }

        public boolean isReadable(Object source) {
            throw new UnsupportedOperationException();
        }

        public boolean isWriteable(Object source) {
            return true;
        }

        public void addPropertyStateListener(Object source, PropertyStateListener listener) {
            throw new UnsupportedOperationException();
        }

        public void removePropertyStateListener(Object source, PropertyStateListener listener) {
            throw new UnsupportedOperationException();
        }

        public PropertyStateListener[] getPropertyStateListeners(Object source) {
            throw new UnsupportedOperationException();
        }
    };

    /**
     * {@code DetailBinding} represents a binding between a property of the elements
     * in the {@code JListBinding's} source {@code List}, and the values shown in
     * the {@code JList}. Values in the {@code JList} are aquired by fetching the
     * value of the {@code DetailBinding's} source property for the associated object
     * in the source {@code List}.
     * <p>
     * A {@code Converter} may be specified on a {@code DetailBinding}. Specifying a
     * {@code Validator} is also possible, but doesn't make sense since {@code JList}
     * values aren't editable.
     * <p>
     * {@code DetailBindings} are managed by their {@code JListBinding}. They are not
     * to be explicitly bound, unbound, added to a {@code BindingGroup}, or accessed
     * in a way that is not allowed for a managed binding.
     *
     * @see org.jdesktop.swingbinding.JListBinding#setDetailBinding(Property, String)
     */
    public final class DetailBinding extends AbstractColumnBinding {

        private DetailBinding(Property<E, ?> detailProperty, String name) {
            super(0, detailProperty, DETAIL_PROPERTY, name);
        }

    }

    private class Handler implements PropertyStateListener {
        public void propertyStateChanged(PropertyStateEvent pse) {
            if (!pse.getValueChanged()) {
                return;
            }

            if (pse.getSourceProperty() == listP) {
                cleanupForLast();
                
                boolean wasAccessible = isListAccessible(pse.getOldValue());
                boolean isAccessible = isListAccessible(pse.getNewValue());

                if (wasAccessible != isAccessible) {
                    elementsP.setAccessible(isAccessible);
                } else if (elementsP.isAccessible()) {
                    elementsP.setValueAndIgnore(null, null);
                }
            } else {
                if (((ElementsProperty.ElementsPropertyStateEvent)pse).shouldIgnore()) {
                    return;
                }

                if (list == null) {
                    list = listP.getValue(getTargetObject());
                    resetListSelection();
                    model = new BindingListModel();
                    list.setModel(model);
                } else {
                    resetListSelection();
                }

                model.setElements((List)pse.getNewValue(), true);
            }
        }
    }

    private void resetListSelection() {
        ListSelectionModel selectionModel = list.getSelectionModel();
        selectionModel.setValueIsAdjusting(true);
        selectionModel.clearSelection();
        selectionModel.setAnchorSelectionIndex(-1);
        selectionModel.setLeadSelectionIndex(-1);
        selectionModel.setValueIsAdjusting(false);
    }
    
    private final class BindingListModel extends ListBindingManager implements ListModel  {
        private final List<ListDataListener> listeners;

        public BindingListModel() {
            listeners = new CopyOnWriteArrayList<ListDataListener>();
        }

        protected AbstractColumnBinding[] getColBindings() {
            return new AbstractColumnBinding[] {getDetailBinding()};
        }

        protected void allChanged() {
            contentsChanged(0, size());
        }

        protected void valueChanged(int row, int column) {
            contentsChanged(row, row);
        }

        protected void added(int index, int length) {
            assert length > 0; // enforced by ListBindingManager

            ListDataEvent e = new ListDataEvent(this, ListDataEvent.INTERVAL_ADDED, index, index + length - 1);
            for (ListDataListener listener : listeners) {
                listener.intervalAdded(e);
            }
        }

        protected void removed(int index, int length) {
            assert length > 0; // enforced by ListBindingManager

            ListDataEvent e = new ListDataEvent(this, ListDataEvent.INTERVAL_REMOVED, index, index + length - 1);
            for (ListDataListener listener : listeners) {
                listener.intervalRemoved(e);
            }
        }

        protected void changed(int row) {
            contentsChanged(row, row);
        }

        private void contentsChanged(int row0, int row1) {
            ListDataEvent e = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, row0, row1);
            for (ListDataListener listener : listeners) {
                listener.contentsChanged(e);
            }
        }

        public Object getElementAt(int index) {
            return valueAt(index, 0);
        }

        public void addListDataListener(ListDataListener l) {
            listeners.add(l);
        }

        public void removeListDataListener(ListDataListener l) {
            listeners.remove(l);
        }

        public int getSize() {
            return size();
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色哟哟日韩精品| 欧美一区二区三区人| 成人激情校园春色| 国产精品1区2区3区| 国产一区二区三区在线观看精品| 日本不卡一二三| 日本中文字幕一区二区视频| 免费日韩伦理电影| 国产在线一区二区| 国产综合久久久久久鬼色| 国产毛片精品视频| 丁香网亚洲国际| 99精品久久只有精品| 一本久久a久久免费精品不卡| 91一区二区三区在线播放| 91视频xxxx| 欧美日韩一区二区三区不卡| 欧美精选一区二区| 日韩免费在线观看| 久久久99精品免费观看不卡| 欧美国产1区2区| 亚洲另类中文字| 性做久久久久久免费观看| 美女视频黄 久久| 精品一区二区av| 不卡一区在线观看| 欧美在线视频不卡| 精品日韩在线观看| 欧美国产日本视频| 一区二区在线电影| 婷婷亚洲久悠悠色悠在线播放 | 国产呦精品一区二区三区网站| 国内一区二区在线| 91蝌蚪porny| 欧美日韩亚洲高清一区二区| 精品奇米国产一区二区三区| 国产精品久久久久aaaa| 一区二区三区高清不卡| 蜜臀av一区二区在线免费观看 | 精品成人免费观看| 亚洲国产精品v| 亚洲福利一二三区| 国产九九视频一区二区三区| 91色视频在线| 日韩精品一区二区三区中文不卡| 国产女同性恋一区二区| 艳妇臀荡乳欲伦亚洲一区| 久久se这里有精品| av成人老司机| 日韩精品自拍偷拍| 亚洲免费看黄网站| 国内偷窥港台综合视频在线播放| 色综合久久久久久久| 欧美成人在线直播| 亚洲欧美日韩电影| 精品一二三四在线| 欧美日韩小视频| 中文字幕第一页久久| 青青国产91久久久久久 | 久久日韩精品一区二区五区| 亚洲麻豆国产自偷在线| 精品一区二区在线免费观看| 色狠狠综合天天综合综合| 久久综合一区二区| 午夜精品在线看| 99re免费视频精品全部| 欧美tickling网站挠脚心| 亚洲一二三四在线观看| 国产成人免费在线观看不卡| 欧美一区三区四区| 亚洲精品日韩综合观看成人91| 国产一区二区精品久久| 777午夜精品免费视频| 亚洲品质自拍视频网站| 韩国欧美国产1区| 91麻豆精品久久久久蜜臀| 亚洲精品高清视频在线观看| 国产999精品久久久久久| 欧美一区二区在线不卡| 亚洲综合男人的天堂| www.日本不卡| 国产女同性恋一区二区| 久久狠狠亚洲综合| 欧美疯狂做受xxxx富婆| 亚洲综合在线电影| 91影视在线播放| 中文字幕一区二区三区不卡| 国产精品乡下勾搭老头1| 日韩欧美中文字幕公布| 五月天一区二区| 欧美日韩不卡一区二区| 亚洲综合色噜噜狠狠| a级精品国产片在线观看| 久久婷婷色综合| 狠狠久久亚洲欧美| 日韩免费观看高清完整版| 免费看日韩精品| 91精品国产综合久久精品 | 97久久人人超碰| 国产精品美日韩| 成人伦理片在线| 国产精品毛片久久久久久 | 国产欧美日韩在线| 国产精品系列在线播放| 久久精品国产一区二区三 | 91蜜桃网址入口| 中文字幕电影一区| 成人午夜视频免费看| 久久久美女毛片| 国产91精品露脸国语对白| 国产精品免费视频观看| 成人激情av网| 亚洲视频在线观看一区| 色狠狠色狠狠综合| 亚洲图片有声小说| 欧美午夜电影在线播放| 亚洲国产精品精华液网站| 欧美日韩在线播放三区四区| 亚瑟在线精品视频| 精品久久五月天| 高清不卡在线观看| 亚洲女同女同女同女同女同69| 在线亚洲高清视频| 天天操天天色综合| 精品国产99国产精品| 国产aⅴ综合色| 亚洲欧美日韩系列| 欧美日韩一区二区在线观看| 蜜臀a∨国产成人精品| 精品国产乱子伦一区| 国产精品99久| 亚洲精品国产一区二区精华液| 欧美影院一区二区三区| 日本一区中文字幕| 久久久久国产精品人| a在线欧美一区| 天天影视色香欲综合网老头| 精品国内片67194| 91在线观看美女| 亚洲成av人片一区二区| 2023国产精品| 91免费观看国产| 精一区二区三区| 亚洲美女屁股眼交| 日韩欧美国产一二三区| 99久久精品免费看国产| 婷婷丁香久久五月婷婷| 久久综合99re88久久爱| 一本色道亚洲精品aⅴ| 日本va欧美va精品| 国产精品成人网| 日韩免费在线观看| 99精品热视频| 一区二区三区四区不卡在线| 8x8x8国产精品| 国产一区二区三区四| 亚洲日本在线天堂| 精品久久久三级丝袜| 一本大道av一区二区在线播放| 蜜桃视频一区二区三区在线观看| 亚洲欧洲精品天堂一级| 日韩西西人体444www| 91色在线porny| 国产精品一区二区免费不卡 | 亚洲大片免费看| 久久久噜噜噜久久中文字幕色伊伊| 欧美性xxxxxx少妇| 成人晚上爱看视频| 麻豆极品一区二区三区| 亚洲一区二区三区四区五区黄| 久久只精品国产| 91.麻豆视频| 96av麻豆蜜桃一区二区| 国模冰冰炮一区二区| 五月婷婷激情综合| 伊人性伊人情综合网| 国产视频视频一区| 日韩三级免费观看| 成人免费视频网站在线观看| 亚洲妇女屁股眼交7| 亚洲色图视频网| 国产女人水真多18毛片18精品视频| 日韩视频在线永久播放| 欧洲亚洲国产日韩| 97久久精品人人爽人人爽蜜臀| 国产九色精品成人porny| 青青青伊人色综合久久| 亚洲国产成人av| 国产精品综合视频| 色狠狠色噜噜噜综合网| 国产精品888| 麻豆精品视频在线观看| 亚洲成人精品一区二区| 亚洲一区自拍偷拍| 亚洲欧美一区二区三区国产精品| 国产农村妇女精品| 日本一区二区视频在线| 欧美极品美女视频| 久久精品水蜜桃av综合天堂| 久久网这里都是精品|