|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.FontSelector
public class FontSelector
A widget for selecting a font.
| Field Summary | |
|---|---|
static int |
COMBOBOX_UI
Flag for combo box UI |
static Font |
DEFAULT_FONT
Default name |
static String |
DEFAULT_NAME
Default name |
static int |
LIST_UI
Flag for a List UI |
static String[] |
styles
List of Styles |
| Constructor Summary | |
|---|---|
FontSelector()
Create a Font selector using the defaults. |
|
FontSelector(int uiType,
boolean showLabels,
boolean showSample)
Create a font selector |
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(PropertyChangeListener l)
Add a listener. |
JComponent |
getComponent()
Get the component |
Font |
getFont()
Get the font defined by the widget |
String |
getFontName()
Get the font family name |
int |
getFontSize()
Get the font size |
int |
getFontStyle()
Get the font style (Font.PLAIN, Font.BOLD, etc); |
void |
itemStateChanged(ItemEvent e)
Handle a change to a selection in any of the combo boxes. |
static void |
main(String[] s)
Test this class |
void |
removePropertyChangeListener(PropertyChangeListener l)
Remove a listener. |
void |
setFont(Font f)
Set the font defined by the widget |
void |
setFontName(String fontName)
Set the font name |
void |
setFontSize(int fontSize)
Set the font size |
void |
setFontStyle(int fontStyle)
Set the Font style (Font.PLAIN, Font.ITALIC, etc); |
void |
valueChanged(ListSelectionEvent e)
Handle a change to a selection in any of the lists. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COMBOBOX_UI
public static final int LIST_UI
public static final String[] styles
public static final String DEFAULT_NAME
public static final Font DEFAULT_FONT
| Constructor Detail |
|---|
public FontSelector()
public FontSelector(int uiType,
boolean showLabels,
boolean showSample)
uiType - UI typeshowLabels - true to show labelsshowSample - true to show sample text in the selected font| Method Detail |
|---|
public void setFontName(String fontName)
fontName - the name of the font familypublic void setFontStyle(int fontStyle)
fontStyle - style of the font.public void setFontSize(int fontSize)
fontSize - size of the fontpublic String getFontName()
public int getFontStyle()
public int getFontSize()
public JComponent getComponent()
public Font getFont()
public void setFont(Font f)
f - the font.public void itemStateChanged(ItemEvent e)
itemStateChanged in interface ItemListenere - eventpublic void valueChanged(ListSelectionEvent e)
valueChanged in interface ListSelectionListenere - eventpublic static void main(String[] s)
s - not usedpublic void addPropertyChangeListener(PropertyChangeListener l)
l - the listenerpublic void removePropertyChangeListener(PropertyChangeListener l)
l -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||