}
// draw the selected one at last
for (int pass = 0; pass < 2; pass++) {
for (int i = 0; i < layer.getXForms().size(); i++) {
XForm xForm = layer.getXForms().get(i);
if ((pass == 0 && (selectedXForm == null || xForm != selectedXForm)) || (pass == 1 && xForm == selectedXForm)) {
boolean isSelected = xForm == selectedXForm;
if (prefs.isTinaEditorControlsWithShadows()) {
g.setColor(SHADOW_COLOR);
drawXForm(g, xForm, i, layer.getXForms().size(), false, true, isSelected);
drawXForm(g, xForm, i, layer.getXForms().size(), false, false, isSelected);
}
else {
drawXForm(g, xForm, i, layer.getXForms().size(), false, false, isSelected);
}
}
}
for (int i = 0; i < layer.getFinalXForms().size(); i++) {
XForm xForm = layer.getFinalXForms().get(i);
if ((pass == 0 && (selectedXForm == null || xForm != selectedXForm)) || (pass == 1 && xForm == selectedXForm)) {
boolean isSelected = xForm == selectedXForm;
if (prefs.isTinaEditorControlsWithShadows()) {
g.setColor(SHADOW_COLOR);
drawXForm(g, xForm, i, layer.getXForms().size(), true, true, isSelected);