org.lyra.Interface
Class ManageOptionDialog

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Dialog
                  extended by javax.swing.JDialog
                      extended by org.lyra.Interface.ManageOptionDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class ManageOptionDialog
extends javax.swing.JDialog

The ability to manage and control features of the application start though this interface. Due to the complexity of all of the elements required to manage controls for hosts, visual aspects and playback options the tabs themselves are farmed out to other classes.

Version:
1.0.5, %Revision, 174%, %LastChangedDate, 27/10/12 3:33PM%
Author:
Martin Foster
See Also:
Serialized Form

Nested Class Summary
private  class ManageOptionDialog.Interact
          The code separation from the user interface.
 
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
 
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
 
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
 
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.JButton buttonCancel
           
private  javax.swing.JButton buttonSave
           
private  java.util.Map<java.lang.String,java.lang.String> Global
           
private  javax.swing.JLabel iconResize
           
private  Status Info
           
private  ManageOptionDialog.Interact Interface
           
private  javax.swing.JPanel jContentPane
           
private  java.util.Map<java.lang.String,java.lang.String> Lang
           
private  Ledger Logger
           
private  Comptroller Manager
           
private  Options Modes
           
private  javax.swing.JPanel panelControl
           
private  javax.swing.JPanel panelHolder
           
private  OptionsPanel panelHostOptions
           
private  HostsPanel panelHosts
           
private  InterfacePanel panelInterface
           
private  LastDotFmPanel panelLastDotFm
           
private  javax.swing.JPanel panelStatus
           
private  javax.swing.JDialog Parent
           
private  javax.swing.JScrollPane scrollHostOptions
           
private  javax.swing.JScrollPane scrollInterface
           
private  javax.swing.JScrollPane scrollLastDotFm
           
private static long serialVersionUID
           
private  javax.swing.JTabbedPane tabbedFeatures
           
 
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
 
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
ManageOptionDialog(Ledger logger, Comptroller manager, Status info, Options modes, java.util.Map<java.lang.String,java.lang.String> lang, java.util.Map<java.lang.String,java.lang.String> global, java.awt.Window parent)
          Primary application constructor which is passed all of the necessary elements in order to display settings and handle interaction.
 
Method Summary
private  javax.swing.JButton getButtonCancel()
          This method initialises buttonCancel.
private  javax.swing.JButton getButtonSave()
          This method initialises buttonSave.
private  javax.swing.JLabel getIconResize()
          This method initialises iconResize.
private  javax.swing.JPanel getJContentPane()
          This method initialises jContentPane.
private  javax.swing.JPanel getPanelControl()
          This method initialises panelControl.
private  javax.swing.JPanel getPanelHolder()
          This method initialises panelHolder.
private  OptionsPanel getPanelHostOptions()
          This method initialises panelHostOptions.
private  HostsPanel getPanelHosts()
          This method initialises panelHosts.
private  InterfacePanel getPanelInterface()
          This method initialises panelInterface.
private  LastDotFmPanel getPanelLastDotFm()
          This method initialises panelLastDotFm.
private  javax.swing.JPanel getPanelStatus()
          This method initialises panelWindow
private  javax.swing.JScrollPane getScrollHostOptions()
          This method initialises scrollHostOptions.
private  javax.swing.JScrollPane getScrollInterface()
          This method initialises scrollInterface.
private  javax.swing.JScrollPane getScrollLastDotFm()
          This method initialises scrollLastDotFm.
private  javax.swing.JTabbedPane getTabbedFeatures()
          This method initialises tabbedFeatures.
private  void initDialog(java.awt.Window parent)
          This method initialises the baseline elements for the frame and the components it houses.
 void setVisible(boolean state)
           
 
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, show, toBack
 
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

jContentPane

private javax.swing.JPanel jContentPane

tabbedFeatures

private javax.swing.JTabbedPane tabbedFeatures

scrollInterface

private javax.swing.JScrollPane scrollInterface

panelInterface

private InterfacePanel panelInterface

panelHosts

private HostsPanel panelHosts

scrollHostOptions

private javax.swing.JScrollPane scrollHostOptions

panelHostOptions

private OptionsPanel panelHostOptions

scrollLastDotFm

private javax.swing.JScrollPane scrollLastDotFm

panelLastDotFm

private LastDotFmPanel panelLastDotFm

panelHolder

private javax.swing.JPanel panelHolder

panelControl

private javax.swing.JPanel panelControl

buttonSave

private javax.swing.JButton buttonSave

buttonCancel

private javax.swing.JButton buttonCancel

panelStatus

private javax.swing.JPanel panelStatus

iconResize

private javax.swing.JLabel iconResize

Lang

private java.util.Map<java.lang.String,java.lang.String> Lang

Global

private java.util.Map<java.lang.String,java.lang.String> Global

Logger

private Ledger Logger

Manager

private Comptroller Manager

Info

private Status Info

Modes

private Options Modes

Interface

private ManageOptionDialog.Interact Interface

Parent

private javax.swing.JDialog Parent
Constructor Detail

ManageOptionDialog

public ManageOptionDialog(Ledger logger,
                          Comptroller manager,
                          Status info,
                          Options modes,
                          java.util.Map<java.lang.String,java.lang.String> lang,
                          java.util.Map<java.lang.String,java.lang.String> global,
                          java.awt.Window parent)
Primary application constructor which is passed all of the necessary elements in order to display settings and handle interaction.

Parameters:
logger - Ledger instances for debugging and information.
manager - Database access manager instance.
info - Host status instance.
modes - Options and settings on the host.
lang - Language map for independent language elements.
global - Global settings and configuration options.
parent - Parent window to block.
Method Detail

initDialog

private void initDialog(java.awt.Window parent)
This method initialises the baseline elements for the frame and the components it houses.

Parameters:
parent - Parent window to block.

getJContentPane

private javax.swing.JPanel getJContentPane()
This method initialises jContentPane. Primarily responsible for importing the bulk of the user interface elements.

Returns:
javax.swing.JPanel

getPanelControl

private javax.swing.JPanel getPanelControl()
This method initialises panelControl. Control holds all of the necessary control buttons used to manage the features and options.

Returns:
javax.swing.JPanel

getPanelStatus

private javax.swing.JPanel getPanelStatus()
This method initialises panelWindow

Returns:
javax.swing.JPanel

getIconResize

private javax.swing.JLabel getIconResize()
This method initialises iconResize.

Returns:
javax.swing.JLabel

getTabbedFeatures

private javax.swing.JTabbedPane getTabbedFeatures()
This method initialises tabbedFeatures. Permits the user to only be presented with a certain subset of the features. Makes it cleaner and more organised.

Returns:
javax.swing.JTabbedPane

getButtonSave

private javax.swing.JButton getButtonSave()
This method initialises buttonSave.

Returns:
javax.swing.JButton

getButtonCancel

private javax.swing.JButton getButtonCancel()
This method initialises buttonCancel.

Returns:
javax.swing.JButton

getPanelHolder

private javax.swing.JPanel getPanelHolder()
This method initialises panelHolder. This panel will combine the tabbed section and control buttons merging them into one defined panel.

Returns:
javax.swing.JPanel

getScrollInterface

private javax.swing.JScrollPane getScrollInterface()
This method initialises scrollInterface. It is expected that the user interface options will take up a fair amount of space, hence we have a JScrollPane work for us.

Returns:
javax.swing.JScrollPane

getScrollLastDotFm

private javax.swing.JScrollPane getScrollLastDotFm()
This method initialises scrollLastDotFm. This will permit the user to integrate with the Last.fm service. Descriptions may be lengthy hence the scroll pane.

Returns:
javax.swing.JScrollPane

getPanelHosts

private HostsPanel getPanelHosts()
This method initialises panelHosts. Imports an instance of org.lyra.Interface.Options.HostPanel which will populate the user interface.

Returns:
org.lyra.Interface.Options.HostsPanel
See Also:
HostsPanel

getPanelInterface

private InterfacePanel getPanelInterface()
This method initialises panelInterface. Imports an instance of org.lyra.Interface.Options.InterfacePanel class in order to populate the tab.

Returns:
org.lyra.Interface.Options.InterfacePanel
See Also:
InterfacePanel

getPanelLastDotFm

private LastDotFmPanel getPanelLastDotFm()
This method initialises panelLastDotFm. Imports an instance of org.lyra.LastDotFm.Options.LastDotFmPanel class in order to populate the tab.

Returns:
org.lyra.LastDotFm.Options.LastDotFmPanel
See Also:
LastDotFmPanel

getScrollHostOptions

private javax.swing.JScrollPane getScrollHostOptions()
This method initialises scrollHostOptions. Host options such as consume may overload the designated space for a window. This will permit the panel to be loaded without resizing the supporting window.

Returns:
javax.swing.JScrollPane

getPanelHostOptions

private OptionsPanel getPanelHostOptions()
This method initialises panelHostOptions. Imports an instance of org.lyra.Interface.Options.HostOptionsPanel and populates the tab for use.

Returns:
org.Lyra.Interface.Options.HostOptionsPanel
See Also:
OptionsPanel

setVisible

public void setVisible(boolean state)
Overrides:
setVisible in class java.awt.Dialog