List of usage examples for javax.swing JTree getCellEditor
public TreeCellEditor getCellEditor()
From source file:nz.govt.natlib.ndha.manualdeposit.ManualDepositPresenter.java
private void resetTrees(int fontSize) { int rowHeight = 0; if (fontSize < 14) { currentIconDirectory = "icons/16/"; rowHeight = 16;//from w w w. j av a 2 s . c o m } else if (fontSize < 18) { currentIconDirectory = "icons/24/"; rowHeight = 24; } else if (fontSize < 22) { currentIconDirectory = "icons/32/"; rowHeight = 32; } else if (fontSize < 26) { currentIconDirectory = "icons/48/"; rowHeight = 48; } else if (fontSize < 30) { currentIconDirectory = "icons/64/"; rowHeight = 64; } else { currentIconDirectory = "icons/128/"; rowHeight = 128; } for (JTree tree : trees) { tree.setRowHeight(rowHeight); tree.setCellRenderer(new IconRenderer(currentIconDirectory)); DepositTreeEditor editor = (DepositTreeEditor) tree.getCellEditor(); editor.setStandardFont(standardFont); } }