javax.swing.TextComponent getDocument to scala.swing.document.

peer.getDocument() replaced with document member function in scala.swing.TextComponent.
I started on Document and the classes it uses.

The Document has  a forest (multiple trees) of Elements attached (the 
tree is for HTML).  The peer relationships among Element nodes will need 
to be kept up to date with events and listeners.  I have not started 
that part yet.

A Bugzilla issue sounds like a good idea.

Allan

On 10/23/2014 06:38 AM, Andy Hicks wrote:
>
> In 
> examples/src/main/scala/scala/swing/examples/tutorials/components/ListSelectionDemo.scala:
>
> > +      val firstIndex = list.selection.leadIndex
> > +      val lastIndex = list.selection.anchorIndex // anchor = last?
> > +      val isAdjusting = list.selection.adjusting
> > +      output.append("Event for indexes " + firstIndex + " - " + lastIndex +
> > +          "; isAdjusting is " + isAdjusting + "; selected indexes:")
> > +      if (list.selection.indices.isEmpty) {
> > +        output.append(" <none>")
> > +      }
> > +      else {
> > +        // Find out which indexes are selected.
> > +        for (i <- list.selection.indices) {
> > +          output.append(" " + i)
> > +        }
> > +      }
> > +      output.append("\n")
> > +      output.caret.position = output.document.getLength()
>
> Yep, its a lots of work, I guess thats why nobody has done it. :-), 
> and a lot of other wrappers.
>
> As for allocation, its whats you're interested in or probably more 
> traditionally somebody has found has a scala-swing project and found 
> something missing. (so far we haven't had 2 different people working 
> on the same part, but an email to the google group could be a good idea).
> It may be that this gets put on hold and 'attached' to an issue saying 
> text.Document needs implementing.
>
> —
> Reply to this email directly or view it on GitHub 
> <https://github.com/scala/scala-swing/pull/26/files#r19277162>.
>