/** * 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(); } }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
/** * 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); 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(); }
/** * 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); } }
/** * Called when this component is removed from the view hierarchy. */ public void removeNotify() { super.removeNotify(); if (textArea!=null) { l.uninstall(textArea); } }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }
/** * 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(); }
/** * Called when this component is removed from the view hierarchy. */ @Override public void removeNotify() { super.removeNotify(); if (textArea!=null) { l.uninstall(textArea); } }
public void install(RTextArea textArea) { if (!installed) { //System.out.println("Installing"); textArea.addCaretListener(this); textArea.addPropertyChangeListener(this); caretUpdate(null); // Force current line highlight repaint installed = true; } }