Package com.pcmsolutions.gui

Source Code of com.pcmsolutions.gui.SystemViewFactory

package com.pcmsolutions.gui;

import com.pcmsolutions.device.EMU.E4.gui.device.PropertiesPanel;
import com.pcmsolutions.gui.desktop.ViewInstance;
import com.pcmsolutions.gui.desktop.ZDesktopManager;
import com.pcmsolutions.system.Zoeos;
import com.pcmsolutions.system.ZoeosPreferences;
import com.pcmsolutions.system.paths.DesktopName;
import com.pcmsolutions.system.paths.ViewPath;

import javax.swing.*;

/**
* User: paulmeehan
* Date: 15-Feb-2004
* Time: 11:04:26
*/
public class SystemViewFactory {
    public static ViewInstance providePropertiesView() {
        final DesktopName name = new DesktopName(PropertiesPanel.class, SystemPathFactory.providePropertiesPath());
        final ViewPath vp = new ViewPath(ZDesktopManager.dockPROPERTIES, name);
        return new ViewInstance() {
            public JComponent getView() throws ComponentGenerationException {
                try {
                    PropertiesPanel pp = new PropertiesPanel(ZoeosPreferences.getPropertyList(), Zoeos.getInstance());
                    return pp;
                } catch (Exception e) {
                    throw new ComponentGenerationException(e.getMessage());
                }
            }

            public DesktopName getDesktopName() {
                return name;
            }

            public ViewPath getViewPath() {
                return vp;
            }
        };
    }
}
TOP

Related Classes of com.pcmsolutions.gui.SystemViewFactory

TOP
Copyright © 2018 www.massapi.com. 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.