pivot-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger Whitcomb (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (PIVOT-838) TextArea - removed text event, unable to retrieve removed text
Date Thu, 07 Dec 2017 16:13:00 GMT

     [ https://issues.apache.org/jira/browse/PIVOT-838?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Roger Whitcomb reassigned PIVOT-838:
------------------------------------

    Assignee: Roger Whitcomb

> TextArea - removed text event, unable to retrieve removed text
> --------------------------------------------------------------
>
>                 Key: PIVOT-838
>                 URL: https://issues.apache.org/jira/browse/PIVOT-838
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 2.0.1, 2.0.2
>            Reporter: Imbue Lab
>            Assignee: Roger Whitcomb
>            Priority: Minor
>             Fix For: 2.5
>
>
> There is no possibility to get information about text removed from TextArea component.
In the ParagraphListener there are two methods:
> - void textInserted(Paragraph paragraph, int index, int count) - this one is OK, information
about inserted text can be retrieved from the paragraph's CharSequence (using getCharacters()
method), there is everything what is needed: index and count
> - void textRemoved(Paragraph paragraph, int index, int count) - here the problem begins,
paragraph received as parameter has no text that was removed because it has been already removed.
> Of course one can make a deep copy of paragraph's characters (every time it changed)
and search for removed text using previously created copy, but is it really too expensive.
> I checked the source and in the TextArea.Paragraph class in the method void removeText(int
index, int count) there is a line where real text removal operation takes place: characters.delete(index,
index + count), but removed text is not stored or passed to any of the listeners. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message