public class StyleDialog extends Box implements PreferencesPanel
getStyleDialog()
method.Modifier and Type | Class and Description |
---|---|
static class |
StyleDialog.ColorIcon
An Icon which paints itself as a single color.
|
Box.AccessibleBox, Box.Filler
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
protected JButton |
autodetect |
protected static Map<Object,Font> |
defaultLFFonts
Map from Swing L&F property keys to the default L&F fonts.
|
protected JComboBox |
generalFont |
protected JRadioButton |
generalFontCustom |
protected JRadioButton |
generalFontDefault |
protected static String |
knownJapaneseFont
Default japanese font used if the generic fonts like SansSerif, Dialog etc. don't contain Japanese
characters.
|
protected JComboBox |
wordLookupFont |
protected JComboBox |
wordLookupFontSize |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
StyleDialog()
Creates the style dialog.
|
Modifier and Type | Method and Description |
---|---|
void |
applyPreferences()
Applies the settings from the application preferences to all style sheets.
|
static void |
applyUIFont()
Applies the UI font setting.
|
static void |
autodetectFonts()
Autodetect fonts used for the various font settings.
|
protected void |
autodetectFontsAction(JComboBox[] fonts)
Triggered if the Auto-Configure Fonts button is pressed.
|
static Font |
deriveGeneralFont(Font original)
Create a font with the font name taken from the general font settings and the style and size
taken from the original font.
|
protected JComboBox[] |
getAutodetectedFonts() |
Component |
getComponent() |
static String |
getKnownJapaneseFont()
Returns the name of a font which can display Japanese characters.
|
static StyleDialog |
getStyleDialog()
Returns the single application-wide instance.
|
String |
getTitle() |
protected void |
insertAdditionalControls(String[] allFonts)
Let subclasses add additional user interface controls.
|
protected void |
insertAndSelect(JComboBox box,
Object object)
Select an item from an immutable combo box, adding the item to the combo box model if
neccessary.
|
void |
loadPreferences()
Loads the preferences and initializes the dialog accordingly.
|
void |
savePreferences()
Saves the current dialog settings.
|
protected void |
selectJapaneseFont(String fontname)
Replaces the font selection of all fonts which can't display Japanese with the specified
font.
|
createGlue, createHorizontalBox, createHorizontalGlue, createHorizontalStrut, createRigidArea, createVerticalBox, createVerticalGlue, createVerticalStrut, getAccessibleContext, paintComponent, setLayout
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
protected static String knownJapaneseFont
protected static Map<Object,Font> defaultLFFonts
protected JButton autodetect
protected JRadioButton generalFontDefault
protected JRadioButton generalFontCustom
protected JComboBox generalFont
protected JComboBox wordLookupFont
protected JComboBox wordLookupFontSize
public static StyleDialog getStyleDialog()
public String getTitle()
getTitle
in interface PreferencesPanel
public Component getComponent()
getComponent
in interface PreferencesPanel
protected void insertAdditionalControls(String[] allFonts)
public void loadPreferences()
loadPreferences
in interface PreferencesPanel
public void savePreferences()
savePreferences
in interface PreferencesPanel
public void applyPreferences()
applyPreferences
in interface PreferencesPanel
public static void applyUIFont()
protected JComboBox[] getAutodetectedFonts()
protected void autodetectFontsAction(JComboBox[] fonts)
autodetectFonts
in that it gives the user feedback on what
was changed and it tests all available fonts (which can be slow).protected void selectJapaneseFont(String fontname)
protected void insertAndSelect(JComboBox box, Object object)
getAvailableFontFamilyNames
and getAllFonts
don't list all fonts, and a font read from the preferences file
or selected by auto-detection which is to be selected, might not be in the model of the font
combo box.public static void autodetectFonts()
public static String getKnownJapaneseFont()
null
is returned.public static Font deriveGeneralFont(Font original)
Copyright © 2001-2013 the JGloss developers. All Rights Reserved.