當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertyStateEvent類代碼示例

本文整理匯總了Java中org.jdesktop.beansbinding.PropertyStateEvent的典型用法代碼示例。如果您正苦於以下問題:Java PropertyStateEvent類的具體用法?Java PropertyStateEvent怎麽用?Java PropertyStateEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PropertyStateEvent類屬於org.jdesktop.beansbinding包,在下文中一共展示了PropertyStateEvent類的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: setAccessible

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
void setAccessible(boolean accessible) {
    if (this.accessible == accessible) {
        return;
    }

    this.accessible = accessible;

    PropertyStateEvent pse;

    if (accessible) {
        pse = new ElementsPropertyStateEvent(this, null, true, PropertyStateEvent.UNREADABLE, null, true, true, true);
    } else {
        Object old = list;
        list = null;
        pse = new ElementsPropertyStateEvent(this, null, true, old, PropertyStateEvent.UNREADABLE, true, false, true);
    }

    firePropertyStateChange(pse);
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:20,代碼來源:ElementsProperty.java

示例2: propertyStateChanged

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
public void propertyStateChanged(PropertyStateEvent pse) {
    if (!pse.getValueChanged()) {
        return;
    }

    if (pse.getSourceProperty() == comboP) {
        cleanupForLast();
        
        boolean wasAccessible = isComboAccessible(pse.getOldValue());
        boolean isAccessible = isComboAccessible(pse.getNewValue());

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

        if (combo == null) {
            combo = comboP.getValue(getTargetObject());
            combo.setSelectedItem(null);
            model = new BindingComboBoxModel();
            combo.setModel(model);
        }

        model.updateElements((List)pse.getNewValue(), combo.isEditable());
    }
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:32,代碼來源:JComboBoxBinding.java

示例3: propertyStateChanged

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
public void propertyStateChanged(PropertyStateEvent pse) {
    if (!pse.getValueChanged()) {
        return;
    }

    if (pse.getSourceProperty() == tableP) {
        cleanupForLast();
        
        boolean wasAccessible = isTableAccessible(pse.getOldValue());
        boolean isAccessible = isTableAccessible(pse.getNewValue());

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

        if (table == null) {
            table = tableP.getValue(getTargetObject());
            model = new BindingTableModel();
            table.setModel(model);
        }

        model.setElements((List)pse.getNewValue(), true);
    }
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:31,代碼來源:JTableBinding.java

示例4: setValue0

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private void setValue0(TS source, List list, boolean ignore) {
    if (!accessible) {
        throw new UnsupportedOperationException("Unwriteable");
    }

    if (this.list == list) {
        return;
    }

    List old = this.list;
    this.list = list;

    PropertyStateEvent pse = new ElementsPropertyStateEvent(this, null, true, old, list, false, true, ignore);
    firePropertyStateChange(pse);
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:16,代碼來源:ElementsProperty.java

示例5: propertyStateChanged

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
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);
    }
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:34,代碼來源:JListBinding.java

示例6: bind

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
     * {@inheritDoc}
     */
    @Override
    @SuppressWarnings("unchecked")
    protected void bind() {
        list.setModel(ComponentModels.getListModel(this));
        table.setModel(ComponentModels.getTableModel(this));
        tree.setModel(ComponentModels.getTreeModel(this));
        treeTable.setTreeTableModel(ComponentModels.getTreeTableModel(this));
        comboBox.setModel(ComponentModels.getComboBoxModel(this));
        
//        previousBtn.setAction(map.get("displayPrevious"));
//        nextBtn.setAction(map.get("displayNext"));
        
        Binding b = Bindings.createAutoBinding(READ,
                predicates, ELProperty.create("${selectedItem.predicate}"),
                highlighters, ELProperty.create("${selectedItem.highlighter.highlightPredicate}"));
        b.addBindingListener(new BindingAdapter() {
            public void targetChanged(Binding binding, PropertyStateEvent event) {
                binding.refresh();
            }
        });
        b.bind();
        
        ArrayAggregator<Highlighter> activeHighlighters
                = new ArrayAggregator<Highlighter>(Highlighter.class);
        activeHighlighters.addSource(new HighlighterInfo("Tooltip for truncated text",
                new ToolTipHighlighter(new HighlightPredicate.AndHighlightPredicate(
                        new HighlightPredicate() {
                            @Override
                            public boolean isHighlighted(Component renderer,
                                    ComponentAdapter adapter) {
                                return adapter.getComponent() instanceof JTable;
                            }
                        }, HighlightPredicate.IS_TEXT_TRUNCATED))),
                (Property) ELProperty.create("${highlighter}"));
        activeHighlighters.addSource(stripingOptions,
                (Property) ELProperty.create("${selectedItem.highlighter}"));
        activeHighlighters.addSource(highlighters,
                (Property) ELProperty.create("${selectedItem.highlighter}"));
        
        Bindings.createAutoBinding(READ,
                activeHighlighters, BeanProperty.create("value"),
                list, BeanProperty.create("highlighters")).bind();
        
        Bindings.createAutoBinding(READ,
                activeHighlighters, BeanProperty.create("value"),
                table, BeanProperty.create("highlighters")).bind();
        
        Bindings.createAutoBinding(READ,
                activeHighlighters, BeanProperty.create("value"),
                tree, BeanProperty.create("highlighters")).bind();
        
        Bindings.createAutoBinding(READ,
                activeHighlighters, BeanProperty.create("value"),
                treeTable, BeanProperty.create("highlighters")).bind();
        
        Bindings.createAutoBinding(READ,
                activeHighlighters, BeanProperty.create("value"),
                comboBox, BeanProperty.create("highlighters")).bind();
    }
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:63,代碼來源:HighlighterDemo.java

示例7: propertyStateChanged

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
public void propertyStateChanged(PropertyStateEvent pse) {
    fireValueChanged();
}
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:7,代碼來源:Aggregator.java

示例8: isComboAccessible

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private boolean isComboAccessible(Object value) {
    return value != null && value != PropertyStateEvent.UNREADABLE;
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:4,代碼來源:JComboBoxBinding.java

示例9: isTableAccessible

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private boolean isTableAccessible(Object value) {
    return value != null && value != PropertyStateEvent.UNREADABLE;
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:4,代碼來源:JTableBinding.java

示例10: isListAccessible

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private boolean isListAccessible(Object value) {
    return value != null && value != PropertyStateEvent.UNREADABLE;
}
 
開發者ID:4refr0nt,項目名稱:ESPlorer,代碼行數:4,代碼來源:JListBinding.java

示例11: sourceChanged

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
public void sourceChanged(Binding binding, PropertyStateEvent event) { }
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:5,代碼來源:BindingAdapter.java

示例12: targetChanged

import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
public void targetChanged(Binding binding, PropertyStateEvent event) { }
 
開發者ID:RockManJoe64,項目名稱:swingx,代碼行數:5,代碼來源:BindingAdapter.java


注:本文中的org.jdesktop.beansbinding.PropertyStateEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。