|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--com.klg.jclass.util.swing.JCFontChooser | +--com.klg.jclass.util.swing.JCFontChooserPane
JCFontChooserPane
provides a pane of controls designed to allow
a user to manipulate and select a font. It is suitable for
use in a tab pane or a dialog window.
Nested Class Summary |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static int |
ALL
The all styles support constant. |
static int |
BOLD
The bold style support constant. |
protected JCheckBox |
boldCheckbox
|
protected JList |
fontNameList
|
protected JTextField |
fontNameTextField
|
protected JList |
fontSizeList
|
protected JTextField |
fontSizeTextField
|
static int |
ITALIC
The italic style support constant. |
protected JCheckBox |
italicCheckbox
|
static int |
NONE
The no style support constant. |
protected int |
styleControls
|
protected JPanel |
stylePanel
|
protected boolean |
toolTipEnabled
|
static int |
UNDERLINE
The underline style support constant. |
protected JCheckBox |
underlineCheckbox
|
Fields inherited from class com.klg.jclass.util.swing.JCFontChooser |
oldFont, oldUnderline |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
JCFontChooserPane()
Creates a font chooser pane with default initial font. |
|
JCFontChooserPane(Font font)
Creates a font chooser pane with a specified initial font. |
|
JCFontChooserPane(Font font,
boolean underline)
Creates a font chooser pane with a specified initial font and underline. |
|
JCFontChooserPane(String name,
int style,
int size,
boolean underline)
Creates a font chooser pane with a specified initial font and underline. |
Method Summary | |
void |
actionPerformed(ActionEvent e)
Implementation for the ActionListener . |
protected void |
fireJCFontEvent(int event)
Fires the font changing and font changed events. |
void |
focusGained(FocusEvent e)
Implementation for the FocusListener . |
void |
focusLost(FocusEvent e)
|
String |
getAbout()
Returns vendor information. |
int |
getStyleControls()
Gets the font style support variable. |
protected void |
init()
Initializes the component. |
boolean |
isToolTipEnabled()
Gets the tool tips text enabled indication. |
protected void |
processFontSizeTextChange()
Helper method that processes font size text field changes. |
void |
setAbout(String s)
Provided for Beans property editors - has no effect. |
protected void |
setFontChooserPane()
Sets the UI. |
void |
setNameList(String[] nameList)
Sets the font name list. |
void |
setSelectedFont(Font font)
Sets the selected font. |
void |
setSelectedFont(Font font,
boolean underline)
Sets the selected font. |
void |
setSelectedFont(String name,
int style,
int size,
boolean underline)
Sets the selected font. |
void |
setStyleControls(int controls)
Sets the font style support variable. |
void |
setToolTipEnabled(boolean toolTipEnabled)
Sets the tool tips text enabled indication.If enabled (the default setting), the parts of the fontchooserpane will have individual tooltips suggesting their purpose. |
static Font |
showDialog(Component component,
String title,
int controls,
Font initialFont)
Shows a modal font-chooser dialog and blocks until the dialog is hidden. |
protected void |
updateControls()
Updates the dialog controls. |
protected void |
updateSamplePanel()
Updates the sample text area. |
void |
valueChanged(ListSelectionEvent e)
Implementation for the ListSelectionListener. |
Methods inherited from class com.klg.jclass.util.swing.JCFontChooser |
addJCFontListener, fireJCFontChangedEvent, fireJCFontChangingEvent, getFontName, getFontSize, getNameList, getSelectedFont, getSizeList, isBold, isItalic, isUnderline, isUnderline, removeJCFontListener, setBold, setFontName, setFontSize, setFontValues, setFontValues, setItalic, setNameList, setOldFont, setUnderline, setUnderline |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int NONE
public static final int BOLD
public static final int ITALIC
public static final int UNDERLINE
public static final int ALL
protected JTextField fontNameTextField
protected JList fontNameList
protected JTextField fontSizeTextField
protected JList fontSizeList
protected JCheckBox boldCheckbox
protected JCheckBox italicCheckbox
protected JCheckBox underlineCheckbox
protected JPanel stylePanel
protected boolean toolTipEnabled
protected int styleControls
Constructor Detail |
public JCFontChooserPane()
public JCFontChooserPane(Font font)
font
- the initial fontpublic JCFontChooserPane(Font font, boolean underline)
font
- the initial fontunderline
- true
if underline is onpublic JCFontChooserPane(String name, int style, int size, boolean underline)
name
- the font namestyle
- the style constant for the fontsize
- the point size of the fontunderline
- true
if underline is onMethod Detail |
protected void init()
public void setNameList(String[] nameList)
setNameList
in class JCFontChooser
nameList
- array of font namesprotected void setFontChooserPane()
protected void updateSamplePanel()
protected void updateControls()
public void setAbout(String s)
s
- public String getAbout()
public void setStyleControls(int controls)
controls
- public int getStyleControls()
public void setToolTipEnabled(boolean toolTipEnabled)
toolTipEnabled
- true
to enablepublic boolean isToolTipEnabled()
public void actionPerformed(ActionEvent e)
ActionListener
.
actionPerformed
in interface ActionListener
e
- public void focusGained(FocusEvent e)
FocusListener
.
focusGained
in interface FocusListener
e
- public void focusLost(FocusEvent e)
focusLost
in interface FocusListener
public void valueChanged(ListSelectionEvent e)
valueChanged
in interface ListSelectionListener
e
- protected void processFontSizeTextChange()
protected void fireJCFontEvent(int event)
event
- the font change eventpublic void setSelectedFont(String name, int style, int size, boolean underline)
setSelectedFont
in class JCFontChooser
name
- the font namestyle
- the style constant for the fontsize
- the point size of the fontunderline
- true
if underline is onpublic void setSelectedFont(Font font, boolean underline)
setSelectedFont
in class JCFontChooser
font
- the selected fontunderline
- true
if underline is onpublic void setSelectedFont(Font font)
setSelectedFont
in class JCFontChooser
font
- the selected fontpublic static Font showDialog(Component component, String title, int controls, Font initialFont)
component
- controls
- initialFont
- title
-
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |