// Removes any non-sortable property ids
final List<Object> ids = new ArrayList<Object>();
final List<Boolean> orders = new ArrayList<Boolean>();
- final Collection sortable = container.getSortableContainerPropertyIds();
+ final Collection<?> sortable = container
+ .getSortableContainerPropertyIds();
for (int i = 0; i < propertyId.length; i++) {
if (sortable.contains(propertyId[i])) {
ids.add(propertyId[i]);
public static class DefaultPropertyValueComparator implements
Comparator<Object>, Serializable {
+ @SuppressWarnings("unchecked")
public int compare(Object o1, Object o2) {
int r = 0;
// Normal non-null comparison
} else {
// Assume the objects can be cast to Comparable, throw
// ClassCastException otherwise.
- r = ((Comparable) o1).compareTo(o2);
+ r = ((Comparable<Object>) o1).compareTo(o2);
}
} else if (o1 == o2) {
// Objects are equal if both are null
return r;
}
-
}
}
String id;
ApplicationConnection client;
- protected final ArrayList tabKeys = new ArrayList();
+ protected final ArrayList<String> tabKeys = new ArrayList<String>();
protected int activeTabIndex = 0;
protected boolean disabled;
protected boolean readonly;
- protected Set disabledTabKeys = new HashSet();
+ protected Set<String> disabledTabKeys = new HashSet<String>();
protected boolean cachedUpdate = false;
public VTabsheetBase(String classname) {
final UIDL tabs = uidl.getChildUIDL(0);
// Paintables in the TabSheet before update
- ArrayList oldPaintables = new ArrayList();
- for (Iterator iterator = getPaintableIterator(); iterator.hasNext();) {
+ ArrayList<Object> oldPaintables = new ArrayList<Object>();
+ for (Iterator<Object> iterator = getPaintableIterator(); iterator
+ .hasNext();) {
oldPaintables.add(iterator.next());
}
disabledTabKeys.clear();
int index = 0;
- for (final Iterator it = tabs.getChildIterator(); it.hasNext();) {
+ for (final Iterator<Object> it = tabs.getChildIterator(); it.hasNext();) {
final UIDL tab = (UIDL) it.next();
final String key = tab.getStringAttribute("key");
final boolean selected = tab.getBooleanAttribute("selected");
}
// Perform unregister for any paintables removed during update
- for (Iterator iterator = oldPaintables.iterator(); iterator.hasNext();) {
+ for (Iterator<Object> iterator = oldPaintables.iterator(); iterator
+ .hasNext();) {
Object oldPaintable = iterator.next();
if (oldPaintable instanceof Paintable) {
Widget w = (Widget) oldPaintable;
/**
* @return a list of currently shown Paintables
*/
- abstract protected Iterator getPaintableIterator();
+ abstract protected Iterator<Object> getPaintableIterator();
/**
* Clears current tabs and contents