/** {@inheritDoc} */ public int getLength() { TextBuffer buffer = _node.acquireTextBuffer(); try { return buffer.getLength(); } finally { if (buffer != null) { _node.releaseTextBuffer(); } } }
// </frag> public void open() { if (view == null) { view = new CustomEditorJPanel(); } if (wn != null) { // read the content and feed the Editor with it. TextBuffer tb = wn.acquireTextBuffer(); String content = tb.getString(0, tb.getLength()); view.setContent(content); } view.requestFocus(); }