edu.rice.cs.drjava.ui.config
Class FontOptionComponent
java.lang.Object
|
+--edu.rice.cs.drjava.ui.config.OptionComponent
|
+--edu.rice.cs.drjava.ui.config.FontOptionComponent
- public class FontOptionComponent
- extends OptionComponent
The Graphical form of a FontOption.
- Version:
- $Id: FontOptionComponent.java,v 1.6 2002/09/02 21:24:13 csreis Exp $
Method Summary |
private void |
_updateField(Font f)
Updates the font field to display the given font. |
void |
chooseFont()
Shows a custom font chooser dialog to pick a new font. |
JComponent |
getComponent()
Return's this OptionComponent's configurable component. |
void |
setValue(Font value)
Displays the given value. |
void |
setValue(Object x0)
Sets the value that is currently displayed by this component. |
boolean |
updateConfig()
Updates the config object with the new setting. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
_button
private JButton _button
_fontField
private JTextField _fontField
_panel
private JPanel _panel
_currentFont
private Font _currentFont
_newFont
private Font _newFont
FontOptionComponent
public FontOptionComponent(FontOption opt,
String text,
Frame parent)
_updateField
private void _updateField(Font f)
- Updates the font field to display the given font.
getComponent
public JComponent getComponent()
- Return's this OptionComponent's configurable component.
- Overrides:
getComponent
in class OptionComponent
chooseFont
public void chooseFont()
- Shows a custom font chooser dialog to pick a new font.
updateConfig
public boolean updateConfig()
- Updates the config object with the new setting.
- Overrides:
updateConfig
in class OptionComponent
- Returns:
- true if the new value is set successfully
setValue
public void setValue(Font value)
- Displays the given value.
setValue
public void setValue(Object x0)
- Description copied from class:
OptionComponent
- Sets the value that is currently displayed by this component.
- Overrides:
setValue
in class OptionComponent