All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.swing.visuals
Class FontPanel

    com.sas.swing.visuals.FontPanel

All Implemented Interfaces:
  java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible

    public class FontPanel

implements java.beans.PropertyChangeListener

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.

See Also:
  Serialized Form

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

### RB_KEY

    protected static final java.lang.String RB_KEY

See Also:
  Constant Field Values

### topPanel

    protected javax.swing.JPanel topPanel

### alignmentPanel

    protected javax.swing.JPanel alignmentPanel

### fontText

    protected javax.swing.JTextField fontText

### fontList

    protected javax.swing.JList fontList

### styleText

    protected javax.swing.JTextField styleText

### styleList

    protected javax.swing.JList styleList

### sizeText

    protected javax.swing.JTextField sizeText

### sizeList

    protected javax.swing.JList sizeList

### currentFont

    protected java.awt.Font currentFont

### previewLabel

    protected javax.swing.JLabel previewLabel

### defaultFontFamilyList

    protected com.sas.models.DefaultFontFamilyList defaultFontFamilyList

### STYLE_REGULAR

    protected java.lang.String STYLE_REGULAR

### STYLE_ITALIC

    protected java.lang.String STYLE_ITALIC

### STYLE_BOLD

    protected java.lang.String STYLE_BOLD

### STYLE_BOLDITALIC

    protected java.lang.String STYLE_BOLDITALIC

### useFontNameRenderer

    protected boolean useFontNameRenderer

### useFontStyleRenderer

    protected boolean useFontStyleRenderer

### useFontSizeRenderer

    protected boolean useFontSizeRenderer

### validator

    protected JTextFieldValidator validator

### prevString

    protected static final java.lang.String prevString

### fontSizes

    protected static final int[] fontSizes

Constructor Detail

### FontPanel

    public FontPanel()

Method Detail

### setDefaultValues

    public void setDefaultValues()

### createComponents

    public void createComponents()

### createFontLists

    public void createFontLists()

### createPreview

    public void createPreview()

### initialize

    public void initialize()

### setUseFontNameRenderer

    public 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. Default value is true

  Parameters:
    `b` - true to use the custom renderer, false otherwise

### getUseFontNameRenderer

    public boolean getUseFontNameRenderer()

  Returns whether to use the custom renderer to draw the names in the name list. Default value is true

  Returns:
    true if the styles are drawn in their own name, false otherwise

### setUseFontStyleRenderer

    public 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. Default value is true

  Parameters:
    `b` - true to use the custom renderer, false otherwise

### getUseFontStyleRenderer

    public boolean getUseFontStyleRenderer()

  Returns whether to use the custom renderer to draw the styles in the style list. Default value is true

  Returns:
    true if the styles are drawn in their own style, false otherwise

### setUseFontSizeRenderer

    public 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. Default value is false

  Parameters:
    `b` - true to use the custom renderer, false otherwise

### getUseFontSizeRenderer

    public boolean getUseFontSizeRenderer()

  Returns whether to use the custom renderer to draw the sizes in the size list. Default value is false

  Returns:
    false if the sizes are drawn normally, true otherwise

### updateFont

    protected void updateFont()

### getSelectedFont

    public java.awt.Font getSelectedFont()

### setSelectedFont

    public void setSelectedFont(java.awt.Font ft)

### setSelectedStyle

    protected void setSelectedStyle(int style)

### setSelectedName

    protected void setSelectedName(java.lang.String name)

### setSelectedSize

    protected void setSelectedSize(int size)

### setCurrentFont

    public void setCurrentFont(java.awt.Font font)

### getCurrentFont

    public java.awt.Font getCurrentFont()

### setCurrentFontName

    public void setCurrentFontName(java.lang.String s)

### getCurrentFontName

    public java.lang.String getCurrentFontName()

### setCurrentFontSize

    public void setCurrentFontSize(int s)

### getCurrentFontSize

    public int getCurrentFontSize()

### setCurrentFontStyle

    public void setCurrentFontStyle(int s)

### getCurrentFontStyle

    public int getCurrentFontStyle()

### propertyChange

    public void propertyChange(java.beans.PropertyChangeEvent evt)

  Specified by:
    `propertyChange` in interface `java.beans.PropertyChangeListener`

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.