By default, line numbers are not generated. You can turn them on with the showLineNumbers property, setting it either to "true" or "false".
| HTMLConverter | boolean getShowLineNumbers() void setShowLineNumbers( boolean onoff) |
|
| Java2Web | java2web ... --showLineNumbers = true | false... | |
| <j2w:convert> | <j2w:convert ... showLineNumbers="true|false" ... > |
The style applied to the generated line numbers is controlled by the lineNumberStyle property. The default value is "line-number"
| Eclipse | Netbeans | Monochrome | Citylights |
| 0049 | 0049 | 0049 | 0049 |
| HTMLConverter | String getLineNumberStyle() void setLineNumberStyle( String newStyle ) |
|
| Java2Web | java2web ... --lineNumberStyle = style ... | |
| <j2w:convert> | <j2w:convert ... lineNumberStyle ="style" ... > |
You can also control how the numeric value of a line number (49) is converted to a string prior to printing it. You might want to add leading zeros, to add thousand separators, whatever. This is controlled by the lineNumberFormat property, which has a default value of "0000", which basically means "4 digit number with leading zeros if necessary". The format that this property uses is the same as the one of the DecimalFormat class.
| HTMLConverter | String getLineNumberFormat() void setLineNumberFormat( String format) |
|
| Java2Web | java2web ... --lineNumberFormat = format ... | |
| <j2w:convert> | <j2w:convert ... lineNumberFormat ="format" ... > |