/** * 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(); } }
/** * Called when this component is removed from the view hierarchy. */ public void removeNotify() { super.removeNotify(); if (textArea!=null) { l.uninstall(textArea); } }
/** * Called when this component is removed from the view hierarchy. */ public void removeNotify() { super.removeNotify(); if (textArea!=null) { l.uninstall(textArea); } }
/** * Called when this component is removed from the view hierarchy. */ @Override public void removeNotify() { super.removeNotify(); if (textArea!=null) { l.uninstall(textArea); } }
/** * 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(); } }
/** * Called when this component is removed from the view hierarchy. */ @Override public void removeNotify() { super.removeNotify(); if (textArea!=null) { l.uninstall(textArea); } }