/**
 *
 * Copyright 2010 Laurent Desgrange
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */
package net.desgrange.pwad;

import net.desgrange.pwad.service.EnvironmentService;
import net.desgrange.pwad.service.PwadService;
import net.desgrange.pwad.ui.MainForm;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.google.gdata.client.photos.PicasawebService;

public class Main {
    private static final Logger logger = LoggerFactory.getLogger(Main.class);
    private static final String APPLICATION_NAME = "pwad";
    private static final String PROPERTIES_FILE_PATH = "/pwad/pwad.properties";

    public static void main(final String... args) throws Exception {
        logger.info("Starting pwad (Picasa Web Albums Downloader)…");

        final EnvironmentService environmentService = new EnvironmentService(PROPERTIES_FILE_PATH);
        logger.info("pwad version: {}", environmentService.getVersion());

        final PicasawebService picasawebService = new PicasawebService(APPLICATION_NAME + "-" + environmentService.getVersion());
        logger.info("PicasawebService version: {}", picasawebService.getServiceVersion());

        final PwadService pwadService = new PwadService(picasawebService);
        final MainForm mainForm = new MainForm();
        mainForm.setEnvironmentService(environmentService);
        mainForm.setPwadService(pwadService);
        mainForm.setVisible(true);
    }
}

@@ -630,16 +630,99 @@
 .pwad;%0A%0A
+import javax.swing.UIManager;%0Aimport javax.swing.UnsupportedLookAndFeelException;%0A%0A
 import n
@@ -759,32 +759,32 @@
 ronmentService;%0A
-
 import net.desgr
@@ -1345,16 +1345,42 @@
 der)%E2%80%A6%22);
+%0A        setLookAndFeel();
 %0A%0A      
@@ -1993,32 +1993,32 @@
 e(pwadService);%0A
-
         mainForm
@@ -2041,11 +2041,615 @@
 );%0A    %7D
+%0A%0A    private static void setLookAndFeel() %7B%0A        try %7B%0A            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());%0A        %7D catch (final ClassNotFoundException e) %7B%0A            logger.warn(%22Unable to set look and feel%22, e);%0A        %7D catch (final InstantiationException e) %7B%0A            logger.warn(%22Unable to set look and feel%22, e);%0A        %7D catch (final IllegalAccessException e) %7B%0A            logger.warn(%22Unable to set look and feel%22, e);%0A        %7D catch (final UnsupportedLookAndFeelException e) %7B%0A            logger.warn(%22Unable to set look and feel%22, e);%0A        %7D%0A    %7D
 %0A%7D%0A

set look and feel.