Package net.sf.egphilippovoss.util.swing

Examples of net.sf.egphilippovoss.util.swing.CFrame


        String preferencesKey = "TestHumanPane";
        showNewHumanFrame(nc, title, preferencesKey, actionListener);
    }

    public static void showNewHumanFrame(NamedCaller nc, String title, String preferencesKey, final ActionListener actionListener) {
        final CFrame f=new CFrame(nc, title,preferencesKey){
      private static final long serialVersionUID = -6994485943614587439L;

      public Dimension getPreferredSize() {
                return ScreenBoundsUtil.getScreenBounds().getSize();
            }

            protected int getDefaultExtendedState() {
                return Frame.MAXIMIZED_BOTH;
            }
        };
        HumanPane c=new HumanPane(nc, net.sf.abproject.addressbook.ab.datamodel.HumanImpl.createNewUnlinkedHuman(), actionListener, f);

        WindowAdapter windowListener = new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                if(actionListener.cancelPressed())f.dispose();
            }
        };
        f.getContentPane().setLayout(new BorderLayout());
        f.getContentPane().add(c);
        f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        f.addWindowListener(windowListener);
        f.setVisible(true);
    }
View Full Code Here


        rightPane.validate();
    }

    public static void showNewABFrame(
        NamedCaller nc, ab app, AddressBook addressBook,String title, String preferencesKey, final WindowListener actionListener) {
        CFrame f=new CFrame(nc, title,preferencesKey){
      private static final long serialVersionUID = -5225306661350595805L;

      public Dimension getPreferredSize() {
                return ScreenBoundsUtil.getScreenBounds().getSize();
            }

            protected int getDefaultExtendedState() {
                return Frame.MAXIMIZED_BOTH;
            }
        };
        AddressBookPane c=new AddressBookPane(nc, app, addressBook, f);
        f.getContentPane().setLayout(new BorderLayout());
        f.getContentPane().add(c);
        f.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
        f.addWindowListener(actionListener);
        f.setVisible(true);
    }}
View Full Code Here

TOP

Related Classes of net.sf.egphilippovoss.util.swing.CFrame

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.