News:

we need 2 or 3 small donations a month, and an ad or 2 each month, consistently over the year, to keep the board going.....http://www.fibsboard.com/donate.php

Main Menu

word wrap?

Started by gugu, June 07, 2012, 05:25:09 AM

Previous topic - Next topic

gugu

I use the 'system area full output'...but the text in the system window disappears off the side.  Is there a wordwrap function?

Thanks

maria

In the command line, try fooling around with the linelength and pagelength variables.

The following is from the list of FIBS commands which can be found at http://www.fibs.com/CommandReference/


The linelength and pagelength variables

Some commands produce more output than will fit on your screen. You can tell FIBS about the size of your window or screen by setting the two variables 'linelength' and 'pagelength'. The pagelength should be set to the number of lines in your window, the linelength should be set to the number of columns (or to a value slightly less than that). If you have a 80x24 screen you might issue the following commands:

> set pagelength 24
> set linelength 79

You should try 78 and 80 for the linelength too and see what you like best. You can then use the save command to make those settings permanent. Using the values from this example FIBS would wrap lines so they contain at most 79 characters and if the output of single command exceeds 23 lines it will print [Return] in the bottom line of the screen. Just hit your return key to see the next page of output, or type any other command to continue without seeing the rest of the output.

inim

Quote from: gugu on June 07, 2012, 05:25:09 AM
I use the 'system area full output'...but the text in the system window disappears off the side.  Is there a wordwrap function?

Word-wrap was broken by Java 7, so one theoretical option is to revert to Java 6. Which is not a real solution because this version is outdated and no longer maintained by Oracle starting in March 2013.

I already spent some time on trying to fix it at the code level, but I somehow do not find out what is wrong with the old code / changed in Java 7 :( It definitely is a bug which should be fixed, given I have an inspiration how to fix it.
This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

pck

JTextPane wrap behaviour on long words changed in Java 7
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7125737

Thread: Word wraping behaviour in JTextPane since Java 7
https://forums.oracle.com/forums/thread.jspa?messageID=10757680

Quote
public float getMinimumSpan(int axis) {
            switch (axis) {
            case View.X_AXIS:
                return 0;
            case View.Y_AXIS:
                return super.getMinimumSpan(axis);
            default:
                throw new IllegalArgumentException("Invalid axis: " + axis);
            }
        }

[...]

They changed algorithm of minimum size calculation. The logic is following when a row is bigger than available width the row must be broken. The first part (row) should be less than available width. The rest again is measured and can be broken once more if it's bigger than available width.

Now the tric. Size of content is defined by minimumSpan (can't be less than minimal possible). So when it's in a scroll scroll measures width and asks for minimal span. Then width of JScrollPane's content =width of vieport (or if min width is bigger =min width).

Thus when we say min=0 we always use the viewport width.

inim

This space is available for rent by advertisers. Call 0900-INIMITE today, and see your sales skyrocketing in no time! New customers receive free Vl@9rå and a penis enlargement set as a bonus! We support banners, flash banners, and scrollers. Discrete handling by our HQ on the Dutch Antilles.

diane

Should this be fixing itself now - it is very annoying...
Never give up on the things that make you smile