package info.bukova.isspst.sort;

import org.zkoss.zul.Listheader;

@SuppressWarnings("serial")
public class CzechSortListheader extends Listheader {

	@Override
	public void setSort(String type) {
		
		if (type.startsWith("czech"))
		{
			// czech(propertyName)
			String propertyName = type.substring("czech(".length(), type.length() - 1);
			this.setSortAscending(new CzechStringComparator(propertyName, true));
			this.setSortDescending(new CzechStringComparator(propertyName, false));
		}
		else
		{
			// auto(propertyName)
			super.setSort(type);
		}
	}

}
