Skip to main content

Rich text GRIN feature

2 replies [Last post]
ggeorgopoulos
Offline
Joined: 2006-12-25
Points: 0

Hi,

I need a rich text GRIN feature and tried building one based on the provided com.hdcookbook.grin.features.Text class.

My problem is that there is no way from my ExtensionParser to call:

builder.getFontIndex(fontSpec);

Is it possible to add:

public int getFontIndex(FontSpec fontSpec) {
return builder.getFontIndex(fontSpec);
}

to com.hdcookbook.grin.io.text.ShowBuilder ? or do I miss something?

Thanks,
George.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
billf
Offline
Joined: 2004-02-13
Points: 0

You mean, add it to ShowParser, right?

Makes perfect sense. I went a little wider, though -- in ShowParser, I just made a public getBuilder() method, so you can call getBuilder().getFontIndex().

Thanks for raising this! It's had to spot this kind of omission in a framework, but really easy to fix once spotted :-)

Cheers,

Bill

ggeorgopoulos
Offline
Joined: 2006-12-25
Points: 0

yes, thanks.

/George