/** * Sets the text area being displayed. * * @param textArea The text area. */ @Override public void setTextArea(RTextArea textArea) { if (l==null) { l = new Listener(); } if (this.textArea!=null) { l.uninstall(textArea); } super.setTextArea(textArea); lastVisibleLine = calculateLastVisibleLineNumber(); if (textArea!=null) { l.install(textArea); // Won't double-install updateCellHeights(); updateCellWidths(); } }
/** * Sets the text area being displayed. * * @param textArea The text area. */ public void setTextArea(RTextArea textArea) { if (l==null) { l = new Listener(); } if (this.textArea!=null) { l.uninstall(textArea); } super.setTextArea(textArea); Color bg = textArea==null ? Color.WHITE : textArea.getBackground(); // textArea.getBackground() may also return null (image bg) setBackground(bg==null ? Color.WHITE : bg); if (textArea!=null) { l.install(textArea); // Won't double-install updateCellHeights(); updateCellWidths(); } }
/** * Sets the text area being displayed. * * @param textArea The text area. */ public void setTextArea(RTextArea textArea) { if (l==null) { l = new Listener(); } if (this.textArea!=null) { l.uninstall(textArea); } super.setTextArea(textArea); if (textArea!=null) { l.install(textArea); // Won't double-install updateCellHeights(); updateCellWidths(); } }
/** * Overridden to set width of this component correctly when we are first * displayed (as keying off of the RTextArea gives us (0,0) when it isn't * yet displayed. */ @Override public void addNotify() { super.addNotify(); if (textArea!=null) { l.install(textArea); // Won't double-install } updateCellWidths(); updateCellHeights(); }
/** * Overridden to set width of this component correctly when we are first * displayed (as keying off of the RTextArea gives us (0,0) when it isn't * yet displayed. */ public void addNotify() { super.addNotify(); if (textArea!=null) { l.install(textArea); // Won't double-install } updateCellWidths(); updateCellHeights(); }
/** * Overridden to set width of this component correctly when we are first * displayed (as keying off of the RTextArea gives us (0,0) when it isn't * yet displayed. */ public void addNotify() { super.addNotify(); if (textArea!=null) { l.install(textArea); // Won't double-install } updateCellWidths(); updateCellHeights(); }
/** * Sets the text area being displayed. * * @param textArea The text area. */ @Override public void setTextArea(RTextArea textArea) { if (l==null) { l = new Listener(); } if (this.textArea!=null) { l.uninstall(textArea); } super.setTextArea(textArea); lastVisibleLine = calculateLastVisibleLineNumber(); if (textArea!=null) { l.install(textArea); // Won't double-install updateCellHeights(); updateCellWidths(); } }
/** * Overridden to set width of this component correctly when we are first * displayed (as keying off of the RTextArea gives us (0,0) when it isn't * yet displayed. */ @Override public void addNotify() { super.addNotify(); if (textArea!=null) { l.install(textArea); // Won't double-install } updateCellWidths(); updateCellHeights(); }