table.add(categoryText, 1, 1);  int linkRow = 2;
int linkRow = 1;
	private void getCollectionView(BoxEntity box, BoxCategory[] categories, Table boxTable, IWContext iwc) {		int row = 1;		Image image = Table.getTransparentCell(iwc);		image.setHeight(_boxSpacing);		for (int a = 0; a < categories.length; a++) {			String categoryString = BoxBusiness.getLocalizedString(categories[a], _iLocaleID);			if (categoryString == null) {				categoryString = "$language$";			}			Text categoryText = new Text(categoryString);			categoryText.setFontStyle(_categoryStyle);			Table table = new Table();			table.setWidth("100%");			table.setCellspacing(0);			table.setCellpadding(1);			table.add(categoryText, 1, 1);			int linkRow = 2;			int column = 1;						if (_showHeaders) {				Text nameHeader = new Text(_iwrb.getLocalizedString("link_name", "Name"));				if (_headerStyle != null)					nameHeader.setStyleAttribute(_headerStyle);				table.add(nameHeader, column++, linkRow);				if (_showFileSize) {					Text fileSizeHeader = new Text(_iwrb.getLocalizedString("link_file_size", "File size"));					if (_headerStyle != null)						fileSizeHeader.setStyleAttribute(_headerStyle);					table.setWidth(column++, linkRow, 12);					table.add(fileSizeHeader, column++, linkRow);										if (_showMimeType) {						Text mimetypeHeader = new Text(_iwrb.getLocalizedString("link_mimetype", "Mimetype"));						if (_headerStyle != null)							mimetypeHeader.setStyleAttribute(_headerStyle);						table.setWidth(column++, linkRow, 12);						table.add(mimetypeHeader, column, linkRow);					}				}				linkRow++;			}			BoxLink[] links = null;			System.out.println("Getting links in getCollectionView()");			System.out.println("_showOnlyBelongingToUser = " + _showOnlyBelongingToUser);						if (_showCollection) {				links = BoxFinder.getLinksInCategory(categories[a]);			}			else {				if (_showOnlyBelongingToUser)					links = BoxFinder.getLinksInBoxByUser(box, categories[a], iwc.getUserId());				else					links = BoxFinder.getLinksInBox(box, categories[a]);			}						if (links != null) {				List collection = Arrays.asList(links);				if (iSortAlphabetically) {					Collections.sort(collection, new BoxComparator(iwc.getCurrentLocale()));				}				Iterator iter = collection.iterator();				while (iter.hasNext()) {					BoxLink boxLink = (BoxLink) iter.next();					column = 1;					Link link = getLink(boxLink);					if (link != null) {						table.add(link, column++, linkRow);												if (_showFileSize) {							ICFile file = boxLink.getFile();														double size = 0;							try {								size = (double) file.getFileSize().intValue() / (double) 1024;							}							catch (Exception e) {								size = 0;							}							DecimalFormat format = new DecimalFormat("0.0 KB");														Text fileSize = new Text(format.format(size));							fileSize.setStyle(_name);							table.setWidth(column++, linkRow, 12);							table.setAlignment(column, linkRow, Table.HORIZONTAL_ALIGN_RIGHT);							table.add(fileSize, column++, linkRow);														if (_showMimeType) {								String mimeType = null;								try {									mimeType = file.getMimeType();									mimeType = mimeType.replace('\\', '_');									mimeType = mimeType.replace('/', '_');									mimeType = mimeType.replace(':', '_');									mimeType = mimeType.replace('*', '_');									mimeType = mimeType.replace('?', '_');									mimeType = mimeType.replace('<', '_');									mimeType = mimeType.replace('>', '_');									mimeType = mimeType.replace('|', '_');									mimeType = mimeType.replace('\"', '_');								}								catch (Exception e) {									mimeType = null;								} 								if (mimeType != null) {									Image mime = _iwb.getImage(_DEFAULT_ICON_PREFIX+mimeType+_DEFAULT_ICON_SUFFIX);									table.setWidth(column++, linkRow, 12);									table.add(mime, column++, linkRow);								}							}						}						if (_isAdmin) {							table.setWidth(column++, linkRow, 5);							table.add(getEditLink(boxLink.getID()), column, linkRow);							table.add(getDeleteLink(boxLink.getID()), column, linkRow);						}						linkRow++;					}				}				if (_isAdmin) {					table.add(getAddLink(categories[a].getID()), 1, linkRow);				}			}			boxTable.add(table, 1, row);			row++;			boxTable.add(image, 1, row);			row++;		}	}