/** * Internal method used to reset the selection so that it is empty at the given point. This is * what is called when the user clicks on a point in the document. * * <p>Note: This method should be invoked in the GUI thread. */ public void resetSelection(final RenderableSpot rpoint) { final HtmlBlockPanel block = this.htmlBlockPanel; if (block != null) { block.setSelectionStart(rpoint); block.setSelectionEnd(rpoint); block.repaint(); } this.selectionDispatch.fireEvent(new SelectionChangeEvent(this, false)); }
/** * Internal method used to expand the selection to the given point. * * <p>Note: This method should be invoked in the GUI thread. */ public void expandSelection(final RenderableSpot rpoint) { final HtmlBlockPanel block = this.htmlBlockPanel; if (block != null) { block.setSelectionEnd(rpoint); block.repaint(); this.selectionDispatch.fireEvent( new SelectionChangeEvent(this, block.isSelectionAvailable())); } }