![]() |
#1 |
Nameless Being
|
Show Text on kindle
Hi,
slowly I'm getting desperated. more than one week of trying anything and nothing helps. I want to make a kindlet with the following basic function: - displaying text, as much as I want - and maybe, *in case* I got that, maybe also get the functionality to turn pages in case the text is longer than one page API: 2.0 basic layout: anyobject = new AnyObject(); KPages pages = new KPages(createFullPageProvider()); [...].getRootContainer.add(pages); Problems: - if using a string: after two lines or exceeding one line, the string gets cut with "..." - if using a JLabel: same as string - Kindle seems to ignore any statements of vertical height or whatever - kindle seems to ignore the size options made in a PageProvider, that can be given to KPages. Can anybody tell me why, or any other experiences for these Problems? (this Part is actually the one, that really annoyes me) My Solution: (now we're going to the part page turning - JTextArea - setEditable(false) and setEnabled(false) (both for no cursor-interruption) displays all my text - as much as I want. But if it exceeds the page, I cannot view the rest of the text. I would have to calculate the amount of text fitting in the size of a display. But I don't see any functions for beeing able to calculate that (variable char size etc). does anyone have any ideas? greetings |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 278
Karma: 2511467
Join Date: Feb 2012
Device: ABC W p2
|
I'm not on programming, but isn't it possible to set the JTextArea as 600x800 (any other than Kindle Paperwhite) or 758x1024 (Paperwhites)?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Nameless Being
|
hey, thanks for the answer.
It gave the push into the right direction. Seemed to be more likely a java-problem, than a kindle one. To cut everything short, I ended up with: kta = new JTextArea(testString); KPages _page = new KPages(_myPageProvider); JScrollPane scrollPane = new JScrollPane(kta); scrollPane.setPreferredSize(new Dimension(20,702)); _page.addItem(scrollPane); _context.getRootContainer().add(_page); that produced a text area over the whole screen, thats scrollable. greets |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Is there anyway to force Kindle to show text in one page? | Julius Caesar | Kindle Formats | 14 | 09-25-2013 05:55 PM |
Images always show on new page, even if there's only 1 line of text on previous pg | SarahMB | ePub | 13 | 01-19-2013 04:37 PM |
How to show windows7 OSD keyboard on text-field? | giapage | Calibre | 0 | 01-30-2012 08:46 AM |
Dialog boxes do not show text | =X= | Nook Developer's Corner | 5 | 01-03-2011 07:51 PM |
Chinese text in table of contents/book list does not show up correctly | doremifaso | PocketBook | 0 | 06-20-2010 10:54 PM |