|
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
JCFontChooser
is the base class for
JCFontChooserBar
and JCFontChooserPane
.
It provides common data and methods for both components.
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. |
static int |
ITALIC
The italic style support constant. |
static int |
NONE
The no style support constant. |
protected Font |
oldFont
Old font. |
protected boolean |
oldUnderline
|
static int |
UNDERLINE
The underline style support constant. |
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 | |
JCFontChooser()
Creates a font chooser with a default inital font. |
|
JCFontChooser(Font font)
Creates a font chooser with a specified initial font. |
|
JCFontChooser(Font font,
boolean underline)
Creates a font chooser with a specified initial font and underline. |
|
JCFontChooser(String name,
int style,
int size,
boolean underline)
Creates a font chooser with a specified initial font and underline. |
Method Summary | |
void |
addJCFontListener(com.klg.jclass.util.swing.JCFontListener listener)
Adds the specified listener to receive JCFontEvent objects. |
protected void |
fireJCFontChangedEvent(com.klg.jclass.util.swing.JCFontEvent event)
Notifies registered listeners of a fontChanged JCFontEvent . |
protected void |
fireJCFontChangingEvent(com.klg.jclass.util.swing.JCFontEvent event)
Notifies registered listeners of a fontChanging JCFontEvent . |
protected String |
getFontName()
Returns the font name. |
protected int |
getFontSize()
Returns the font size. |
String[] |
getNameList()
Gets the font name list. |
Font |
getSelectedFont()
Gets the selected font. |
protected static String[] |
getSizeList()
Gets the font size list. |
protected boolean |
isBold()
Returns the bold indication. |
protected boolean |
isItalic()
Returns the italic indication. |
boolean |
isUnderline()
Returns the underline indication. |
static boolean |
isUnderline(Font font)
Gets the underline text attribute for a given font. |
void |
removeJCFontListener(com.klg.jclass.util.swing.JCFontListener listener)
Removes the specified listener so it no longer receive JCFontEvent objects. |
protected void |
setBold(boolean bold)
Sets the bold indication. |
protected void |
setFontName(String name)
Sets the font name. |
protected void |
setFontSize(int size)
Sets the font size. |
protected void |
setFontValues(Font font,
boolean underline)
Sets the font values. |
protected void |
setFontValues(String name,
int style,
int size,
boolean underline)
Sets the font values. |
protected void |
setItalic(boolean italic)
Sets the italic indication. |
protected void |
setNameList()
Sets the font name list. |
protected void |
setNameList(String[] nameList)
Sets the font name list. |
protected void |
setOldFont()
Sets the old font. |
protected void |
setSelectedFont(Font font)
Sets the selected font. |
protected void |
setSelectedFont(Font font,
boolean underline)
Sets the selected font. |
protected void |
setSelectedFont(String name,
int style,
int size,
boolean underline)
Sets the selected font. |
protected void |
setUnderline(boolean underline)
Sets the underline indication. |
static Font |
setUnderline(Font font,
boolean underline)
Sets the underline text attribute for a given font. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected Font oldFont
protected boolean oldUnderline
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
Constructor Detail |
public JCFontChooser()
public JCFontChooser(Font font)
font
- the initial fontpublic JCFontChooser(Font font, boolean underline)
font
- the initial fontunderline
- true
if underline is onpublic JCFontChooser(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 setFontValues(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 onprotected void setFontValues(Font font, boolean underline)
font
- the selected fontunderline
- true
if underline is onprotected void setSelectedFont(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 onprotected void setSelectedFont(Font font, boolean underline)
font
- the selected fontunderline
- true
if underline is onprotected void setSelectedFont(Font font)
font
- the selected fontpublic Font getSelectedFont()
protected void setFontName(String name)
name
- the font nameprotected String getFontName()
protected void setFontSize(int size)
size
- the point size of the fontprotected int getFontSize()
protected void setBold(boolean bold)
bold
- true
if bold is onprotected boolean isBold()
true
if bold is onprotected void setItalic(boolean italic)
italic
- true
if underline is onprotected boolean isItalic()
true
if italic is onprotected void setUnderline(boolean underline)
underline
- true
if underline is onpublic boolean isUnderline()
true
if underline is onprotected void setNameList()
protected void setNameList(String[] nameList)
nameList
- array of font namespublic String[] getNameList()
protected static String[] getSizeList()
public void addJCFontListener(com.klg.jclass.util.swing.JCFontListener listener)
JCFontEvent
objects.
listener
- a listenerpublic void removeJCFontListener(com.klg.jclass.util.swing.JCFontListener listener)
JCFontEvent
objects.
listener
- a listenerprotected void fireJCFontChangingEvent(com.klg.jclass.util.swing.JCFontEvent event)
fontChanging JCFontEvent
.
event
- the JCFontEvent
protected void fireJCFontChangedEvent(com.klg.jclass.util.swing.JCFontEvent event)
fontChanged JCFontEvent
.
event
- the JCFontEvent
protected void setOldFont()
public static Font setUnderline(Font font, boolean underline)
font
- the initial fontunderline
- the underline indication
public static boolean isUnderline(Font font)
font
- the initial font
true
if underline is on; otherwise, false
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |