|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.izforge.izpack.gui.LabelFactory
public class LabelFactory
A label factory which can handle modified look like to present icons or present it not.
| Nested Class Summary | |
|---|---|
static class |
LabelFactory.FullLineLabel
This class is only needed to signal a different layout handling. |
| Field Summary | |
|---|---|
private static java.awt.Font |
customLabelFontObj
|
private static float |
labelFontSizeVal
|
private static boolean |
useLabelIcons
|
| Fields inherited from interface javax.swing.SwingConstants |
|---|
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
|---|---|
LabelFactory()
|
|
| Method Summary | |
|---|---|
static javax.swing.JLabel |
create(javax.swing.Icon image)
Returns a new JLabel with the horizontal alignment CENTER. |
static javax.swing.JLabel |
create(javax.swing.Icon image,
int horizontalAlignment)
Returns a new JLabel with the given horizontal alignment. |
static javax.swing.JLabel |
create(java.lang.String text)
Returns a new JLabel with the horizontal alignment CENTER. |
static javax.swing.JLabel |
create(java.lang.String text,
boolean isFullLine)
Returns a new JLabel or FullLineLabel with the horizontal alignment CENTER. |
static javax.swing.JLabel |
create(java.lang.String text,
javax.swing.Icon image,
int horizontalAlignment)
Returns a new JLabel with the given horizontal alignment. |
static javax.swing.JLabel |
create(java.lang.String text,
javax.swing.Icon image,
int horizontalAlignment,
boolean isFullLine)
Returns a new JLabel or FullLineLabel with the given horizontal alignment. |
static javax.swing.JLabel |
create(java.lang.String text,
int horizontalAlignment)
Returns a new JLabel with the given horizontal alignment. |
static javax.swing.JLabel |
create(java.lang.String text,
int horizontalAlignment,
boolean isFullLine)
Returns a new JLabel or FullLineLabel with the given horizontal alignment. |
static float |
getLabelFontSize()
Returns the current label-font-size multiplier. |
static boolean |
isUseLabelIcons()
Returns whether the factory creates labels with icons or without icons. |
static void |
setLabelFontSize(float val)
Sets the label-font-size multiplier. |
static void |
setUseLabelIcons(boolean b)
Sets the use icon state. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static boolean useLabelIcons
private static float labelFontSizeVal
private static java.awt.Font customLabelFontObj
| Constructor Detail |
|---|
public LabelFactory()
| Method Detail |
|---|
public static boolean isUseLabelIcons()
public static void setUseLabelIcons(boolean b)
b - flag for the icon statepublic static float getLabelFontSize()
public static void setLabelFontSize(float val)
val - label-font-size multiplier value to use.public static javax.swing.JLabel create(javax.swing.Icon image)
image - the image to be used as label icon
public static javax.swing.JLabel create(javax.swing.Icon image,
int horizontalAlignment)
image - the image to be used as label iconhorizontalAlignment - horizontal alignment of the label
public static javax.swing.JLabel create(java.lang.String text)
text - the text to be set
public static javax.swing.JLabel create(java.lang.String text,
boolean isFullLine)
text - the text to be setisFullLine - determines whether a FullLineLabel or a JLabel should be created
public static javax.swing.JLabel create(java.lang.String text,
int horizontalAlignment)
text - the text to be sethorizontalAlignment - horizontal alignment of the label
public static javax.swing.JLabel create(java.lang.String text,
int horizontalAlignment,
boolean isFullLine)
text - the text to be sethorizontalAlignment - horizontal alignment of the labelisFullLine - determines whether a FullLineLabel or a JLabel should be created
public static javax.swing.JLabel create(java.lang.String text,
javax.swing.Icon image,
int horizontalAlignment)
text - the text to be setimage - the image to be used as label iconhorizontalAlignment - horizontal alignment of the label
public static javax.swing.JLabel create(java.lang.String text,
javax.swing.Icon image,
int horizontalAlignment,
boolean isFullLine)
text - the text to be setimage - the image to be used as label iconhorizontalAlignment - horizontal alignment of the labelisFullLine - determines whether a FullLineLabel or a JLabel should be created
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||