public final class HighlighterFactory extends Object
PENDING JW: really need the alternate striping? That's how the old AlternateRowHighlighter did it, but feels a bit wrong to have one stripe hardcoded to WHITE. Would prefer to remove.
Modifier and Type | Class and Description |
---|---|
static class |
HighlighterFactory.UIColorHighlighter
A ColorHighlighter with UI-dependent background.
|
Modifier and Type | Field and Description |
---|---|
static Color |
BEIGE
predefined colors - from old alternateRow.
|
static Color |
CLASSIC_LINE_PRINTER |
private static Highlighter |
COMPUTED_FOREGROUND_HIGHLIGHTER |
static Color |
FLORAL_WHITE |
static Color |
GENERIC_GRAY |
static Color |
LEDGER |
static Color |
LINE_PRINTER |
static Color |
NOTEPAD |
static Color |
QUICKSILVER |
Constructor and Description |
---|
HighlighterFactory() |
Modifier and Type | Method and Description |
---|---|
static Highlighter |
createAlternateStriping()
Creates and returns a Highlighter which highlights
with alternate background.
|
static Highlighter |
createAlternateStriping(Color baseBackground,
Color alternateBackground)
Creates and returns a Highlighter which highlights with
alternating background, starting with the base.
|
static Highlighter |
createAlternateStriping(Color baseBackground,
Color alternateBackground,
int linesPerStripe)
Creates and returns a Highlighter which highlights with
alternating background, starting with the base.
|
static Highlighter |
createAlternateStriping(int rowsPerGroup)
Creates and returns a Highlighter which highlights
with alternate background. the first Color.WHITE, the second
with the color depending on LF.
|
static Highlighter |
createComputedForegroundHighlighter()
Creates a highlighter that sets the foreground color to WHITE or BLACK by computing the best
match based on the current background color.
|
static Highlighter |
createSimpleStriping()
Creates and returns a Highlighter which highlights every second row
background with a color depending on the LookAndFeel.
|
static Highlighter |
createSimpleStriping(Color stripeBackground)
Creates and returns a Highlighter which highlights every second row
background with the given color.
|
static Highlighter |
createSimpleStriping(Color stripeBackground,
int rowsPerGroup)
Creates and returns a Highlighter which highlights every second row group
background with the given color.
|
static Highlighter |
createSimpleStriping(int rowsPerGroup)
Creates and returns a Highlighter which highlights every second row group
background with a color depending on LF.
|
private static Highlighter COMPUTED_FOREGROUND_HIGHLIGHTER
public static final Color LINE_PRINTER
public static final Color CLASSIC_LINE_PRINTER
public static final Color FLORAL_WHITE
public static final Color QUICKSILVER
public static final Color GENERIC_GRAY
public HighlighterFactory()
public static Highlighter createComputedForegroundHighlighter()
public static Highlighter createSimpleStriping()
public static Highlighter createSimpleStriping(int rowsPerGroup)
rowsPerGroup
- the number of rows in a grouppublic static Highlighter createSimpleStriping(Color stripeBackground)
stripeBackground
- the background color for the striping.public static Highlighter createSimpleStriping(Color stripeBackground, int rowsPerGroup)
stripeBackground
- the background color for the striping.rowsPerGroup
- the number of rows in a grouppublic static Highlighter createAlternateStriping()
public static Highlighter createAlternateStriping(int rowsPerGroup)
rowsPerGroup
- the number of rows in a grouppublic static Highlighter createAlternateStriping(Color baseBackground, Color alternateBackground)
baseBackground
- the background color for the even rows.alternateBackground
- background color for odd rows.public static Highlighter createAlternateStriping(Color baseBackground, Color alternateBackground, int linesPerStripe)
baseBackground
- the background color for the even rows.alternateBackground
- background color for odd rows.linesPerStripe
- the number of rows in a groupWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses