本文整理匯總了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);
}
示例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());
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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();
}
示例7: propertyStateChanged
import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
public void propertyStateChanged(PropertyStateEvent pse) {
fireValueChanged();
}
示例8: isComboAccessible
import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private boolean isComboAccessible(Object value) {
return value != null && value != PropertyStateEvent.UNREADABLE;
}
示例9: isTableAccessible
import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private boolean isTableAccessible(Object value) {
return value != null && value != PropertyStateEvent.UNREADABLE;
}
示例10: isListAccessible
import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
private boolean isListAccessible(Object value) {
return value != null && value != PropertyStateEvent.UNREADABLE;
}
示例11: sourceChanged
import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
public void sourceChanged(Binding binding, PropertyStateEvent event) { }
示例12: targetChanged
import org.jdesktop.beansbinding.PropertyStateEvent; //導入依賴的package包/類
/**
* {@inheritDoc}
*/
public void targetChanged(Binding binding, PropertyStateEvent event) { }