org.jbudget.gui
Class PreferencesEditorPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.jbudget.gui.PreferencesEditorPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class PreferencesEditorPanel
extends javax.swing.JPanel

Author:
petrov
See Also:
Serialized Form

Nested Class Summary
private static class PreferencesEditorPanel.LocaleRenderer
           
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JLabel backgroundColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton bgBtn
           
private  JXTaskPaneContainer colorsContainer
          Task Pane container for the Colors tab.
private  javax.swing.JPanel colorsTab
          Colors Tab.
private  javax.swing.JLabel controlBackgroundColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton controlBgBtn
           
static java.lang.String customLFKey
           
private  javax.swing.JCheckBox defaultLFColorsCheckBox
           
private  org.jbudget.gui.components.ColorSelectionButton fgBtn
           
private  JXTaskPaneContainer fontContainer
          Task Pane container for the Fonts tab.
private  javax.swing.JPanel fontTab
          Fonts Tab.
private  javax.swing.JLabel foregroundColorLabel
           
private  org.jbudget.gui.components.FontSelector generalFontSelector
          Font selector panel for selecting the general UI font.
private  javax.swing.JLabel highlightColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton highlightedColorBtn
           
private  javax.swing.JComboBox lfComboBox
          Combo box for Look and Feel selections.
private  JXTaskPaneContainer lfContainer
          Task Pane container for the Look and Feel tab.
private  java.lang.String[] lfKeys
          Array of objects describing the available Look and Feel selections.
private  javax.swing.JPanel lfTab
          Look and Feel Tab.
private  JXTaskPane lfTaskPane
          Task Pane for the Look and feel selections.
private  javax.swing.JTextField lfTextField
          Text field for L&F Selections.
private  javax.swing.JComboBox localeChoice
           
private  JXTaskPane localeTaskPane
          Task Pane for selecting the locale.
static java.lang.String osDefaultLFKey
           
private  javax.swing.JCheckBox salesTaxCheckBox
           
private  javax.swing.JTextField salesTaxText
           
private  org.jbudget.gui.components.ColorSelectionButton selectedColorBtn
           
private  javax.swing.JLabel selectedColorLabel
           
static java.lang.String sysDefaultLFKey
           
private  javax.swing.JTabbedPane tabbedPane
          Tabbed Pane.
private  javax.swing.JLabel tableAltBackgroundColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton tableAltBgBtn
           
private  javax.swing.JLabel tableBackgroundColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton tableBgBtn
           
private  JXTaskPane tableColorsTaskPane
          Task Pane for the table color selections.
private  javax.swing.JCheckBox tableDefaultFontCheckBox
          Combo box for the default table font selections.
private  javax.swing.JLabel tableExpenseHighlightColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton tableExpenseHltBtn
           
private  org.jbudget.gui.components.ColorSelectionButton tableFgBtn
           
private  org.jbudget.gui.components.FontSelector tableFontSelector
          Font selector panel for selecting the table font.
private  JXTaskPane tableFontTaskPane
          Task Pane for the table font selections.
private  javax.swing.JLabel tableForegroundColorLabel
           
private  javax.swing.JLabel tableIncomeHighlightColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton tableIncomeHltBtn
           
private  javax.swing.JLabel tableSelectedHighlightColorLabel
           
private  org.jbudget.gui.components.ColorSelectionButton tableSelectedHltBtn
           
private  javax.swing.JLabel textBackgroundLabel
           
private  org.jbudget.gui.components.ColorSelectionButton textBgBtn
           
private  javax.swing.JLabel toolTipBackgroundLabel
           
private  org.jbudget.gui.components.ColorSelectionButton toolTipBgBtn
           
private  org.jbudget.gui.components.FontSelector toolTipFontSelector
          Font selector panel for selecting the tool tip font.
private  javax.swing.JCheckBox ttDefaultFontCheckBox
          Combo box for the default tool tip font selections.
private  JXTaskPane ttFontTaskPane
          Task Pane for the tool tip font selections.
private  JXTaskPane uiColorsTaskPane
          Task Pane for the general UI color selections.
private  javax.swing.JCheckBox uiDefaultFontCheckBox
          Combo box for the default UI Font selections.
private  JXTaskPane uiFontTaskPane
          Task Pane for the UI Font selections.
 
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
PreferencesEditorPanel()
          Creates a new instance of PreferencesEditorPanel
 
Method Summary
 void applySelections()
           
private  boolean checkLF(java.lang.String lfClassName)
          Checks if a look and feel class exists and can be loaded.
private  void commitColors()
          Save the colors from the Preferences Editor Panel to the GuiPreferences.
private  void commitFonts()
          Sets the Font information in the GuiPreferences object to the settings currently selected in the font pane.
private  void commitLF()
          Sets the LF key in the GuiPreferenses to correspond to the Look and Feel chosen in the GUI.
private  void initializeColorPane()
          Initializes GUI components associated with the Color Tab in the Preferences Editor Panel.
private  void initializeColorPaneActions()
          Initializes GUI actions associated with the Color Pane.
private  void initializeFontActions()
          Initializes actions associated with the font pane.
private  void initializeFontPane()
          Initializes GUI components assoicated with the Fonts tab in the Preferences Editor.
private  void initializeGUI()
          Initialize the GUI.
private  void initializeLFActions()
          Initializes actions associated with the LF selection panel.
private  void initializeLFPane()
          Initializes the L&F pane.
private  void syncFontPane()
          synchronizes the font panel with the state of the GuiPreferences object.
private  void syncLFPane()
          synchronizes the LF panel with the currently selected value.
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
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, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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
 
Methods inherited from class java.awt.Container
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, setLayout, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

tabbedPane

private final javax.swing.JTabbedPane tabbedPane
Tabbed Pane.


lfTab

private final javax.swing.JPanel lfTab
Look and Feel Tab.


lfContainer

private final JXTaskPaneContainer lfContainer
Task Pane container for the Look and Feel tab.


lfTaskPane

private final JXTaskPane lfTaskPane
Task Pane for the Look and feel selections.


lfComboBox

private final javax.swing.JComboBox lfComboBox
Combo box for Look and Feel selections.


lfTextField

private final javax.swing.JTextField lfTextField
Text field for L&F Selections.


osDefaultLFKey

public static final java.lang.String osDefaultLFKey
See Also:
Constant Field Values

sysDefaultLFKey

public static final java.lang.String sysDefaultLFKey
See Also:
Constant Field Values

customLFKey

public static final java.lang.String customLFKey
See Also:
Constant Field Values

localeTaskPane

private final JXTaskPane localeTaskPane
Task Pane for selecting the locale.


localeChoice

private javax.swing.JComboBox localeChoice

salesTaxCheckBox

private final javax.swing.JCheckBox salesTaxCheckBox

salesTaxText

private final javax.swing.JTextField salesTaxText

colorsTab

private final javax.swing.JPanel colorsTab
Colors Tab.


colorsContainer

private final JXTaskPaneContainer colorsContainer
Task Pane container for the Colors tab.


uiColorsTaskPane

private final JXTaskPane uiColorsTaskPane
Task Pane for the general UI color selections.


tableColorsTaskPane

private final JXTaskPane tableColorsTaskPane
Task Pane for the table color selections.


defaultLFColorsCheckBox

private final javax.swing.JCheckBox defaultLFColorsCheckBox

foregroundColorLabel

private final javax.swing.JLabel foregroundColorLabel

backgroundColorLabel

private final javax.swing.JLabel backgroundColorLabel

highlightColorLabel

private final javax.swing.JLabel highlightColorLabel

selectedColorLabel

private final javax.swing.JLabel selectedColorLabel

textBackgroundLabel

private final javax.swing.JLabel textBackgroundLabel

toolTipBackgroundLabel

private final javax.swing.JLabel toolTipBackgroundLabel

controlBackgroundColorLabel

private final javax.swing.JLabel controlBackgroundColorLabel

tableForegroundColorLabel

private final javax.swing.JLabel tableForegroundColorLabel

tableBackgroundColorLabel

private final javax.swing.JLabel tableBackgroundColorLabel

tableAltBackgroundColorLabel

private final javax.swing.JLabel tableAltBackgroundColorLabel

tableSelectedHighlightColorLabel

private final javax.swing.JLabel tableSelectedHighlightColorLabel

tableIncomeHighlightColorLabel

private final javax.swing.JLabel tableIncomeHighlightColorLabel

tableExpenseHighlightColorLabel

private final javax.swing.JLabel tableExpenseHighlightColorLabel

fgBtn

private org.jbudget.gui.components.ColorSelectionButton fgBtn

bgBtn

private org.jbudget.gui.components.ColorSelectionButton bgBtn

controlBgBtn

private org.jbudget.gui.components.ColorSelectionButton controlBgBtn

textBgBtn

private org.jbudget.gui.components.ColorSelectionButton textBgBtn

toolTipBgBtn

private org.jbudget.gui.components.ColorSelectionButton toolTipBgBtn

highlightedColorBtn

private org.jbudget.gui.components.ColorSelectionButton highlightedColorBtn

selectedColorBtn

private org.jbudget.gui.components.ColorSelectionButton selectedColorBtn

tableFgBtn

private org.jbudget.gui.components.ColorSelectionButton tableFgBtn

tableBgBtn

private org.jbudget.gui.components.ColorSelectionButton tableBgBtn

tableAltBgBtn

private org.jbudget.gui.components.ColorSelectionButton tableAltBgBtn

tableSelectedHltBtn

private org.jbudget.gui.components.ColorSelectionButton tableSelectedHltBtn

tableIncomeHltBtn

private org.jbudget.gui.components.ColorSelectionButton tableIncomeHltBtn

tableExpenseHltBtn

private org.jbudget.gui.components.ColorSelectionButton tableExpenseHltBtn

fontTab

private final javax.swing.JPanel fontTab
Fonts Tab.


fontContainer

private final JXTaskPaneContainer fontContainer
Task Pane container for the Fonts tab.


uiFontTaskPane

private final JXTaskPane uiFontTaskPane
Task Pane for the UI Font selections.


uiDefaultFontCheckBox

private final javax.swing.JCheckBox uiDefaultFontCheckBox
Combo box for the default UI Font selections.


ttFontTaskPane

private final JXTaskPane ttFontTaskPane
Task Pane for the tool tip font selections.


ttDefaultFontCheckBox

private final javax.swing.JCheckBox ttDefaultFontCheckBox
Combo box for the default tool tip font selections.


tableFontTaskPane

private final JXTaskPane tableFontTaskPane
Task Pane for the table font selections.


tableDefaultFontCheckBox

private final javax.swing.JCheckBox tableDefaultFontCheckBox
Combo box for the default table font selections.


generalFontSelector

private final org.jbudget.gui.components.FontSelector generalFontSelector
Font selector panel for selecting the general UI font. This changes the fonts used in buttons, menues, and other GUI components.


tableFontSelector

private final org.jbudget.gui.components.FontSelector tableFontSelector
Font selector panel for selecting the table font. This font is used in the month info table and the transaction/allocation lists.


toolTipFontSelector

private final org.jbudget.gui.components.FontSelector toolTipFontSelector
Font selector panel for selecting the tool tip font.


lfKeys

private java.lang.String[] lfKeys
Array of objects describing the available Look and Feel selections.

Constructor Detail

PreferencesEditorPanel

public PreferencesEditorPanel()
Creates a new instance of PreferencesEditorPanel

Method Detail

initializeGUI

private void initializeGUI()
Initialize the GUI.


initializeLFPane

private void initializeLFPane()
Initializes the L&F pane.


syncLFPane

private void syncLFPane()
synchronizes the LF panel with the currently selected value. Reads the currently selected L&F from the UIManager and selects the corresponding element in the list of L&F objects in the GUI.


commitLF

private void commitLF()
Sets the LF key in the GuiPreferenses to correspond to the Look and Feel chosen in the GUI.


initializeLFActions

private void initializeLFActions()
Initializes actions associated with the LF selection panel.


checkLF

private boolean checkLF(java.lang.String lfClassName)
Checks if a look and feel class exists and can be loaded.


initializeFontPane

private void initializeFontPane()
Initializes GUI components assoicated with the Fonts tab in the Preferences Editor.


initializeFontActions

private void initializeFontActions()
Initializes actions associated with the font pane.


syncFontPane

private void syncFontPane()
synchronizes the font panel with the state of the GuiPreferences object.


commitFonts

private void commitFonts()
Sets the Font information in the GuiPreferences object to the settings currently selected in the font pane.


initializeColorPane

private void initializeColorPane()
Initializes GUI components associated with the Color Tab in the Preferences Editor Panel.


initializeColorPaneActions

private void initializeColorPaneActions()
Initializes GUI actions associated with the Color Pane.


commitColors

private void commitColors()
Save the colors from the Preferences Editor Panel to the GuiPreferences.


applySelections

public void applySelections()