View Javadoc
1   /*
2   Copyright 2011, Aiki IT, FotoRenamer
3   Licensed under the Apache License, Version 2.0 (the "License");
4   you may not use this file except in compliance with the License.
5   You may obtain a copy of the License at
6   
7       http://www.apache.org/licenses/LICENSE-2.0
8   
9   Unless required by applicable law or agreed to in writing, software
10  distributed under the License is distributed on an "AS IS" BASIS,
11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  See the License for the specific language governing permissions and
13  limitations under the License.
14  */
15  package de.aikiit.fotorenamer;
16  
17  import de.aikiit.fotorenamer.gui.MainUIWindow;
18  import lombok.AccessLevel;
19  import lombok.NoArgsConstructor;
20  import org.apache.logging.log4j.LogManager;
21  import org.apache.logging.log4j.Logger;
22  
23  import javax.swing.*;
24  
25  /**
26   * Main class to start the application in standalone mode.
27   *
28   * @author hirsch
29   * @version 2011-03-21, 13:06
30   */
31  @NoArgsConstructor(access = AccessLevel.PRIVATE)
32  public final class ApplicationStarter {
33      /**
34       * Logger for this class.
35       */
36      private static final Logger LOG = LogManager.getLogger(ApplicationStarter.class);
37  
38      /**
39       * Creates an application window and runs the application.
40       *
41       * @param args Runtime/CLI arguments.
42       */
43      public static void main(final String[] args) {
44          try {
45              UIManager.setLookAndFeel(
46                      UIManager.getCrossPlatformLookAndFeelClassName());
47          } catch (Exception e) {
48              LOG.error("Error during application startup: " + e);
49          }
50          MainUIWindow.build();
51      }
52  }