Generating a "jump to line number" box

Warning - java2web is now obsolete. Please use its successor: code2web

back to index

You can generate a box allowing the user to enter a line number and jump automatically to that line number. This box has more or less the following appearance (when rendered with the default CSS):

Example of a line box

By default the generation of this box is turned off, and you must enable it by setting the generateNavigationBox property to "true"

HTMLConverter   boolean getGenerateNavigationBox()
void setGenerateNavigationBox( boolean onoff)
Java2Web   java2web ... --generateNavigationBox = true | false...
<j2w:convert>   <j2w:convert ... generateNavigationBox="true|false" ... >

 

The style of the navigation box is controlled by the navigationBoxStyle property, which has a default value of "navigation".

HTMLConverter   String getNavigationBoxStyle()
void setNavigationBoxStyle( String style)
Java2Web   java2web ... --navigationBoxStyle= style...
<j2w:convert>   <j2w:convert ... navigationBoxStyle="true|false" ... >

In order to allow for localized applications, the text that appears before the input field is also configurable. It is controlled by the navigationBoxMessage property, which has a default value of "Go to line:"

HTMLConverter   String getNavigationBoxMessage()
void setNavigationBoxMessage( String style)
Java2Web   java2web ... --navigationBoxMessage= message...
<j2w:convert>   <j2w:convert ... navigationBoxMessage="message" ... >

The image used by the button is located in the same place as the icons used in the outline, and is controlled by the same property.