public VisualListRenderer() {
setOpaque(true);
}
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
VisualPageListItem item = (VisualPageListItem)value;
currentZoomLevel = ((JVisualSelectionList)list).getCurrentZoomLevel();
if(!item.isDeleted() || (item.isDeleted() && ((JVisualSelectionList)list).isDrawDeletedItems())){
if(item.getThumbnail()!= null){
image = new ImageIcon(item.getThumbnail());
setPreferredSize(getZoomedSize());
drawRedCross = item.isDeleted();
}
String text = item.getPageNumber()+"";
if(item.getPaperFormat()!=null && item.getPaperFormat().length()>0){
text += " - ["+item.getPaperFormat()+"]";
}
setText(text);
setHorizontalTextPosition(JLabel.CENTER);
setVerticalTextPosition(JLabel.BOTTOM);
setHorizontalAlignment(JLabel.CENTER);