Package penny.downloadmanager.model

Examples of penny.downloadmanager.model.LookAndFeelModel


            Model.getStartupDialogModel().setVisible(true);
        } else if(e.getActionCommand().equals(COM_SORT)) {
            Model.getApplicationSettings().setSortState(View.getMainWindowView().getSorter().toString());
            Model.getSettingsSaver().save();
        } else {
            LookAndFeelModel lookModel = Model.getApplicationSettings().getLookModel();
            if (lookModel.getLookAndFeels().containsKey(e.getActionCommand())) {
                lookModel.setLookAndFeel(e.getActionCommand());
                View.initLookAndFeel();
                Model.getSettingsSaver().save();
            }
        }
    }
View Full Code Here


        downloadTable.getSelectionModel().addListSelectionListener(this);
        taskList.getSelectionModel().addListSelectionListener(this);
       
        tableSorter = TableComparatorChooser.install(downloadTable, downloads, TableComparatorChooser.MULTIPLE_COLUMN_MOUSE_WITH_UNDO, downloadFormat);
       
        LookAndFeelModel lookModel = Model.getApplicationSettings().getLookModel();
        lookMenu = new JMenu("Look And Feel", false);
        ButtonGroup lookGroup = new ButtonGroup();
        for (String name : lookModel.getLookAndFeels().keySet()) {
            JRadioButtonMenuItem button = new JRadioButtonMenuItem(name);
            lookMenu.add(button);
            lookGroup.add(button);
            if (name.equals(lookModel.getLookAndFeel())) {
                button.setSelected(true);
            }
            button.setActionCommand(name);
        }
        viewMenu.add(lookMenu);
View Full Code Here

        initLookAndFeel();
        mainWindowView.initView();
    }
   
    public static void initLookAndFeel() {
        LookAndFeelModel lookModel = Model.getApplicationSettings().getLookModel();
        try {
            UIManager.setLookAndFeel(lookModel.getLookAndFeels().get(lookModel.getLookAndFeel()));
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(View.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
View Full Code Here

            SwingUtilities.updateComponentTreeUI(window);
        }
    }

    public static void build() {
        LookAndFeelModel lookModel = Model.getApplicationSettings().getLookModel();
        if(lookModel.getLookAndFeel() == null || lookModel.getLookAndFeel().equals("")) {
            for(String name : lookModel.getLookAndFeels().keySet()) {
                if(lookModel.getLookAndFeels().get(name).equals(UIManager.getSystemLookAndFeelClassName())) {
                    lookModel.setLookAndFeel(name);
                    break;
                } else {
                    lookModel.setLookAndFeel(name);
                }
            }
        }
        initLookAndFeel();
        settingsDialogView = new DownloadSettingsDialog(Model.getSettingsDialogModel());
View Full Code Here

TOP

Related Classes of penny.downloadmanager.model.LookAndFeelModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.