cz.polous.andaria
Class FrontEnd

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by cz.polous.andaria.FrontEnd
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class FrontEnd
extends javax.swing.JFrame

Predni panel aplikace - rozhrani mezi uzivatelem a logikou aplikace. Hlavni spustitelna trida, ktera ve svem kontruktoru inicializuje program.

Author:
Martin Polehla (andaria_patcher@polous.cz)
See Also:
Serialized Form

Nested Class Summary
static class FrontEnd.LABEL_TYPES
           
 
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
 
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
 
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  int defaultToolTipSpeed
           
private static FrontEnd INSTANCE
           
private  javax.swing.JButton jBCancel
           
private  javax.swing.JButton jBClose
           
private  javax.swing.JButton jBConfBrowseRunCommand
           
private  javax.swing.JButton jBConfBrowseTempPath
           
private  javax.swing.JButton jBConfBrowseUltimaOnlinePath
           
private  javax.swing.JButton jBConfLoad
           
private  javax.swing.JButton jBConfSave
           
private  javax.swing.JButton jBDeleteIntro
           
private  javax.swing.JButton jBDeleteNWB
           
private  javax.swing.JButton jBInstall
           
private  javax.swing.JButton jBInstallSelectAll
           
private  javax.swing.JButton jBInstallSelection
           
private  javax.swing.JButton jBInstallSelectNone
           
private  javax.swing.JButton jBRefreshPatchList
           
private  javax.swing.JButton jBRemoveTempFiles
           
private  javax.swing.JButton jBRenewRegistry
           
private  javax.swing.JButton jBSetAllInstalled
           
private  javax.swing.JCheckBox jChDebug
           
private  javax.swing.JLabel jLabel1
           
private  javax.swing.JLabel jLConfRunCommand
           
private  javax.swing.JLabel jLConfTempPath
           
private  javax.swing.JLabel jLConfTempPath1
           
 javax.swing.JLabel jLConfTempSize
           
private  javax.swing.JLabel jLConfUltimaOnlinePath
           
private  javax.swing.JLabel jLDownload
           
private  javax.swing.JLabel jLDownloadSpeed
           
private  javax.swing.JLabel jLInstall
           
private  javax.swing.JLabel jLInstallSpeed
           
private  javax.swing.JProgressBar jPBDownloadSingle
           
private  javax.swing.JProgressBar jPBDownloadTotal
           
private  javax.swing.JProgressBar jPBInstallSingle
           
private  javax.swing.JProgressBar jPBInstallTotal
           
private  javax.swing.JPanel jPButtons
           
private  javax.swing.JPanel jPControlsTab
           
private  javax.swing.JPanel jPDownloadProgress
           
private  javax.swing.JPanel jPDownloadProgressText
           
private  javax.swing.JPanel jPInstallProgress
           
private  javax.swing.JPanel jPInstallProgressText
           
private  javax.swing.JPanel jPPatchList
           
private  javax.swing.JPanel jPPatchListTab
           
private  javax.swing.JPanel jPSettingsTab
           
private  javax.swing.JSeparator jSeparator1
           
private  javax.swing.JSeparator jSeparator10
           
private  javax.swing.JSeparator jSeparator2
           
private  javax.swing.JSeparator jSeparator3
           
private  javax.swing.JSeparator jSeparator4
           
private  javax.swing.JSeparator jSeparator5
           
private  javax.swing.JSeparator jSeparator6
           
private  javax.swing.JSeparator jSeparator7
           
private  javax.swing.JSeparator jSeparator8
           
private  javax.swing.JSeparator jSeparator9
           
private  javax.swing.JScrollPane jSPLog
           
private  javax.swing.JScrollPane jSPPatchList
           
private  javax.swing.JTextField jTConfRunCommand
           
private  javax.swing.JTextField jTConfTempPath
           
private  javax.swing.JTextField jTConfUltimaOnlinePath
           
private  javax.swing.JTextArea jTLog
           
private  javax.swing.JTabbedPane jTPMain
           
private  Log log
           
 
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
 
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
 
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, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FrontEnd()
          Creates new form FrontEnd and call pl inicialization
 
Method Summary
private  void callCounter()
           
private  java.awt.Image getIcon(java.lang.String fileName)
           
static FrontEnd getInstance()
           
 javax.swing.JLabel getjLabel(java.lang.Object cls, int ltype)
           
 javax.swing.JProgressBar getjPBDownloadSingle()
           
 javax.swing.JProgressBar getjPBDownloadTotal()
           
 javax.swing.JProgressBar getjPBInstallSingle()
           
 javax.swing.JProgressBar getjPBInstallTotal()
           
 javax.swing.JProgressBar getjPBSingle(java.lang.Object cls)
           
 javax.swing.JProgressBar getjPBTotal(java.lang.Object cls)
           
 javax.swing.JPanel getJPPatchList()
           
private  void initComponents()
           
private  void jBCancelActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBCloseActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBConfBrowseRunCommandActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBConfBrowseTempPathActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBConfBrowseUltimaOnlinePathActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBConfLoadActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBConfSaveActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBDeleteIntroActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBDeleteNWBActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBInstallActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBInstallSelectAlljBInstallActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBInstallSelectNonejBInstallActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBRefreshPatchListActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBRemoveTempFilesActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBRenewRegistryActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jBSetAllInstalledActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jChDebugActionPerformed(java.awt.event.ActionEvent evt)
           
private  void jChDebugStateChanged(javax.swing.event.ChangeEvent evt)
           
private  void jTPMainStateChanged(javax.swing.event.ChangeEvent evt)
           
private  void loadSettings()
          Inicialize application settings and settings form.
static void main(java.lang.String[] args)
          Application runner
 void pack()
           
private  void reloadPatchList()
          PatchList pl object inicialization, display list of patches at jPList panel.
private  void saveSettings()
          Store application Settings.getInstance().
 void setJBInstall(boolean state)
           
 void setJBPatchListEnabled(boolean state)
           
 void udpateJBRemoveTempFiles()
          Renew label of Temp Files remove button
 void updateButtons()
          Update FrontEnd buttons state (enabled or disabled).
 
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
 
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
 
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, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, 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, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, 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, 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, checkImage, checkImage, 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, 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
 
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
 

Field Detail

log

private Log log

INSTANCE

private static final FrontEnd INSTANCE

defaultToolTipSpeed

private int defaultToolTipSpeed

jBCancel

private javax.swing.JButton jBCancel

jBClose

private javax.swing.JButton jBClose

jBConfBrowseRunCommand

private javax.swing.JButton jBConfBrowseRunCommand

jBConfBrowseTempPath

private javax.swing.JButton jBConfBrowseTempPath

jBConfBrowseUltimaOnlinePath

private javax.swing.JButton jBConfBrowseUltimaOnlinePath

jBConfLoad

private javax.swing.JButton jBConfLoad

jBConfSave

private javax.swing.JButton jBConfSave

jBDeleteIntro

private javax.swing.JButton jBDeleteIntro

jBDeleteNWB

private javax.swing.JButton jBDeleteNWB

jBInstall

private javax.swing.JButton jBInstall

jBInstallSelectAll

private javax.swing.JButton jBInstallSelectAll

jBInstallSelectNone

private javax.swing.JButton jBInstallSelectNone

jBInstallSelection

private javax.swing.JButton jBInstallSelection

jBRefreshPatchList

private javax.swing.JButton jBRefreshPatchList

jBRemoveTempFiles

private javax.swing.JButton jBRemoveTempFiles

jBRenewRegistry

private javax.swing.JButton jBRenewRegistry

jBSetAllInstalled

private javax.swing.JButton jBSetAllInstalled

jChDebug

private javax.swing.JCheckBox jChDebug

jLConfRunCommand

private javax.swing.JLabel jLConfRunCommand

jLConfTempPath

private javax.swing.JLabel jLConfTempPath

jLConfTempPath1

private javax.swing.JLabel jLConfTempPath1

jLConfTempSize

public javax.swing.JLabel jLConfTempSize

jLConfUltimaOnlinePath

private javax.swing.JLabel jLConfUltimaOnlinePath

jLDownload

private javax.swing.JLabel jLDownload

jLDownloadSpeed

private javax.swing.JLabel jLDownloadSpeed

jLInstall

private javax.swing.JLabel jLInstall

jLInstallSpeed

private javax.swing.JLabel jLInstallSpeed

jLabel1

private javax.swing.JLabel jLabel1

jPBDownloadSingle

private javax.swing.JProgressBar jPBDownloadSingle

jPBDownloadTotal

private javax.swing.JProgressBar jPBDownloadTotal

jPBInstallSingle

private javax.swing.JProgressBar jPBInstallSingle

jPBInstallTotal

private javax.swing.JProgressBar jPBInstallTotal

jPButtons

private javax.swing.JPanel jPButtons

jPControlsTab

private javax.swing.JPanel jPControlsTab

jPDownloadProgress

private javax.swing.JPanel jPDownloadProgress

jPDownloadProgressText

private javax.swing.JPanel jPDownloadProgressText

jPInstallProgress

private javax.swing.JPanel jPInstallProgress

jPInstallProgressText

private javax.swing.JPanel jPInstallProgressText

jPPatchList

private javax.swing.JPanel jPPatchList

jPPatchListTab

private javax.swing.JPanel jPPatchListTab

jPSettingsTab

private javax.swing.JPanel jPSettingsTab

jSPLog

private javax.swing.JScrollPane jSPLog

jSPPatchList

private javax.swing.JScrollPane jSPPatchList

jSeparator1

private javax.swing.JSeparator jSeparator1

jSeparator10

private javax.swing.JSeparator jSeparator10

jSeparator2

private javax.swing.JSeparator jSeparator2

jSeparator3

private javax.swing.JSeparator jSeparator3

jSeparator4

private javax.swing.JSeparator jSeparator4

jSeparator5

private javax.swing.JSeparator jSeparator5

jSeparator6

private javax.swing.JSeparator jSeparator6

jSeparator7

private javax.swing.JSeparator jSeparator7

jSeparator8

private javax.swing.JSeparator jSeparator8

jSeparator9

private javax.swing.JSeparator jSeparator9

jTConfRunCommand

private javax.swing.JTextField jTConfRunCommand

jTConfTempPath

private javax.swing.JTextField jTConfTempPath

jTConfUltimaOnlinePath

private javax.swing.JTextField jTConfUltimaOnlinePath

jTLog

private javax.swing.JTextArea jTLog

jTPMain

private javax.swing.JTabbedPane jTPMain
Constructor Detail

FrontEnd

public FrontEnd()
Creates new form FrontEnd and call pl inicialization

Method Detail

getInstance

public static FrontEnd getInstance()

main

public static void main(java.lang.String[] args)
Application runner

Parameters:
args - the command line arguments

reloadPatchList

private void reloadPatchList()
PatchList pl object inicialization, display list of patches at jPList panel.


setJBInstall

public void setJBInstall(boolean state)

setJBPatchListEnabled

public void setJBPatchListEnabled(boolean state)

callCounter

private void callCounter()

udpateJBRemoveTempFiles

public void udpateJBRemoveTempFiles()
Renew label of Temp Files remove button


loadSettings

private void loadSettings()
Inicialize application settings and settings form.


saveSettings

private void saveSettings()
Store application Settings.getInstance().


getIcon

private java.awt.Image getIcon(java.lang.String fileName)

getjPBDownloadSingle

public javax.swing.JProgressBar getjPBDownloadSingle()

getjPBTotal

public javax.swing.JProgressBar getjPBTotal(java.lang.Object cls)

getjPBSingle

public javax.swing.JProgressBar getjPBSingle(java.lang.Object cls)

getjLabel

public javax.swing.JLabel getjLabel(java.lang.Object cls,
                                    int ltype)

getjPBDownloadTotal

public javax.swing.JProgressBar getjPBDownloadTotal()

getjPBInstallSingle

public javax.swing.JProgressBar getjPBInstallSingle()

getjPBInstallTotal

public javax.swing.JProgressBar getjPBInstallTotal()

pack

public void pack()
Overrides:
pack in class java.awt.Window

getJPPatchList

public javax.swing.JPanel getJPPatchList()

updateButtons

public void updateButtons()
Update FrontEnd buttons state (enabled or disabled). Usualy called when downloader or installer progress state may be changed.

See Also:
cz.polous.andaria.PatchList#isWorking(), PatcherQueue.inProgress(), PatcherQueue.inProgress()

initComponents

private void initComponents()

jBSetAllInstalledActionPerformed

private void jBSetAllInstalledActionPerformed(java.awt.event.ActionEvent evt)

jChDebugStateChanged

private void jChDebugStateChanged(javax.swing.event.ChangeEvent evt)

jBCloseActionPerformed

private void jBCloseActionPerformed(java.awt.event.ActionEvent evt)

jBCancelActionPerformed

private void jBCancelActionPerformed(java.awt.event.ActionEvent evt)

jBConfLoadActionPerformed

private void jBConfLoadActionPerformed(java.awt.event.ActionEvent evt)

jBConfSaveActionPerformed

private void jBConfSaveActionPerformed(java.awt.event.ActionEvent evt)

jBConfBrowseRunCommandActionPerformed

private void jBConfBrowseRunCommandActionPerformed(java.awt.event.ActionEvent evt)

jBConfBrowseTempPathActionPerformed

private void jBConfBrowseTempPathActionPerformed(java.awt.event.ActionEvent evt)

jBConfBrowseUltimaOnlinePathActionPerformed

private void jBConfBrowseUltimaOnlinePathActionPerformed(java.awt.event.ActionEvent evt)

jBInstallActionPerformed

private void jBInstallActionPerformed(java.awt.event.ActionEvent evt)

jBRefreshPatchListActionPerformed

private void jBRefreshPatchListActionPerformed(java.awt.event.ActionEvent evt)

jBDeleteIntroActionPerformed

private void jBDeleteIntroActionPerformed(java.awt.event.ActionEvent evt)

jBDeleteNWBActionPerformed

private void jBDeleteNWBActionPerformed(java.awt.event.ActionEvent evt)

jChDebugActionPerformed

private void jChDebugActionPerformed(java.awt.event.ActionEvent evt)

jBRenewRegistryActionPerformed

private void jBRenewRegistryActionPerformed(java.awt.event.ActionEvent evt)

jBRemoveTempFilesActionPerformed

private void jBRemoveTempFilesActionPerformed(java.awt.event.ActionEvent evt)

jTPMainStateChanged

private void jTPMainStateChanged(javax.swing.event.ChangeEvent evt)

jBInstallSelectNonejBInstallActionPerformed

private void jBInstallSelectNonejBInstallActionPerformed(java.awt.event.ActionEvent evt)

jBInstallSelectAlljBInstallActionPerformed

private void jBInstallSelectAlljBInstallActionPerformed(java.awt.event.ActionEvent evt)