private void initialize ( ) { Log . addLogListener ( new LogMessageCallBack ( ) { @ Override public void debug ( String message ) { showMessage ( message ) ; } @ Override public void info ( String message ) { showMessage ( message ) ; } @ Override public void error ( String message , Throwable ex ) { if ( ex != null ) showMessage ( message + ' ' + ex . toString ( ) ) ; else showMessage ( message ) ; } } ) ; readPropertyFile ( ) ; setSystemTray ( ) ; setName ( WINDOW_NAME ) ; setTitle ( WINDOW_TITLE ) ; getTrayIcon ( ) . setToolTip ( WINDOW_TITLE ) ; java . net . URL iconURL = MainForm . class . getResource ( DEFAULTICONPATH ) ; if ( iconURL != null ) setIconImage ( java . awt . Toolkit . getDefaultToolkit ( ) . getImage ( iconURL ) ) ; setDefaultCloseOperation ( javax . swing . WindowConstants . DISPOSE_ON_CLOSE ) ; addWindowListener ( new java . awt . event . WindowAdapter ( ) { @ Override public void windowClosing ( java . awt . event . WindowEvent e ) { doClose ( ) ; } /** * @param e * @see java.awt.event.WindowAdapter#windowIconified(java.awt.event.WindowEvent) * @since 07.02.2012 */ @ Override public void windowIconified ( WindowEvent e ) { if ( useSystemTray ) setVisible ( false ) ; } /** * @param e * @see java.awt.event.WindowAdapter#windowDeiconified(java.awt.event.WindowEvent) * @since 07.02.2012 */ @ Override public void windowDeiconified ( WindowEvent e ) { if ( useSystemTray ) setVisible ( true ) ; } } ) ; setSize ( mainDialogSize ) ; setPreferredSize ( mainDialogSize ) ; setJMenuBar ( getBaseMenuBar ( ) ) ; setContentPane ( getBaseContentPane ( ) ) ; setPlayListIcons ( ) ; // Volumecontrol by mousewheel: addMouseWheelListener ( new MouseWheelVolumeControl ( ) ) ; pack ( ) ; createAllWindows ( ) ; updateLookAndFeel ( uiClassName ) ; if ( mainDialogLocation == null || ( mainDialogLocation . getX ( ) == - 1 || mainDialogLocation . getY ( ) == - 1 ) ) mainDialogLocation = Helpers . getFrameCenteredLocation ( this , null ) ; setLocation ( mainDialogLocation ) ; getModInfoDialog ( ) . setVisible ( modInfoDialogVisable ) ; getPlaylistDialog ( ) . setVisible ( playlistDialogVisable ) ; getEffectDialog ( ) . setVisible ( effectDialogVisable ) ; getPlayerSetUpDialog ( ) . setVisible ( playerSetUpDialogVisable ) ; dropTargetList = new ArrayList < DropTarget > ( ) ; PlaylistDropListener myListener = new PlaylistDropListener ( this ) ; Helpers . registerDropListener ( dropTargetList , this , myListener ) ; MultimediaContainerManager . addMultimediaContainerEventListener ( this ) ; createFileFilter ( ) ; currentContainer = null ; //set Back to null! showMessage ( "Ready..." ) ; }
Do main initials