/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package me.ronghai.sa;

import me.ronghai.sa.bean.DataWrapperBean;
import static me.ronghai.sa.core.dispatcher.SaleAssistansDispatcher.doDispatch;
import me.ronghai.sa.view.frame.SaleAssistantFrame;
import me.ronghai.sa.view.action.callback.DispatcherCallBack;
/**
 *
 * @author L5M
 */

public class SaleAssistant {
    public static void main(String args[]){
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(SaleAssistant.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }

        doDispatch("saleAssistantController.initView", null, null, null, new DispatcherCallBack(){
            @Override
            public void callback(String action, final DataWrapperBean wrapper) {
                if("initView".equals(action)){
                    java.awt.EventQueue.invokeLater(new Runnable() {
                        @Override
                        public void run() {
                            ( (SaleAssistantFrame)wrapper.get("view")).setVisible(true);
                        }
                    }); 
                }
             }
            
        });
    }
}

@@ -203,16 +203,163 @@
 ai.sa;%0A%0A
+import java.util.logging.Level;%0Aimport java.util.logging.Logger;%0Aimport javax.swing.UIManager;%0Aimport javax.swing.UnsupportedLookAndFeelException;%0A
 import m
@@ -643,16 +643,92 @@
 stant %7B%0A
+    private static String OS = System.getProperty(%22os.name%22).toLowerCase();%0A
     publ
@@ -762,16 +762,24 @@
 args%5B%5D)%7B
+        
 %0A       
@@ -783,14 +783,584 @@
     
-try %7B%0A
+if ((OS.indexOf(%22mac%22) %3E= 0)) %7B%0A            System.setProperty(%22apple.laf.useScreenMenuBar%22, %22true%22);%0A            System.setProperty(%22com.apple.mrj.application.apple.menu.about.name%22, %22Test%22);%0A            try %7B%0A                UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());%0A            %7D catch (ClassNotFoundException %7C InstantiationException %7C IllegalAccessException %7C UnsupportedLookAndFeelException ex) %7B%0A                Logger.getLogger(SaleAssistant.class.getName()).log(Level.SEVERE, null, ex);%0A            %7D%0A        %7D else %7B%0A            try %7B%0A    
     
@@ -1481,24 +1481,28 @@
             
+    
 if (%22Nimbus%22
@@ -1544,24 +1544,28 @@
             
+  
+  
 javax.swing.
@@ -1631,16 +1631,20 @@
         
+    
 break;%0A 
@@ -1650,32 +1650,36 @@
                 
+    
 %7D%0A            %7D%0A
@@ -1668,34 +1668,42 @@
   %7D%0A            
+ 
-%7D%0A
+   %7D%0A    
         %7D catch 
@@ -1836,24 +1836,28 @@
             
+    
 java.util.lo
@@ -1965,17 +1965,50 @@
         
-%7D
+    %7D%0A        %7D%0A        %0A        %0A
 %0A%0A      

update mac os x interface