|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.zfqjava.swing.JFontChooser
public class JFontChooser
JFontChooser provides a pane of controls designed to allow
a user to manipulate and select a font.
Client Property:
| Name | Value | Default Value |
|---|---|---|
| JFontChooser.forContentType |
|
text/plain |
| JFontChooser.defaultEffectEnabled |
|
Boolean.FALSE |
| Nested Class Summary | |
|---|---|
protected class |
JFontChooser.AccessibleJFontChooser
This class implements accessibility support for the JFontChooser class. |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected AccessibleContext |
accessibleContext
|
static int |
CANCEL_OPTION
Return value if cancel is chosen. |
static int |
OK_OPTION
Return value if ok is chosen. |
| Fields inherited from class javax.swing.JComponent |
|---|
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 | |
|---|---|
JFontChooser()
Constructs a JFontChooser. |
|
| Method Summary | |
|---|---|
protected JDialog |
createDialog(Component parent,
String title,
JFontChooser fontChooser,
ActionListener okListener,
ActionListener cancelListener)
Creates the dialog for the JFontChooser. |
AccessibleContext |
getAccessibleContext()
Gets the AccessibleContext associated with this JFontChooser. |
Object[] |
getEffectSet()
Returns the font effects which can be selected. |
Color |
getFontColor()
Returns the current font color. |
Locale |
getFontLocale()
Returns the current font locale. |
Object[] |
getSelectedEffects()
Returns the selected font effects. |
Font |
getSelectedFont()
Returns the selected font. |
FontChooserUI |
getUI()
Gets the UI object which implements the L&F for this component. |
String |
getUIClassID()
Returns a string that specifies the name of the L&F class that renders this component. |
protected String |
paramString()
Returns a string representation of this JFontChooser. |
void |
setEffectSet(Object[] effects)
Sets the font effects which can be selected. |
void |
setFontColor(Color fontColor)
Sets the current font color. |
void |
setFontLocale(Locale fontLocale)
Sets the current font locale. |
void |
setSelectedEffects(Object[] selectedEffects)
Sets the selected font effects. |
void |
setSelectedFont(Font font)
Sets the font to be selected. |
int |
showDialog(Component parent)
Pops up a dialog contains the JFontChooser and parented
to parent with the dialog having a default title. |
int |
showDialog(Component parent,
String title)
Pops up a dialog contains the JFontChooser and parented
to parent with the dialog having a title title. |
void |
updateUI()
Notification from the UIFactory that the L&F
has changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int OK_OPTION
public static final int CANCEL_OPTION
protected AccessibleContext accessibleContext
| Constructor Detail |
|---|
public JFontChooser()
JFontChooser.
JFontChooser()| Method Detail |
|---|
public void updateUI()
UIFactory that the L&F
has changed.
updateUI in class JComponentJComponent.updateUI()public String getUIClassID()
getUIClassID in class JComponentJComponent.getUIClassID(),
UIDefaults.getUI(javax.swing.JComponent)public FontChooserUI getUI()
public Font getSelectedFont()
setSelectedFont(java.awt.Font)public void setSelectedFont(Font font)
font - the font to be selectedgetSelectedFontpublic void setEffectSet(Object[] effects)
effects - the font effectsgetEffectSet()public Object[] getEffectSet()
setEffectSet(java.lang.Object[])public void setSelectedEffects(Object[] selectedEffects)
selectedEffects - the selected font effectsgetSelectedEffects()public Object[] getSelectedEffects()
setSelectedEffects(java.lang.Object[])public void setFontColor(Color fontColor)
fontColor - the current font colorgetFontColor()public Color getFontColor()
setFontColor(java.awt.Color)public void setFontLocale(Locale fontLocale)
fontLocale - the current font localegetFontLocale()public Locale getFontLocale()
setFontLocale(java.util.Locale)public int showDialog(Component parent)
JFontChooser and parented
to parent with the dialog having a default title.
parent - the parent of the dialogshowDialog(java.awt.Component)
public int showDialog(Component parent,
String title)
JFontChooser and parented
to parent with the dialog having a title title.
parent - the parent of the dialogtitle - the title for the dialogshowDialog(java.awt.Component)
protected JDialog createDialog(Component parent,
String title,
JFontChooser fontChooser,
ActionListener okListener,
ActionListener cancelListener)
JFontChooser.
parent - the parent of the dialogprotected String paramString()
JFontChooser.
This method
is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not
be null.
paramString in class JComponentJFontChooserpublic AccessibleContext getAccessibleContext()
getAccessibleContext in interface AccessiblegetAccessibleContext in class JComponent
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||