|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--java.awt.Window | +--java.awt.Dialog | +--javax.swing.JDialog | +--edu.rice.cs.util.swing.FontChooser
FontChooser, adapted from NwFontChooserS by Noah Wairauch. (see http:///forum.java.sun.com/thread.jsp?forum=57&thread=195067)
Inner Class Summary | |
class |
FontChooser.NwList
Private inner class for a list which displays a list of options in addition to a label indicating the currently selected item. |
Inner classes inherited from class javax.swing.JDialog |
JDialog.AccessibleJDialog |
Inner classes inherited from class java.awt.Dialog |
Dialog.AccessibleAWTDialog |
Inner classes inherited from class java.awt.Window |
Window.AccessibleAWTWindow |
Inner classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.AWTTreeLock |
Field Summary | |
private JButton |
_cancelButton
|
private boolean |
_clickedOK
|
private FontChooser.NwList |
_fontList
|
private JButton |
_okButton
|
private JLabel |
_sampleText
|
private FontChooser.NwList |
_sizeList
|
private FontChooser.NwList |
_styleList
|
private static String[] |
SIZES
Available font sizes. |
private static String[] |
STYLES
Available font styles. |
Fields inherited from class javax.swing.JDialog |
accessibleContext, defaultCloseOperation, rootPane, rootPaneCheckingEnabled |
Fields inherited from class java.awt.Dialog |
base, keepBlocking, modal, nameCounter, resizable, serialVersionUID, title |
Fields inherited from class java.awt.Window |
active, dbg, focusMgr, inputContext, inputContextLock, nativeActive, OPENED, ownedWindowList, state, warningString, weakThis, windowListener, windowSerializedDataVersion |
Fields inherited from class java.awt.Container |
component, containerListener, containerSerializedDataVersion, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, needsPaint, printing, printingThreads |
Fields inherited from interface javax.swing.WindowConstants |
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
private |
FontChooser(Frame parent,
Font font)
Constructs a new modal FontChooser for the given frame, using the specified font. |
Method Summary | |
private void |
addButtons()
|
private void |
addLists()
|
boolean |
clickedOK()
Returns whether the user clicked OK when the dialog was closed. |
Font |
getFont()
Returns the currently selected Font. |
private void |
initAll()
|
private void |
resize()
|
static Font |
showDialog(Frame parent,
Font font)
Shows the font chooser with a standard title ("Font Chooser"). |
static Font |
showDialog(Frame parent,
String title,
Font font)
Method used to show the font chooser, and select a new font. |
private void |
showSample()
|
Methods inherited from class java.awt.Dialog |
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
private static final String[] STYLES
private static final String[] SIZES
private FontChooser.NwList _styleList
private FontChooser.NwList _fontList
private FontChooser.NwList _sizeList
private JButton _okButton
private JButton _cancelButton
private JLabel _sampleText
private boolean _clickedOK
Constructor Detail |
private FontChooser(Frame parent, Font font)
Method Detail |
public static Font showDialog(Frame parent, String title, Font font)
parent
- The parent frame.title
- The title for this window.font
- The previously chosen font.public static Font showDialog(Frame parent, Font font)
private void initAll()
private void resize()
private void addLists()
private void addButtons()
private void showSample()
public boolean clickedOK()
public Font getFont()
getFont
in class Component
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |