net.luniks.jtvd
Class TitleMenuStyleDialog

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Container
          extended byjava.awt.Window
              extended byjava.awt.Dialog
                  extended byjavax.swing.JDialog
                      extended bynet.luniks.jtvd.TitleMenuStyleDialog
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

class TitleMenuStyleDialog
extends javax.swing.JDialog

Class providing a dialog for setting the properties of the menu background, the items, and other settings like video standard and aspect ratio

Author:
Torsten Römer, luniks.net

Nested Class Summary
(package private)  class TitleMenuStyleDialog.FontStyle
          "Wrapper" class for the font styles such as Font.PLAIN
 
Nested classes inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog
 
Nested classes inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
Nested classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
private  javax.swing.JRadioButton aspect16To9RadioButton
           
private  javax.swing.JRadioButton aspect4To3RadioButton
           
private  javax.swing.ButtonGroup aspectButtonGroup
           
private  javax.swing.JPanel aspectPanel
           
private  javax.swing.ButtonGroup backgroundButtonGroup
           
private  javax.swing.JButton backgroundColorButton
           
private  javax.swing.JRadioButton backgroundColorRadioButton
           
private  javax.swing.JButton backgroundImageButton
           
private  javax.swing.JFileChooser backgroundImageChooser
           
private  javax.swing.JRadioButton backgroundImageRadioButton
           
private  javax.swing.JPanel backgroundPanel
           
private  javax.swing.JButton closeButton
           
private  javax.swing.JPanel effectPanel
           
private  java.lang.String[] effects
           
private  java.awt.Color fontColor
           
private  javax.swing.JButton fontColorButton
           
private  javax.swing.JLabel fontColorLabel
           
private  javax.swing.JComboBox fontComboBox
           
private  javax.swing.JLabel fontLabel
           
private  javax.swing.JLabel fontSizeLabel
           
private  javax.swing.JSpinner fontSizeSpinner
           
private  javax.swing.JComboBox fontStyleComboBox
           
private  javax.swing.JLabel fontStyleLabel
           
private  javax.swing.JComboBox highlightEffectComboBox
           
private  javax.swing.JLabel highlightEffectLabel
           
private  ImagePanel imagePanel
           
private  ImagePanel.Item[] items
           
private  JTVDFrame mainFrame
           
private  javax.swing.ButtonGroup normButtonGroup
           
private  javax.swing.JRadioButton normNTSCRadioButton
           
private  javax.swing.JRadioButton normPALRadioButton
           
private  javax.swing.JPanel normPanel
           
private  javax.swing.JComboBox selectEffectComboBox
           
private  javax.swing.JLabel selectEffectLabel
           
private  javax.swing.JComboBox shapeComboBox
           
private  java.awt.Color shapeEffectColor
           
private  javax.swing.JButton shapeEffectColorButton
           
private  javax.swing.JLabel shapeEffectColorLabel
           
private  javax.swing.JLabel shapeEffectPadLabel
           
private  javax.swing.JSpinner shapeEffectPadSpinner
           
private  javax.swing.JPanel shapeEffectPanel
           
private  javax.swing.JLabel shapeEffectWidthLabel
           
private  javax.swing.JSpinner shapeEffectWidthSpinner
           
private  java.awt.Color textEffectColor
           
private  javax.swing.JButton textEffectColorButton
           
private  javax.swing.JLabel textEffectColorLabel
           
private  javax.swing.JPanel textEffectPanel
           
private  javax.swing.JPanel textPanel
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
 
Fields inherited from class java.awt.Window
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
TitleMenuStyleDialog(java.awt.Frame owner, java.lang.String title, boolean modal, ImagePanel imagePanel)
          Initializes the components, sets up action listeners and so on
 
Method Summary
private  void setAspect(int aspect)
          Sets the aspect property of TitleMenuPanel
private  void setBackgroundColor()
          Opens a color chooser and sets the chosen color as new background color for the menu
private  void setBackgroundImage()
          Opens a file chooser and sets the chosen file as new background image for the menu
private  void setFont()
          Sets the font property of each item in the local list
private  void setFontColor()
          Sets the font color property of each item in the local list
private  void setFontSize()
          Sets the font size property of each item in the local list
private  void setFontStyle()
          Sets the font style property of each item in the local list
private  void setHighlightEffect()
          Sets the highlightEffect used by the menu
 void setItems(ImagePanel.Item[] items)
          Sets the local list of items that will be affected by the settings made in this dialog, usually the item(s) selected by the user.
private  void setNorm(int norm)
          Sets the norm property of TitleMenuPanel
private  void setSelectEffect()
          Sets the selectEffect used by the menu
private  void setShapeEffectColor()
          Sets the shapeEffectColor property of each menu item in the local list
private  void setShapeEffectPad()
          Sets the shapeEffectPad property of each menu item in the local list
private  void setShapeEffectWidth()
          Sets the shapeEffectWidth property of each menu item in the local list
private  void setShowImage(boolean show)
          Sets the showBackgroundImage property of TitleMenuPanel
private  void setTextEffectColor()
          Sets the textEffectColor property of each menu item in the local list
 void updateUI()
          Updates the current look and feel by calling SwingUtilities.updateComponentTreeUI() for all components in this class that are not affected by the same call for this class
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, finalize, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, transferFocusBackward, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mainFrame

private JTVDFrame mainFrame

imagePanel

private ImagePanel imagePanel

fontColor

private java.awt.Color fontColor

shapeEffectColor

private java.awt.Color shapeEffectColor

textEffectColor

private java.awt.Color textEffectColor

normPanel

private javax.swing.JPanel normPanel

aspectPanel

private javax.swing.JPanel aspectPanel

backgroundPanel

private javax.swing.JPanel backgroundPanel

textPanel

private javax.swing.JPanel textPanel

shapeEffectPanel

private javax.swing.JPanel shapeEffectPanel

textEffectPanel

private javax.swing.JPanel textEffectPanel

effectPanel

private javax.swing.JPanel effectPanel

closeButton

private javax.swing.JButton closeButton

effects

private java.lang.String[] effects

normPALRadioButton

private javax.swing.JRadioButton normPALRadioButton

normNTSCRadioButton

private javax.swing.JRadioButton normNTSCRadioButton

normButtonGroup

private javax.swing.ButtonGroup normButtonGroup

aspect4To3RadioButton

private javax.swing.JRadioButton aspect4To3RadioButton

aspect16To9RadioButton

private javax.swing.JRadioButton aspect16To9RadioButton

aspectButtonGroup

private javax.swing.ButtonGroup aspectButtonGroup

backgroundColorRadioButton

private javax.swing.JRadioButton backgroundColorRadioButton

backgroundImageRadioButton

private javax.swing.JRadioButton backgroundImageRadioButton

backgroundColorButton

private javax.swing.JButton backgroundColorButton

backgroundImageButton

private javax.swing.JButton backgroundImageButton

backgroundButtonGroup

private javax.swing.ButtonGroup backgroundButtonGroup

backgroundImageChooser

private javax.swing.JFileChooser backgroundImageChooser

fontLabel

private javax.swing.JLabel fontLabel

fontStyleLabel

private javax.swing.JLabel fontStyleLabel

fontSizeLabel

private javax.swing.JLabel fontSizeLabel

fontColorLabel

private javax.swing.JLabel fontColorLabel

fontComboBox

private javax.swing.JComboBox fontComboBox

fontStyleComboBox

private javax.swing.JComboBox fontStyleComboBox

fontSizeSpinner

private javax.swing.JSpinner fontSizeSpinner

fontColorButton

private javax.swing.JButton fontColorButton

shapeComboBox

private javax.swing.JComboBox shapeComboBox

shapeEffectColorLabel

private javax.swing.JLabel shapeEffectColorLabel

shapeEffectWidthLabel

private javax.swing.JLabel shapeEffectWidthLabel

shapeEffectPadLabel

private javax.swing.JLabel shapeEffectPadLabel

shapeEffectColorButton

private javax.swing.JButton shapeEffectColorButton

shapeEffectWidthSpinner

private javax.swing.JSpinner shapeEffectWidthSpinner

shapeEffectPadSpinner

private javax.swing.JSpinner shapeEffectPadSpinner

textEffectColorLabel

private javax.swing.JLabel textEffectColorLabel

textEffectColorButton

private javax.swing.JButton textEffectColorButton

highlightEffectLabel

private javax.swing.JLabel highlightEffectLabel

highlightEffectComboBox

private javax.swing.JComboBox highlightEffectComboBox

selectEffectLabel

private javax.swing.JLabel selectEffectLabel

selectEffectComboBox

private javax.swing.JComboBox selectEffectComboBox

items

private ImagePanel.Item[] items
Constructor Detail

TitleMenuStyleDialog

public TitleMenuStyleDialog(java.awt.Frame owner,
                            java.lang.String title,
                            boolean modal,
                            ImagePanel imagePanel)
Initializes the components, sets up action listeners and so on

Parameters:
imagePanel - reference to the JPanel used as drawing area
See Also:
JDialog
Method Detail

setNorm

private void setNorm(int norm)
Sets the norm property of TitleMenuPanel

Parameters:
norm - the norm to be used for the menu

setAspect

private void setAspect(int aspect)
Sets the aspect property of TitleMenuPanel

Parameters:
aspect - the aspect to be used for the menu

setShowImage

private void setShowImage(boolean show)
Sets the showBackgroundImage property of TitleMenuPanel

Parameters:
show - true if the background image should be shown, false otherwise

setBackgroundColor

private void setBackgroundColor()
Opens a color chooser and sets the chosen color as new background color for the menu


setBackgroundImage

private void setBackgroundImage()
Opens a file chooser and sets the chosen file as new background image for the menu


setFont

private void setFont()
Sets the font property of each item in the local list


setFontStyle

private void setFontStyle()
Sets the font style property of each item in the local list


setFontSize

private void setFontSize()
Sets the font size property of each item in the local list


setFontColor

private void setFontColor()
Sets the font color property of each item in the local list


setShapeEffectColor

private void setShapeEffectColor()
Sets the shapeEffectColor property of each menu item in the local list


setShapeEffectWidth

private void setShapeEffectWidth()
Sets the shapeEffectWidth property of each menu item in the local list


setShapeEffectPad

private void setShapeEffectPad()
Sets the shapeEffectPad property of each menu item in the local list


setTextEffectColor

private void setTextEffectColor()
Sets the textEffectColor property of each menu item in the local list


setHighlightEffect

private void setHighlightEffect()
Sets the highlightEffect used by the menu


setSelectEffect

private void setSelectEffect()
Sets the selectEffect used by the menu


setItems

public void setItems(ImagePanel.Item[] items)
Sets the local list of items that will be affected by the settings made in this dialog, usually the item(s) selected by the user. Sets the state of the controls to reflect the current settings of the selected item. If the list contains more than one item, the settings of the first item will be reflected.

Parameters:
items - the items whose settings should be changed

updateUI

public void updateUI()
Updates the current look and feel by calling SwingUtilities.updateComponentTreeUI() for all components in this class that are not affected by the same call for this class



Copyright (c) 2004, 2005 Torsten Römer, dode@luniks.net