[brailleblaster] Re: Implementing StyledTextContent

  • From: "John J. Boyer" <john.boyer@xxxxxxxxxxxxxxxxx>
  • To: brailleblaster@xxxxxxxxxxxxx
  • Date: Mon, 17 Oct 2011 10:47:51 -0500

DefaultContent.java says it is not intended to be subclassed. The 
content model will have to conect what StyledText displays and the user 
changes with the underlying xml. Even if DefaultContent could be 
subclassed StyledTextEvent is still needed. It performs important 
functions in DefaultContent. The puzle is how the compiler can claim 
that a class with a different name is a duplicate of one in  swt.custom 

John

On Mon, Oct 17, 2011 at 08:12:01AM -0700, Chris von See wrote:
> Can you just extend the default StyledTextContent implementation and override 
> the methods that you need to in order to implement the functionality you 
> want?  What do you want to do that the default implementation doesn't do?
> 
> Cheers
> Chris
> 
> 
> On Oct 17, 2011, at 2:36 AM, John J. Boyer wrote:
> 
> > The Braille and Daisy views have quite different requirements, so it is 
> > best to implement a StyledTextContent model for each one. I thought to 
> > use the DefaultContent class as a starting point. The Eclipse license 
> > permits this. Si I copied it to org.brailleblaster.wordprocessor and 
> > started modifying it. Various import statements had to be added. When I 
> > tried to import StyledTextEvent I was told that it was not public in the 
> > custom SWT package. So I copied that also. Then the compiler gave the 
> > message that it was a duplicate class, presumably because it had the 
> > same name as a class in the classpath. So I changed the name slightly. 
> > The compiler still gives the same message, claiming that a class with 
> > the changed name exists in swt.custom, which it does not. It appears to 
> > be important for the content model to use the StyledTextEvent. What is 
> > the work-around for this problem?
> > 
> > Thanks,
> > John
> > 
> > -- 
> > John J. Boyer; President, Chief Software Developer
> > Abilitiessoft, Inc.
> > http://www.abilitiessoft.com
> > Madison, Wisconsin USA
> > Developing software for people with disabilities
> > 
> > 
> 

-- 
John J. Boyer; President, Chief Software Developer
Abilitiessoft, Inc.
http://www.abilitiessoft.com
Madison, Wisconsin USA
Developing software for people with disabilities


Other related posts: