use of maspack.properties.PropertyInfoList in project artisynth_core by artisynth.
the class ComponentPropertyField method updatePropertySelector.
protected void updatePropertySelector() {
// mask value change listeners since othewise the
// property selector will fire one to announce the new
// value we already know about ...
myPropertySelector.maskValueChangeListeners(true);
HasProperties host = getHost();
if (myLastSelectorHost != host) {
if (host != null) {
PropertyInfoList list = host.getAllPropertyInfo();
LinkedList<String> nameList = new LinkedList<String>();
nameList.add(nullString);
for (PropertyInfo info : list) {
// need to prune
if (myNumericOnly && !isNumeric(info)) {
continue;
}
if (myWidgetableOnly && !PropertyWidget.canCreate(info)) {
continue;
}
nameList.add(info.getName());
}
myPropertySelector.setSelections(nameList.toArray(new String[0]), nullString);
} else {
myPropertySelector.setSelections(new String[] { nullString }, nullString);
}
myLastSelectorHost = host;
}
myPropertySelector.setValue(getLeafPropName());
myPropertySelector.maskValueChangeListeners(false);
}
Aggregations