|
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.JCFontChooserBar
JCFontChooserBar
provides a pane of controls designed to allow
a user to manipulate and select a font. It is suitable for
use in a JToolbar
.
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 JToggleButton |
boldStyleButton
|
static int |
ITALIC
The italic style support constant. |
protected JToggleButton |
italicStyleButton
|
protected JComboBox |
nameCombobox
|
static int |
NONE
The no style support constant. |
protected JComboBox |
sizeCombobox
|
protected int |
styleControls
|
protected boolean |
toolTipEnabled
|
static int |
UNDERLINE
The underline style support constant. |
protected JToggleButton |
underlineStyleButton
|
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 | |
JCFontChooserBar()
Creates a font chooser bar with default initial font. |
|
JCFontChooserBar(Font font)
Creates a font chooser bar with a specified initial font. |
|
JCFontChooserBar(Font font,
boolean underline)
Creates a font chooser bar with a specified initial font and underline. |
|
JCFontChooserBar(String name,
int style,
int size,
boolean underline)
Creates a font chooser bar 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 event. |
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. |
void |
itemStateChanged(ItemEvent e)
Implementation for the ItemListener . |
void |
setAbout(String s)
Provided for Beans property editors - has no effect. |
protected void |
setFontChooserBar()
Sets the UI. |
protected void |
setNameCombobox()
Populates the font name combobox. |
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. |
protected void |
updateControls()
Updates the control buttons. |
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 JComboBox nameCombobox
protected JComboBox sizeCombobox
protected JToggleButton boldStyleButton
protected JToggleButton italicStyleButton
protected JToggleButton underlineStyleButton
protected int styleControls
protected boolean toolTipEnabled
Constructor Detail |
public JCFontChooserBar()
public JCFontChooserBar(Font font)
font
- the initial fontpublic JCFontChooserBar(Font font, boolean underline)
font
- the initial fontunderline
- true
if underline is onpublic JCFontChooserBar(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()
protected void setNameCombobox()
public void setNameList(String[] nameList)
setNameList
in class JCFontChooser
nameList
- array of font namesprotected void updateControls()
public void setAbout(String s)
s
- public String getAbout()
public void setStyleControls(int controls)
controls
- public int getStyleControls()
protected void setFontChooserBar()
public void setToolTipEnabled(boolean toolTipEnabled)
toolTipEnabled
- true
to enablepublic boolean isToolTipEnabled()
public void actionPerformed(ActionEvent e)
ActionListener
.
actionPerformed
in interface ActionListener
e
- public void itemStateChanged(ItemEvent e)
ItemListener
.
itemStateChanged
in interface ItemListener
e
- 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 font
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |