if (m[i] instanceof MediaSizeName) mediaSizeNames.add((MediaSizeName)m[i]);
}
}
currentSizes.clear();
boolean lastSelectedItemFound=false;
MediaSizeName selected=selectedItem==null?null:((Format)selectedItem).getValue();
for (int i=0;i<sizes.length;i++){
MediaSizeName m=sizesSystemNames[i].getValue();
if (m==null&&mediaSizeNames!=null) continue;
if (mediaSizeNames==null||mediaSizeNames.contains(m)){
if (m!=null&&m.equals(selected)) lastSelectedItemFound=true;
currentSizes.add(sizes[i]);
}
}
Format sel=null;