Package StartupProject

Source Code of StartupProject.StartMenu

package StartupProject;

import AllWidgets_with_Mapping.One2;
import ClickTester.ClickTest;
import ComplexMappingTest.MappingWindow;
import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.GridField;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.AppletConnectionInfo;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.UserWindow;
import DisplayProject.actions.WidthPolicy;
import DisplayProject.binding.BindingManager;
import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import DisplayProject.events.ClientEventManager;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.PushButtonFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.ErrorMgr;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.FrameworkUtils;
import Framework.RuntimeProperties;
import Framework.UsageException;
import TestWin.TestWindow;
import WindowTester.Runner;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.KeyboardFocusManager;
import java.awt.Window;
import java.awt.event.ComponentListener;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.lang.String;
import java.net.MalformedURLException;
import java.net.URL;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import shapes.Mainwin;
import win.BraDefinition;
import win.One;

/**
* StartMenu<p>
* <p>
* @author Generated from Forte
* @since  19-Nov-2008
*/
@RuntimeProperties(isDistributed=false, isAnchored=false, isShared=false, isTransactional=false)
@UDSWindow()
@SuppressWarnings("serial")
public class StartMenu
        extends JFrame
        implements Serializable, Observable
{

    // ----------
    // Attributes
    // ----------
    protected File DefaultHelpFile;
    protected BindingManager bindingManager = null;
    public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);

    // ------------
    // Constructors
    // ------------
    public StartMenu() {
        // Explicitly call the superclass constructor to prevent the implicit call
        super();
        this.initialize();

    }

    // ----------------------
    // Accessors and Mutators
    // ----------------------
    public File getDefaultHelpFile() {
        return DefaultHelpFile;
    }

    public void setDefaultHelpFile(File defaultHelpFile) {
        DefaultHelpFile = defaultHelpFile;
        UserWindow.createHelp(this, defaultHelpFile);
    }

    public void setHelpURL(String urlString) {
        try {
            URL url = new URL(urlString);
            UserWindow.createHelp(this, url);
        } catch (MalformedURLException e) {
            UsageException err = new UsageException("Cannot create help URL", e);
            ErrorMgr.addError(err);
            throw err;
        }
    }

    protected BindingManager getBindingManager() {
        if (this.bindingManager == null) {
            this.bindingManager = new BindingManager(this);
        }
        return bindingManager;
    }

    // -------
    // Methods
    // -------
    public void addPropertyChangeListener(String property, PropertyChangeListener listener) {
        qq_Listeners.addPropertyChangeListener(property, listener);
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        qq_Listeners.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(String property, PropertyChangeListener listener) {
        qq_Listeners.removePropertyChangeListener(property, listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        qq_Listeners.removePropertyChangeListener(listener);
    }

    /**
     * display<p>
     * <p>
     */
    public void display() {
        UserWindow.open(this);
        // ----------
        // Event Loop
        // ----------
        EventManager.startEventLoop();
        try {
            EventRegistration PushButton_Click_getqq_AllWidgetsBtn = ClientEventManager.register( this.getqq_AllWidgetsBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_ClickTesterBtn = ClientEventManager.register( this.getqq_ClickTesterBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_ComplexMappingTestBtn = ClientEventManager.register( this.getqq_ComplexMappingTestBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_Shapesbtn = ClientEventManager.register( this.getqq_Shapesbtn(), "Click" );
            EventRegistration PushButton_Click_getqq_TestWinBtn = ClientEventManager.register( this.getqq_TestWinBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_WinBraDefinition = ClientEventManager.register( this.getqq_WinBraDefinition(), "Click" );
            EventRegistration PushButton_Click_getqq_WindowTesterBtn = ClientEventManager.register( this.getqq_WindowTesterBtn(), "Click" );
            EventRegistration PushButton_Click_getqq_WinOneBtn = ClientEventManager.register( this.getqq_WinOneBtn(), "Click" );
            EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );

            while (true) {

                UIutils.processGUIActions();
                EventHandle qq_currentEvent = EventManager.waitForEvent();
                if (qq_currentEvent == null)
                    break;

                // ---------------------
                // <AllWidgetsBtn>.click
                // ---------------------
                if (qq_currentEvent.isEvent(PushButton_Click_getqq_AllWidgetsBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new One2().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // ----------------------
                // <ClickTesterBtn>.click
                // ----------------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_ClickTesterBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new ClickTest().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -----------------------------
                // <ComplexMappingTestBtn>.click
                // -----------------------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_ComplexMappingTestBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new MappingWindow().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -----------------
                // <Shapesbtn>.click
                // -----------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_Shapesbtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new Mainwin().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // ------------------
                // <TestWinBtn>.click
                // ------------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_TestWinBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new TestWindow().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // ------------------------
                // <WinBraDefinition>.click
                // ------------------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_WinBraDefinition)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new BraDefinition().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -----------------------
                // <WindowTesterBtn>.click
                // -----------------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_WindowTesterBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new Runner().display();

                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -----------------
                // <WinOneBtn>.click
                // -----------------
                else if (qq_currentEvent.isEvent(PushButton_Click_getqq_WinOneBtn)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        new One().display();


                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }

                // -------------
                // task.Shutdown
                // -------------
                else if (qq_currentEvent.isEvent(TaskHandle_Shutdown_langThreadcurrentThread)) {
                    try {
                        CursorMgr.startEvent();
                        // ================ Begin Forte Event Handler Translation ================
                        break;
                        // ================ End Forte Event Handler Translation ================
                    }
                    finally {
                        CursorMgr.endEvent();
                    }
                }
            }
            EventManager.deregister( PushButton_Click_getqq_AllWidgetsBtn );
            EventManager.deregister( PushButton_Click_getqq_ClickTesterBtn );
            EventManager.deregister( PushButton_Click_getqq_ComplexMappingTestBtn );
            EventManager.deregister( PushButton_Click_getqq_Shapesbtn );
            EventManager.deregister( PushButton_Click_getqq_TestWinBtn );
            EventManager.deregister( PushButton_Click_getqq_WinBraDefinition );
            EventManager.deregister( PushButton_Click_getqq_WindowTesterBtn );
            EventManager.deregister( PushButton_Click_getqq_WinOneBtn );
            EventManager.deregister( TaskHandle_Shutdown_langThreadcurrentThread );
        }
        //catch (Exception qq_error) {
            //Logger.getLogger("task.part.Event").error("Event loop terminated by unhandled exception: " + qq_error.getMessage(), qq_error );
            //throw qq_error;
        //}
        finally {
            EventManager.endEventLoop();
            UserWindow.close(this);
        }
    }

    // ------------------
    // Window Definitions
    // ------------------
    // <editor-fold defaultstate="collapsed" desc="Window Definitions">
    private int qq_defaultSet = 1;
    private int qq_msgNumber = 0;
    private int qq_msgSet = 0;
    protected Window primaryWindow = null;
    protected int initialX;
    protected int initialY;
    protected int qq_SystemClosePolicy = Constants.SC_ENABLEDSHUTDOWN;
    protected int qq_initialPositionPolicy = Constants.PP_SYSTEMDEFAULT;
    public GridField qq_GridField12;
    public JButton qq_AllWidgetsBtn;
    public JButton qq_ClickTesterBtn;
    public JButton qq_ComplexMappingTestBtn;
    public JButton qq_Shapesbtn;
    public JButton qq_TestWinBtn;
    public JButton qq_WinBraDefinition;
    public JButton qq_WinOneBtn;
    public JButton qq_WindowTesterBtn;
    public JPanel Form;

    /**
     * qq_AllWidgetsBtn: transformed from: qqds_PushButton
     * TagId=13
     * isInherited=FALSE
     */
    public JButton getqq_AllWidgetsBtn() {
        if (qq_AllWidgetsBtn == null) {
            qq_AllWidgetsBtn = PushButtonFactory.newInstance("AllWidgetsBtn", "All Widgets");
            qq_AllWidgetsBtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_AllWidgetsBtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_AllWidgetsBtn, Constants.SP_NATURAL);
            qq_AllWidgetsBtn.setMinimumSize(new Dimension(67, 23));
        }
        return qq_AllWidgetsBtn;
    }

    public void setqq_AllWidgetsBtn(JButton value) {
        JButton oldValue = qq_AllWidgetsBtn;
        qq_AllWidgetsBtn = value;
        this.qq_Listeners.firePropertyChange("qq_AllWidgetsBtn", oldValue, value);
    }

    /**
     * qq_ClickTesterBtn: transformed from: qqds_PushButton
     * TagId=14
     * isInherited=FALSE
     */
    public JButton getqq_ClickTesterBtn() {
        if (qq_ClickTesterBtn == null) {
            qq_ClickTesterBtn = PushButtonFactory.newInstance("ClickTesterBtn", "Click Tester");
            qq_ClickTesterBtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_ClickTesterBtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_ClickTesterBtn, Constants.SP_NATURAL);
            qq_ClickTesterBtn.setMinimumSize(new Dimension(69, 23));
        }
        return qq_ClickTesterBtn;
    }

    public void setqq_ClickTesterBtn(JButton value) {
        JButton oldValue = qq_ClickTesterBtn;
        qq_ClickTesterBtn = value;
        this.qq_Listeners.firePropertyChange("qq_ClickTesterBtn", oldValue, value);
    }

    /**
     * qq_ComplexMappingTestBtn: transformed from: qqds_PushButton
     * TagId=15
     * isInherited=FALSE
     */
    public JButton getqq_ComplexMappingTestBtn() {
        if (qq_ComplexMappingTestBtn == null) {
            qq_ComplexMappingTestBtn = PushButtonFactory.newInstance("ComplexMappingTestBtn", "Complex Mapping Test");
            qq_ComplexMappingTestBtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_ComplexMappingTestBtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_ComplexMappingTestBtn, Constants.SP_NATURAL);
            qq_ComplexMappingTestBtn.setMinimumSize(new Dimension(125, 23));
        }
        return qq_ComplexMappingTestBtn;
    }

    public void setqq_ComplexMappingTestBtn(JButton value) {
        JButton oldValue = qq_ComplexMappingTestBtn;
        qq_ComplexMappingTestBtn = value;
        this.qq_Listeners.firePropertyChange("qq_ComplexMappingTestBtn", oldValue, value);
    }

    /**
     * qq_Shapesbtn: transformed from: qqds_PushButton
     * TagId=16
     * isInherited=FALSE
     */
    public JButton getqq_Shapesbtn() {
        if (qq_Shapesbtn == null) {
            qq_Shapesbtn = PushButtonFactory.newInstance("Shapesbtn", "Shapes");
            qq_Shapesbtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_Shapesbtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_Shapesbtn, Constants.SP_NATURAL);
            qq_Shapesbtn.setMinimumSize(new Dimension(49, 23));
        }
        return qq_Shapesbtn;
    }

    public void setqq_Shapesbtn(JButton value) {
        JButton oldValue = qq_Shapesbtn;
        qq_Shapesbtn = value;
        this.qq_Listeners.firePropertyChange("qq_Shapesbtn", oldValue, value);
    }

    /**
     * qq_TestWinBtn: transformed from: qqds_PushButton
     * TagId=17
     * isInherited=FALSE
     */
    public JButton getqq_TestWinBtn() {
        if (qq_TestWinBtn == null) {
            qq_TestWinBtn = PushButtonFactory.newInstance("TestWinBtn", "Test Win");
            qq_TestWinBtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_TestWinBtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_TestWinBtn, Constants.SP_NATURAL);
            qq_TestWinBtn.setMinimumSize(new Dimension(57, 23));
        }
        return qq_TestWinBtn;
    }

    public void setqq_TestWinBtn(JButton value) {
        JButton oldValue = qq_TestWinBtn;
        qq_TestWinBtn = value;
        this.qq_Listeners.firePropertyChange("qq_TestWinBtn", oldValue, value);
    }

    /**
     * qq_WinOneBtn: transformed from: qqds_PushButton
     * TagId=18
     * isInherited=FALSE
     */
    public JButton getqq_WinOneBtn() {
        if (qq_WinOneBtn == null) {
            qq_WinOneBtn = PushButtonFactory.newInstance("WinOneBtn", "Win/One");
            qq_WinOneBtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_WinOneBtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_WinOneBtn, Constants.SP_NATURAL);
            qq_WinOneBtn.setMinimumSize(new Dimension(57, 23));
        }
        return qq_WinOneBtn;
    }

    public void setqq_WinOneBtn(JButton value) {
        JButton oldValue = qq_WinOneBtn;
        qq_WinOneBtn = value;
        this.qq_Listeners.firePropertyChange("qq_WinOneBtn", oldValue, value);
    }

    /**
     * qq_WinBraDefinition: transformed from: qqds_PushButton
     * TagId=19
     * isInherited=FALSE
     */
    public JButton getqq_WinBraDefinition() {
        if (qq_WinBraDefinition == null) {
            qq_WinBraDefinition = PushButtonFactory.newInstance("WinBraDefinition", "win/Bra Definition");
            qq_WinBraDefinition.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_WinBraDefinition, Constants.SP_NATURAL);
            HeightPolicy.set(qq_WinBraDefinition, Constants.SP_NATURAL);
            qq_WinBraDefinition.setMinimumSize(new Dimension(98, 23));
        }
        return qq_WinBraDefinition;
    }

    public void setqq_WinBraDefinition(JButton value) {
        JButton oldValue = qq_WinBraDefinition;
        qq_WinBraDefinition = value;
        this.qq_Listeners.firePropertyChange("qq_WinBraDefinition", oldValue, value);
    }

    /**
     * qq_WindowTesterBtn: transformed from: qqds_PushButton
     * TagId=20
     * isInherited=FALSE
     */
    public JButton getqq_WindowTesterBtn() {
        if (qq_WindowTesterBtn == null) {
            qq_WindowTesterBtn = PushButtonFactory.newInstance("WindowTesterBtn", "Window Tester");
            qq_WindowTesterBtn.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_WindowTesterBtn, Constants.SP_NATURAL);
            HeightPolicy.set(qq_WindowTesterBtn, Constants.SP_NATURAL);
            qq_WindowTesterBtn.setMinimumSize(new Dimension(88, 23));
        }
        return qq_WindowTesterBtn;
    }

    public void setqq_WindowTesterBtn(JButton value) {
        JButton oldValue = qq_WindowTesterBtn;
        qq_WindowTesterBtn = value;
        this.qq_Listeners.firePropertyChange("qq_WindowTesterBtn", oldValue, value);
    }

    /**
     * qq_GridField12: transformed from: qqds_GridField
     * TagId=12
     * isInherited=FALSE
     * In forte this was a 1x8 grid field.
     * The cell margins are all 100 mils
     * The width policy is set to Natural, and the height policy is set to Natural.
     */
    protected void setqq_GridField12Properties() {
        qq_GridField12.setCellTopMargin(50);
        qq_GridField12.setCellBottomMargin(50);
        qq_GridField12.setCellLeftMargin(50);
        qq_GridField12.setCellRightMargin(50);
        qq_GridField12.setCollapsed(true);
        qq_GridField12.setHeightPolicy(Constants.SP_NATURAL);
        qq_GridField12.setWidthPolicy(Constants.SP_NATURAL);
        qq_GridField12.setBackground(null);
    }

    public GridField getqq_GridField12() {
        if (qq_GridField12 == null) {
            qq_GridField12 = CompoundFieldFactory.newGridField("qq_GridField12", true);
            setqq_GridField12Properties();
            qq_GridField12.setMinimumSize(new Dimension(144, 271));
            GridBagConstraints qq_gbc = new GridBagConstraints();
            qq_gbc.gridx = 0; // Column 1
            qq_gbc.gridy = 0; // Row 1
            qq_gbc.weightx = 0;
            qq_gbc.weighty = 0;
            qq_gbc.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_AllWidgetsBtn(), qq_gbc );

            GridBagConstraints qq_gbc1 = new GridBagConstraints();
            qq_gbc1.gridx = 0; // Column 1
            qq_gbc1.gridy = 1; // Row 2
            qq_gbc1.weightx = 0;
            qq_gbc1.weighty = 0;
            qq_gbc1.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc1.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc1.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_ClickTesterBtn(), qq_gbc1 );

            GridBagConstraints qq_gbc2 = new GridBagConstraints();
            qq_gbc2.gridx = 0; // Column 1
            qq_gbc2.gridy = 2; // Row 3
            qq_gbc2.weightx = 0;
            qq_gbc2.weighty = 0;
            qq_gbc2.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc2.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc2.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_ComplexMappingTestBtn(), qq_gbc2 );

            GridBagConstraints qq_gbc3 = new GridBagConstraints();
            qq_gbc3.gridx = 0; // Column 1
            qq_gbc3.gridy = 3; // Row 4
            qq_gbc3.weightx = 0;
            qq_gbc3.weighty = 0;
            qq_gbc3.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc3.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc3.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_Shapesbtn(), qq_gbc3 );

            GridBagConstraints qq_gbc4 = new GridBagConstraints();
            qq_gbc4.gridx = 0; // Column 1
            qq_gbc4.gridy = 4; // Row 5
            qq_gbc4.weightx = 0;
            qq_gbc4.weighty = 0;
            qq_gbc4.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc4.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc4.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_TestWinBtn(), qq_gbc4 );

            GridBagConstraints qq_gbc5 = new GridBagConstraints();
            qq_gbc5.gridx = 0; // Column 1
            qq_gbc5.gridy = 5; // Row 6
            qq_gbc5.weightx = 0;
            qq_gbc5.weighty = 0;
            qq_gbc5.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc5.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc5.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_WinOneBtn(), qq_gbc5 );

            GridBagConstraints qq_gbc6 = new GridBagConstraints();
            qq_gbc6.gridx = 0; // Column 1
            qq_gbc6.gridy = 6; // Row 7
            qq_gbc6.weightx = 0;
            qq_gbc6.weighty = 0;
            qq_gbc6.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc6.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc6.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_WinBraDefinition(), qq_gbc6 );

            GridBagConstraints qq_gbc7 = new GridBagConstraints();
            qq_gbc7.gridx = 0; // Column 1
            qq_gbc7.gridy = 7; // Row 8
            qq_gbc7.weightx = 0;
            qq_gbc7.weighty = 0;
            qq_gbc7.anchor = GridBagConstraints.CENTER; // Gravity - original: CG_DEFAULT gf
            qq_gbc7.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc7.insets = new Insets(4, 4, 4, 4); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_WindowTesterBtn(), qq_gbc7 );

        }
        return qq_GridField12;
    }

    public void setqq_GridField12(GridField value) {
        GridField oldValue = qq_GridField12;
        qq_GridField12 = value;
        this.qq_Listeners.firePropertyChange("qq_GridField12", oldValue, value);
    }

    /**
     * Form: transformed from: qqds_Panel
     * TagId=1
     * isInherited=FALSE
     */
    protected void setFormProperties() {
        Form.setOpaque( true );
    }

    public JPanel getForm() {
        if (Form == null) {
            Form = CompoundFieldFactory.newForm();
            this.setFormProperties();
            Form.add( getqq_GridField12() );
        }
        return Form;
    }

    public void setForm(JPanel value) {
        JPanel oldValue = Form;
        Form = value;
        this.qq_Listeners.firePropertyChange("Form", oldValue, value);
    }

    /**
     * Gets the system close policy
     *
     * The SystemClosePolicy property determines how a window responds to user attempts to close it by using the native window system through the window close box or a window system menu command.
     * SystemClosePolicy responds to window closure attempts according to the following parameters:
     * <li>Constants.SC_DISABLED  Does not allow window closure through window system.</li>
     * <li>Constants.SC_ENABLEDNOFINALIZE  Window can be closed, but the contents are not verified, guaranteeing that the window will close (for example, the user clicks the Cancel button).</li>
     * <li>Constants.SC_ENABLEDFINALIZE  Posts the RequestFinalize method on the window, with a reason code of zero.</li>
     * <li>Constants.SC_ENABLEDSHUTDOWN  Posts Shutdown event to window�s task and to all tasks started by that task. This is the default value.</li>
     */
    public int getSystemClosePolicy() {
        return qq_SystemClosePolicy;
    }

    /**
     * Sets the system close policy
     *
     * The SystemClosePolicy property determines how a window responds to user attempts to close it by using the native window system through the window close box or a window system menu command.
     * SystemClosePolicy responds to window closure attempts according to the following parameters:
     * <li>Constants.SC_DISABLED  Does not allow window closure through window system.</li>
     * <li>Constants.SC_ENABLEDNOFINALIZE  Window can be closed, but the contents are not verified, guaranteeing that the window will close (for example, the user clicks the Cancel button).</li>
     * <li>Constants.SC_ENABLEDFINALIZE  Posts the RequestFinalize method on the window, with a reason code of zero.</li>
     * <li>Constants.SC_ENABLEDSHUTDOWN  Posts Shutdown event to window�s task and to all tasks started by that task. This is the default value.</li>
     */
    public void setSystemClosePolicy(int policy) {
        this.qq_SystemClosePolicy = policy;
        if (policy == Constants.SC_DISABLED) {
            this.addComponentListener(new CloseHideAdaptor(this));
        } else {
            for (ComponentListener cl : this.getComponentListeners()) {
                if (cl instanceof CloseHideAdaptor) {
                    this.removeComponentListener(cl);
                    break;
                }
            }
        }
    }

    /**
     * Gets the initial position policy
     *
     * The InitialPositionPolicy property sets the position of a main window when it is first displayed, relative to a primary window or the screen.
     * You use the InitialPositionPolicy property in conjunction with the InitialX, InitialY properties.
     * InitialPositionPolicy sets the position of a window according to the following values:
     * <li>Constants.PP_SYSTEMDEFAULT    Accepts the default window system placement specification.</li>
     * <li>Constants.PP_PRIMARYCENTERED  Centers the window relative to the window specified as the PrimaryWindow property.</li>
     * <li>Constants.PP_PRIMARYRELATIVE  Positions the window relative to the primary window, using the PrimaryWindow, InitialX and InitialY attributes.</li>
     * <li>Constants.PP_SCREENCENTERED  Centers the window relative to the screen.</li>
     * <li>Constants.PP_SCREENRELATIVE  Positions the window relative to the screen, using the InitialX and InitialY properties.</li>
     */
    public int getInitialPositionPolicy() {
        return qq_initialPositionPolicy;
    }

    /**
     * Sets the initial position policy
     *
     * The InitialPositionPolicy property sets the position of a main window when it is first displayed, relative to a primary window or the screen.
     * You use the InitialPositionPolicy property in conjunction with the InitialX, InitialY properties.
     * InitialPositionPolicy sets the position of a window according to the following values:
     * <li>Constants.PP_SYSTEMDEFAULT    Accepts the default window system placement specification.</li>
     * <li>Constants.PP_PRIMARYCENTERED  Centers the window relative to the window specified as the PrimaryWindow property.</li>
     * <li>Constants.PP_PRIMARYRELATIVE  Positions the window relative to the primary window, using the PrimaryWindow, InitialX and InitialY attributes.</li>
     * <li>Constants.PP_SCREENCENTERED  Centers the window relative to the screen.</li>
     * <li>Constants.PP_SCREENRELATIVE  Positions the window relative to the screen, using the InitialX and InitialY properties.</li>
     */
    public void setInitialPositionPolicy(int policy) {
        this.qq_initialPositionPolicy = policy;
    }

    /**
     * Gets the primary window
     *
     * The primary window property designates a window, known as a primary window, to serve as an initial position reference for the current window.
     * When a main window first realizes itself through the Open method on the UserWindow, it assumes a position according to the InitialPositionPolicy attribute.
     * When the InitialPositionPolicy property is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_PRIMARYCENTERED (centered on the primary window),
     * the window realizes itself in a position relative to the designated primary window.<p>
     * <p>
     * To take a position relative to the primary window, a window uses the PrimaryWindow attribute in conjunction with the InitialX and InitialY properties, which specify the window�s horizontal and vertical coordinates.
     */
    public Window getPrimaryWindow() {
        return this.primaryWindow;
    }

    /**
     * Sets the primary window
     *
     * The primary window property designates a window, known as a primary window, to serve as an initial position reference for the current window.
     * When a main window first realizes itself through the Open method on the UserWindow, it assumes a position according to the InitialPositionPolicy attribute.
     * When the InitialPositionPolicy property is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_PRIMARYCENTERED (centered on the primary window),
     * the window realizes itself in a position relative to the designated primary window.<p>
     * <p>
     * To take a position relative to the primary window, a window uses the PrimaryWindow attribute in conjunction with the InitialX and InitialY properties, which specify the window�s horizontal and vertical coordinates.
     */
    public void setPrimaryWindow(Window value) {
        this.primaryWindow = value;
    }

    /**
     * Gets the InitialX value
     *
     * The InitialX property (integer) is the window�s initial horizontal screen position, relative to a primary window or the screen. It is specified in mils.
     * InitialX applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
     * InitialX, and its corollary, InitialY, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
     */
    public int getInitialX() {
        return initialX;
    }

    /**
     * Sets the InitialX value
     *
     * The InitialX property (integer) is the window�s initial horizontal screen position, relative to a primary window or the screen. It is specified in mils.
     * InitialX applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
     * InitialX, and its corollary, InitialY, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
     */
    public void setInitialX(int value) {
        this.initialX = value;
    }

    /**
     * Gets the InitialY value
     *
     * The InitialY property (integer) is the window�s initial vertical screen position, relative to a primary window or the screen. It is specified in mils.
     * InitialY applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
     * InitialY, and its corollary, InitialX, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
     */
    public int getInitialY() {
        return initialY;
    }

    /**
     * Sets the InitialY value
     *
     * The InitialY property (integer) is the window�s initial vertical screen position, relative to a primary window or the screen. It is specified in mils.
     * InitialY applies only to main windows and only when a window�s InitialPositionPolicy attribute is set to PP_PRIMARYRELATIVE (relative to the primary window) or PP_SCREENRELATIVE (relative to the screen).
     * InitialY, and its corollary, InitialX, work in conjunction with the PrimaryWindow and InitialPositionPolicy attributes to determine the position of a main window when it is first realized.
     */
    public void setInitialY(int value) {
        this.initialY = value;
    }

    /**
     * Gets the default message set number for the window and its widgets.
     */
    public int getSetNum() {
        return this.qq_defaultSet;
    }

    /**
     * Sets the default message set number for the window and its widgets.
     */
    public void setSetNum(int value) {
        this.qq_defaultSet = value;
    }

    /**
     * Gets the message set number for the message number of the window's title.
     */
    public int getTitleSetNum() {
        return this.qq_msgSet;
    }

    /**
     * Sets the message set number for the message number of the window's title.
     */
    public void setTitleSetNum(int value) {
        this.qq_msgSet = value;
    }

    /**
     * Gets the message number for the message number of the window's title.
     */
    public int getTitleMsgNum() {
        return this.qq_msgNumber;
    }

    /**
     * Sets the message number for the message number of the window's title.
     */
    public void setTitleMsgNum(int value) {
        this.qq_msgNumber = value;
    }



    /**
     * Initialise the window and all its children.
     */
    protected void initialize() {
        if (this.Form == null) {
            this.setName( "StartMenu" );
            this.setTitle( "" );
            this.setSystemClosePolicy(Constants.SC_ENABLEDSHUTDOWN);
            if (this.getContentPane() != this.getForm()) {
                this.setContentPane(getForm());
            }
            this.qq_setupWindowUsage();
            this.setResizable( false );
            this.setAlwaysOnTop(false);
            UserWindow.setIconizeEnabled(this, true);
            WindowManager.addWindowListener(this);
            this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
            this.setUsage(DisplayProject.Constants.WU_UPDATE);
            UIutils.processGUIActions();
            this.pack();
            this.setInitialX(0);
            this.setInitialY(0);
            this.setInitialPositionPolicy(Constants.PP_SYSTEMDEFAULT);
        }
    }


    // ----------------
    //  Window usage
    //-----------------
    protected WindowUsageMap usage = new WindowUsageMap();
    public int getUsage() {
        return this.usage.getUsage();
    }
    public WindowUsageMap getUsageMap() {
        return this.usage;
    }
    /**
     * Sets the window usage
     *
     * The Usage property sets the state for all a window�s child widgets at once, providing collective widget state changes on a predefined basis. A widget�s state determines how the widget reacts to mouse actions and how it displays itself. A window�s Usage property provides a convenient way to control the states of a group of widgets in the context of their parent window. With the Usage attribute, you can synchronize widget states to conform to a pattern you establish for the window.
     * The Usage attribute accepts the following values:
     * <li>Constants.WU_EDIT  Edit usage: widgets themselves are editable, but not underlying data.</li>
     * <li>Constants.WU_QUERY  Query only usage: widget data is editable, but not widgets themselves.</li>
     * <li>Constants.WU_UPDATE  Update usage: mouse actions and keyboard input accepted. Widgets themselves are changeable. This is the default.</li>
     * <li>Constants.WU_USER1  A user-defined usage. Default values same as WU_UPDATE.</li>
     * <li>Constants.WU_USER2  A user-defined usage. Default values same as WU_UPDATE.</li>
     * <li>Constants.WU_USER3  A user-defined usage. Default values same as WU_UPDATE.</li>
     * <li>Constants.WU_VIEW  View-only usage: no keyboard input is accepted. Widget posts Click events for mouse clicks.</li>
     */
    public void setUsage(int usage) {
        this.usage.setUsage(usage);
    }
    public void qq_setupWindowUsage() {
        this.usage = new WindowUsageMap();
        this.usage.add(getqq_GridField12(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_AllWidgetsBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_ClickTesterBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_ComplexMappingTestBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_Shapesbtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_TestWinBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_WinOneBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_WinBraDefinition(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_WindowTesterBtn(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
    }
    // </editor-fold>

    // -----------
    // Main method
    // -----------
        public static void main( String[] args ) {
            FrameworkUtils.setCmdLineArgs(args);
            AppletConnectionInfo client = null;
            try {
                // Install our own focus manager. MUST be done prior to setting the
                // UIManager, otherwise you'll run into issues like things have the wrong focus.
                KeyboardFocusManager.setCurrentKeyboardFocusManager(new ForteKeyboardFocusManager());

                UIManager.setLookAndFeel(new Win32LookAndFeel());

                client = UserWindow.postAPPLETStarted();
                StartMenu startMenu_start = new StartMenu();
                startMenu_start.display();
                UserWindow.postAPPLETStopped(client);
                System.exit(0);
            } catch (Throwable e) {
                ErrorMgr.showErrors(null, "Unhandled exception", e);
                UserWindow.postAPPLETStopped(client);
                System.exit(0);
            }
        }
// end class StartMenu
// c Pass 2 Conversion Time: 297 milliseconds
TOP

Related Classes of StartupProject.StartMenu

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.