private void calcRowHeight (Graphics g) { int height = g.getFontMetrics(getFont()).getHeight(); //Issue 42743/"Jesse mode" String s = System.getProperty ("nb.cellrenderer.fixedheight"); //NOI18N if (s != null) { try { height = Integer.parseInt(s); setRowHeight (height); firstPaint = false; return; } catch (Exception e) { //do nothing } } setRowHeight(Math.max (18, height + 2)); firstPaint = false; }
private void calcRowHeight (Graphics g) { int height = g.getFontMetrics(getFont()).getHeight(); //Issue 42743/"Jesse mode" String s = System.getProperty ("nb.cellrenderer.fixedheight"); //NOI18N if (s != null) { try { height = Integer.parseInt(s); setRowHeight (height); firstPaint = false; return; } catch (Exception e) { //do nothing } } setRowHeight(Math.max (18, height + 2)); firstPaint = false; }
private void calcRowHeight(Graphics g) { int height = Math.max(18, 2 + g.getFontMetrics(getFont()).getHeight()); //Issue 42743/"Jesse mode" String s = System.getProperty("nb.cellrenderer.fixedheight"); //NOI18N if (s != null) { try { height = Integer.parseInt(s); } catch (Exception e) { //do nothing, height not changed } } if (getRowHeight() != height) { setRowHeight(height); } else { revalidate(); repaint(); } }
/** * Adds the search field to the tree. */ private void displaySearchField() { if (!searchTextField.isDisplayable()) { JViewport viewport = TreeView.this.getViewport(); originalScrollMode = viewport.getScrollMode(); viewport.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); searchTextField.setFont (ExplorerTree.this.getFont()); prepareSearchPanel(); add(searchpanel); doLayout(); searchpanel.repaint(); // bugfix #28501, avoid the chars duplicated on jdk1.3 SwingUtilities.invokeLater (new Runnable () { public void run () { searchTextField.requestFocus (); } }); } }
/** * Adds the search field to the tree. */ private void displaySearchField() { if (!searchTextField.isDisplayable()) { JViewport viewport = TreeView.this.getViewport(); originalScrollMode = viewport.getScrollMode(); viewport.setScrollMode(JViewport.SIMPLE_SCROLL_MODE); searchTextField.setFont (ExplorerTree.this.getFont()); prepareSearchPanel(); add(searchpanel); doLayout(); searchpanel.repaint(); // bugfix #28501, avoid the chars duplicated on jdk1.3 SwingUtilities.invokeLater (new Runnable () { public void run () { searchTextField.requestFocus (); } }); } }
public void setFont (Font f) { if (f != getFont()) { firstPaint = true; super.setFont (f); } }
public void setFont (Font f) { if (f != getFont()) { firstPaint = true; super.setFont (f); } }
@Override public void setFont(Font f) { if (f != getFont()) { firstPaint = true; super.setFont(f); } }