textAttributeCombo.setEnabled(true);
String[] attributeName = cs.getAttributeName();
textAttributeCombo
- .setSelectedItem(String.join(COLON, attributeName));
+ .setSelectedItem(toAttributeDisplayName(attributeName));
}
else
{
byAttributeValue.setSelected(true);
String[] attributeName = cs.getAttributeName();
valueAttributeCombo
- .setSelectedItem(String.join(COLON, attributeName));
+ .setSelectedItem(toAttributeDisplayName(attributeName));
valueAttributeCombo.setEnabled(true);
updateMinMax();
}
else if (byAttributeValue.isSelected())
{
String attName = (String) valueAttributeCombo.getSelectedItem();
- String[] attNames = attName.split(COLON);
+ String[] attNames = fromAttributeDisplayName(attName);
minMax = FeatureAttributes.getInstance().getMinMax(type, attNames);
}
if (minMax != null)
{
attribute = (String) textAttributeCombo.getSelectedItem();
textAttributeCombo.setEnabled(true);
- acg.setAttributeName(attribute.split(COLON));
+ acg.setAttributeName(fromAttributeDisplayName(attribute));
}
else if (byAttributeValue.isSelected())
{
attribute = (String) valueAttributeCombo.getSelectedItem();
valueAttributeCombo.setEnabled(true);
- acg.setAttributeName(attribute.split(COLON));
+ acg.setAttributeName(fromAttributeDisplayName(attribute));
}
else
{
- acg.setAttributeName((String) null);
+ acg.setAttributeName((String[]) null);
}
if (!hasThreshold)
ap.paintAlignment(updateStructsAndOverview, updateStructsAndOverview);
}
+ private String[] fromAttributeDisplayName(String attribute)
+ {
+ return attribute == null ? null : attribute.split(COLON);
+ }
+
@Override
protected void raiseClosed()
{
continue;
}
}
- validAtts.add(String.join(COLON, attName));
+ validAtts.add(toAttributeDisplayName(attName));
String desc = fa.getDescription(featureType, attName);
if (desc != null && desc.length() > MAX_TOOLTIP_LENGTH)
{
return attCombo;
}
+ private String toAttributeDisplayName(String[] attName)
+ {
+ return attName == null ? "" : String.join(COLON, attName);
+ }
+
}