|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.swing.visuals.FontPanel
public class FontPanel
The FontPanel is a swing panel used to select a font. It provides the interface which allows the user to create a java.awt.Font object.
Field Summary | |
---|---|
protected javax.swing.JPanel |
alignmentPanel
|
protected java.awt.Font |
currentFont
|
protected com.sas.models.DefaultFontFamilyList |
defaultFontFamilyList
|
protected javax.swing.JList |
fontList
|
protected static int[] |
fontSizes
|
protected javax.swing.JTextField |
fontText
|
protected javax.swing.JLabel |
previewLabel
|
protected static java.lang.String |
prevString
|
protected static java.lang.String |
RB_KEY
|
protected javax.swing.JList |
sizeList
|
protected javax.swing.JTextField |
sizeText
|
protected java.lang.String |
STYLE_BOLD
|
protected java.lang.String |
STYLE_BOLDITALIC
|
protected java.lang.String |
STYLE_ITALIC
|
protected java.lang.String |
STYLE_REGULAR
|
protected javax.swing.JList |
styleList
|
protected javax.swing.JTextField |
styleText
|
protected javax.swing.JPanel |
topPanel
|
protected boolean |
useFontNameRenderer
|
protected boolean |
useFontSizeRenderer
|
protected boolean |
useFontStyleRenderer
|
protected JTextFieldValidator |
validator
|
Constructor Summary | |
---|---|
FontPanel()
|
Method Summary | |
---|---|
void |
createComponents()
|
void |
createFontLists()
|
void |
createPreview()
|
java.awt.Font |
getCurrentFont()
|
java.lang.String |
getCurrentFontName()
|
int |
getCurrentFontSize()
|
int |
getCurrentFontStyle()
|
java.awt.Font |
getSelectedFont()
|
boolean |
getUseFontNameRenderer()
Returns whether to use the custom renderer to draw the names in the name list. |
boolean |
getUseFontSizeRenderer()
Returns whether to use the custom renderer to draw the sizes in the size list. |
boolean |
getUseFontStyleRenderer()
Returns whether to use the custom renderer to draw the styles in the style list. |
void |
initialize()
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
|
void |
setCurrentFont(java.awt.Font font)
|
void |
setCurrentFontName(java.lang.String s)
|
void |
setCurrentFontSize(int s)
|
void |
setCurrentFontStyle(int s)
|
void |
setDefaultValues()
|
void |
setSelectedFont(java.awt.Font ft)
|
protected void |
setSelectedName(java.lang.String name)
|
protected void |
setSelectedSize(int size)
|
protected void |
setSelectedStyle(int style)
|
void |
setUseFontNameRenderer(boolean b)
Sets whether to display the font names in the font list using a renderer that will draw the names in their own font, our just use the default font for renderering. |
void |
setUseFontSizeRenderer(boolean b)
Sets whether to display the font sizes in the size list using a renderer that will draw the sizes in their own size, our just use the default size for renderering. |
void |
setUseFontStyleRenderer(boolean b)
Sets whether to display the font styles in the style list using a renderer that will draw the styles in their own style, our just use the default style for renderering. |
protected void |
updateFont()
|
Field Detail |
---|
protected static final java.lang.String RB_KEY
protected javax.swing.JPanel topPanel
protected javax.swing.JPanel alignmentPanel
protected javax.swing.JTextField fontText
protected javax.swing.JList fontList
protected javax.swing.JTextField styleText
protected javax.swing.JList styleList
protected javax.swing.JTextField sizeText
protected javax.swing.JList sizeList
protected java.awt.Font currentFont
protected javax.swing.JLabel previewLabel
protected com.sas.models.DefaultFontFamilyList defaultFontFamilyList
protected java.lang.String STYLE_REGULAR
protected java.lang.String STYLE_ITALIC
protected java.lang.String STYLE_BOLD
protected java.lang.String STYLE_BOLDITALIC
protected boolean useFontNameRenderer
protected boolean useFontStyleRenderer
protected boolean useFontSizeRenderer
protected JTextFieldValidator validator
protected static final java.lang.String prevString
protected static final int[] fontSizes
Constructor Detail |
---|
public FontPanel()
Method Detail |
---|
public void setDefaultValues()
public void createComponents()
public void createFontLists()
public void createPreview()
public void initialize()
public void setUseFontNameRenderer(boolean b)
b
- true to use the custom renderer, false otherwisepublic boolean getUseFontNameRenderer()
public void setUseFontStyleRenderer(boolean b)
b
- true to use the custom renderer, false otherwisepublic boolean getUseFontStyleRenderer()
public void setUseFontSizeRenderer(boolean b)
b
- true to use the custom renderer, false otherwisepublic boolean getUseFontSizeRenderer()
protected void updateFont()
public java.awt.Font getSelectedFont()
public void setSelectedFont(java.awt.Font ft)
protected void setSelectedStyle(int style)
protected void setSelectedName(java.lang.String name)
protected void setSelectedSize(int size)
public void setCurrentFont(java.awt.Font font)
public java.awt.Font getCurrentFont()
public void setCurrentFontName(java.lang.String s)
public java.lang.String getCurrentFontName()
public void setCurrentFontSize(int s)
public int getCurrentFontSize()
public void setCurrentFontStyle(int s)
public int getCurrentFontStyle()
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |