Package LumleyNestedTab

Source Code of LumleyNestedTab.Main

package LumleyNestedTab;

import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.DataField;
import DisplayProject.GridField;
import DisplayProject.PaletteList;
import DisplayProject.RadioList;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.AppletConnectionInfo;
import DisplayProject.actions.ExitOnTab;
import DisplayProject.actions.FrameColor;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.Parent;
import DisplayProject.actions.UserWindow;
import DisplayProject.actions.WidthPolicy;
import DisplayProject.binding.BindingManager;
import DisplayProject.binding.beans.ExtendedPropertyChangeSupport;
import DisplayProject.binding.beans.Observable;
import DisplayProject.controls.MultiLineTextField;
import DisplayProject.controls.Panel;
import DisplayProject.controls.TabFolder;
import DisplayProject.controls.TextGraphic;
import DisplayProject.events.ClientEventManager;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.DataFieldFactory;
import DisplayProject.factory.GraphicFactory;
import DisplayProject.factory.ListFieldFactory;
import DisplayProject.factory.PaletteListFactory;
import DisplayProject.factory.TextEditFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.Array_Of_ListElement;
import Framework.ErrorMgr;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.File;
import Framework.ForteKeyboardFocusManager;
import Framework.FrameworkUtils;
import Framework.ImageData;
import Framework.ListElement;
import Framework.RuntimeProperties;
import Framework.TextData;
import Framework.UsageException;
import LumleyNestedTab.Outline;
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.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.UIManager;

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

    // ----------
    // Attributes
    // ----------
    protected File DefaultHelpFile;
    protected BindingManager bindingManager = null;
    public PropertyChangeSupport qq_Listeners = new ExtendedPropertyChangeSupport(this, true);
    private TextData aaa;
    private TextData bbb;
    private int radio;
    private int palette;
    private TextData sometext;

    // ------------
    // Constructors
    // ------------
    public Main() {
        // Explicitly call the superclass constructor to prevent the implicit call
        super();
        this.initialize();
        this.setAaa(new TextData());
        this.setBbb(new TextData());
        this.setRadio(2);
        this.setPalette(3);
        this.setSometext(new TextData("The quick brown fox jumps over the lazy dog"));

    }

    // ----------------------
    // 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;
    }

    public void setAaa(TextData aaa) {
        TextData oldValue = this.aaa;
        this.aaa = aaa;
        this.qq_Listeners.firePropertyChange("aaa", oldValue, this.aaa);
    }

    public TextData getAaa() {
        return this.aaa;
    }

    public void setBbb(TextData bbb) {
        TextData oldValue = this.bbb;
        this.bbb = bbb;
        this.qq_Listeners.firePropertyChange("bbb", oldValue, this.bbb);
    }

    public TextData getBbb() {
        return this.bbb;
    }

    public void setRadio(int radio) {
        int oldValue = this.radio;
        this.radio = radio;
        this.qq_Listeners.firePropertyChange("radio", oldValue, this.radio);
    }

    public int getRadio() {
        return this.radio;
    }

    public void setPalette(int palette) {
        int oldValue = this.palette;
        this.palette = palette;
        this.qq_Listeners.firePropertyChange("palette", oldValue, this.palette);
    }

    public int getPalette() {
        return this.palette;
    }

    public void setSometext(TextData sometext) {
        TextData oldValue = this.sometext;
        this.sometext = sometext;
        this.qq_Listeners.firePropertyChange("sometext", oldValue, this.sometext);
    }

    public TextData getSometext() {
        return this.sometext;
    }

    // -------
    // 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() {
        Outline o = new Outline();
        // TODO [1102,Major]: If you are nesting a window, setting size policy on a window must be done after nesting
        WidthPolicy.set(o, Constants.SP_TO_PARENT);
        // TODO [1102,Major]: If you are nesting a window, setting size policy on a window must be done after nesting
        HeightPolicy.set(o, Constants.SP_TO_PARENT);
        Parent.set(o, this.getqq_secondTab());
        UserWindow.open(this);
        // ----------
        // Event Loop
        // ----------
        EventManager.startEventLoop();
        try {
            EventRegistration TaskHandle_Shutdown_langThreadcurrentThread = ClientEventManager.register( Thread.currentThread(), "Shutdown" );

            while (true) {

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

                // -------------
                // task.Shutdown
                // -------------
                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( 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 DataField qq_aaa;
    public DataField qq_bbb;
    public GridField qq_GridField12;
    public GridField qq_GridField13;
    public GridField qq_GridField14;
    public JPanel Form;
    public JScrollPane qq_sometext_sp;
    public MultiLineTextField qq_sometext;
    public PaletteList qq_palette;
    public Panel qq_firstTab;
    public Panel qq_secondTab;
    public Panel qq_thirdTab;
    public RadioList qq_radio;
    public TabFolder qq_tabs;
    public TextGraphic qq_AAALbl;
    public TextGraphic qq_BBBLbl;

    /**
     * qq_AAALbl: transformed from: qqds_TextGraphic
     * TagId=15
     * isInherited=FALSE
     */
    public TextGraphic getqq_AAALbl() {
        if (qq_AAALbl == null) {
            qq_AAALbl = GraphicFactory.newTextGraphic("AAA\n", "");
            // OPTIONAL UIutils.reloadLabelText(qq_AAALbl, mcat);
            WidthPolicy.set(qq_AAALbl, Constants.SP_NATURAL);
            HeightPolicy.set(qq_AAALbl, Constants.SP_NATURAL);
            qq_AAALbl.setMinimumSize(new Dimension(26, 14));
        }
        return qq_AAALbl;
    }

    public void setqq_AAALbl(TextGraphic value) {
        TextGraphic oldValue = qq_AAALbl;
        qq_AAALbl = value;
        this.qq_Listeners.firePropertyChange("qq_AAALbl", oldValue, value);
    }

    /**
     * qq_aaa: transformed from: qqds_DataField
     * TagId=16
     * isInherited=FALSE
     */
    public DataField getqq_aaa() {
        if (qq_aaa == null) {
            // Mask type: MK_NONE
            qq_aaa = DataFieldFactory.newDataField("aaa", 20, TextData.class, Constants.MK_NONE);
            qq_aaa.setValue("");
            qq_aaa.setOriginalFormatText(null);
            qq_aaa.setHorizontalAlignment(JTextField.LEFT);
            getBindingManager().bindComponent(qq_aaa, "aaa");
            WidthPolicy.set(qq_aaa, Constants.SP_EXPLICIT);
            HeightPolicy.set(qq_aaa, Constants.SP_NATURAL);
            qq_aaa.setMinimumSize(new Dimension(129, 19));
            qq_aaa.setSize(new Dimension(129, 19));
        }
        return qq_aaa;
    }

    public void setqq_aaa(DataField value) {
        DataField oldValue = qq_aaa;
        qq_aaa = value;
        this.qq_Listeners.firePropertyChange("qq_aaa", oldValue, value);
    }

    /**
     * qq_BBBLbl: transformed from: qqds_TextGraphic
     * TagId=17
     * isInherited=FALSE
     */
    public TextGraphic getqq_BBBLbl() {
        if (qq_BBBLbl == null) {
            qq_BBBLbl = GraphicFactory.newTextGraphic("BBB\n", "");
            // OPTIONAL UIutils.reloadLabelText(qq_BBBLbl, mcat);
            WidthPolicy.set(qq_BBBLbl, Constants.SP_NATURAL);
            HeightPolicy.set(qq_BBBLbl, Constants.SP_NATURAL);
            qq_BBBLbl.setMinimumSize(new Dimension(24, 14));
        }
        return qq_BBBLbl;
    }

    public void setqq_BBBLbl(TextGraphic value) {
        TextGraphic oldValue = qq_BBBLbl;
        qq_BBBLbl = value;
        this.qq_Listeners.firePropertyChange("qq_BBBLbl", oldValue, value);
    }

    /**
     * qq_bbb: transformed from: qqds_DataField
     * TagId=18
     * isInherited=FALSE
     */
    public DataField getqq_bbb() {
        if (qq_bbb == null) {
            // Mask type: MK_NONE
            qq_bbb = DataFieldFactory.newDataField("bbb", 20, TextData.class, Constants.MK_NONE);
            qq_bbb.setValue("");
            qq_bbb.setOriginalFormatText(null);
            qq_bbb.setHorizontalAlignment(JTextField.LEFT);
            getBindingManager().bindComponent(qq_bbb, "bbb");
            WidthPolicy.set(qq_bbb, Constants.SP_EXPLICIT);
            HeightPolicy.set(qq_bbb, Constants.SP_NATURAL);
            qq_bbb.setMinimumSize(new Dimension(129, 19));
            qq_bbb.setSize(new Dimension(129, 19));
        }
        return qq_bbb;
    }

    public void setqq_bbb(DataField value) {
        DataField oldValue = qq_bbb;
        qq_bbb = value;
        this.qq_Listeners.firePropertyChange("qq_bbb", oldValue, value);
    }

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

    public GridField getqq_GridField14() {
        if (qq_GridField14 == null) {
            qq_GridField14 = CompoundFieldFactory.newGridField("qq_GridField14", true);
            setqq_GridField14Properties();
            qq_GridField14.setMinimumSize(new Dimension(172, 52));
            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(2, 2, 2, 2); // Top, Left, Bottom, Right Margin
            qq_GridField14.add( getqq_AAALbl(), qq_gbc );

            GridBagConstraints qq_gbc1 = new GridBagConstraints();
            qq_gbc1.gridx = 1; // Column 2
            qq_gbc1.gridy = 0; // Row 1
            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(2, 2, 2, 2); // Top, Left, Bottom, Right Margin
            qq_GridField14.add( getqq_aaa(), qq_gbc1 );

            GridBagConstraints qq_gbc2 = new GridBagConstraints();
            qq_gbc2.gridx = 0; // Column 1
            qq_gbc2.gridy = 1; // Row 2
            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(2, 2, 2, 2); // Top, Left, Bottom, Right Margin
            qq_GridField14.add( getqq_BBBLbl(), qq_gbc2 );

            GridBagConstraints qq_gbc3 = new GridBagConstraints();
            qq_gbc3.gridx = 1; // Column 2
            qq_gbc3.gridy = 1; // Row 2
            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(2, 2, 2, 2); // Top, Left, Bottom, Right Margin
            qq_GridField14.add( getqq_bbb(), qq_gbc3 );

        }
        return qq_GridField14;
    }

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

    /**
     * qq_radio: transformed from: qqds_RadioList
     * TagId=19
     * isInherited=FALSE
     */
    public RadioList getqq_radio() {
        if (qq_radio == null) {
            String[] names = {"One", "Two", "Three", "Four"};
            qq_radio = ListFieldFactory.newRadioList(Constants.FO_VERTICAL, "", names, 1, Constants.LP_CONSTANT);
            Array_Of_ListElement<ListElement> elements = new Array_Of_ListElement<ListElement>();
            elements.add( new ListElement( 1, names[0], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 2, names[1], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 3, names[2], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 4, names[3], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            qq_radio.setName("radio");
            getBindingManager().bindComponent(qq_radio, "radio", elements);
            if (qq_radio.getSelectedIndex() == -1)
                qq_radio.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_radio, mcat);
        }
        return qq_radio;
    }

    public void setqq_radio(RadioList value) {
        RadioList oldValue = qq_radio;
        qq_radio = value;
        this.qq_Listeners.firePropertyChange("qq_radio", oldValue, value);
    }

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

    public GridField getqq_GridField13() {
        if (qq_GridField13 == null) {
            qq_GridField13 = CompoundFieldFactory.newGridField("qq_GridField13", true);
            setqq_GridField13Properties();
            qq_GridField13.setMinimumSize(new Dimension(244, 93));
            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(2, 2, 2, 2); // Top, Left, Bottom, Right Margin
            qq_GridField13.add( getqq_GridField14(), qq_gbc );

            GridBagConstraints qq_gbc1 = new GridBagConstraints();
            qq_gbc1.gridx = 1; // Column 2
            qq_gbc1.gridy = 0; // Row 1
            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(2, 2, 2, 2); // Top, Left, Bottom, Right Margin
            qq_GridField13.add( getqq_radio(), qq_gbc1 );

        }
        return qq_GridField13;
    }

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

    /**
     * qq_sometext_sp: transformed from: qqds_TextField
     * TagId=24
     * isInherited=FALSE
     */
    public JScrollPane getqq_sometext_sp() {
        if (qq_sometext_sp == null) {
            qq_sometext_sp = CompoundFieldFactory.newScrollPane();
            qq_sometext_sp.setName("sometext");
            qq_sometext_sp.setViewportView(getqq_sometext());
            qq_sometext_sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
            qq_sometext_sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
            WidthPolicy.set(qq_sometext_sp, Constants.SP_EXPLICIT);
            HeightPolicy.set(qq_sometext_sp, Constants.SP_EXPLICIT);
            qq_sometext_sp.setSize(new Dimension(421, 168));
            qq_sometext_sp.setMinimumSize(new Dimension(421, 168));
            qq_sometext_sp.setPreferredSize(new Dimension(421, 168));
            qq_sometext_sp.setLocation(0, 0);
        }
        return qq_sometext_sp;
    }

    public void setqq_sometext_sp(JScrollPane value) {
        JScrollPane oldValue = qq_sometext_sp;
        qq_sometext_sp = value;
        this.qq_Listeners.firePropertyChange("qq_sometext_sp", oldValue, value);
    }

    /**
     * qq_sometext: transformed from: qqds_TextField
     * TagId=24
     * isInherited=FALSE
     */
    public MultiLineTextField getqq_sometext() {
        if (qq_sometext == null) {
            qq_sometext = TextEditFactory.newTextField("sometext", 12, 61);
            getBindingManager().bindComponent(qq_sometext, "sometext");
            ExitOnTab.set(qq_sometext, true);
            WidthPolicy.set(qq_sometext, Constants.SP_EXPLICIT);
            HeightPolicy.set(qq_sometext, Constants.SP_EXPLICIT);
            qq_sometext.setLocation(0, 0);
        }
        return qq_sometext;
    }

    public void setqq_sometext(MultiLineTextField value) {
        MultiLineTextField oldValue = qq_sometext;
        qq_sometext = value;
        this.qq_Listeners.firePropertyChange("qq_sometext", oldValue, value);
    }

    /**
     * qq_firstTab: transformed from: qqds_Panel
     * TagId=23
     * isInherited=FALSE
     */
    protected void setqq_firstTabProperties() {
        FrameColor.set(qq_firstTab, Constants.C_INHERIT);
        HeightPolicy.set(qq_firstTab, Constants.SP_TO_PARENT);
        WidthPolicy.set(qq_firstTab, Constants.SP_TO_PARENT);
        qq_firstTab.setLocation(2, 21);
    }

    public Panel getqq_firstTab() {
        if (qq_firstTab == null) {
            qq_firstTab = CompoundFieldFactory.newPanel("firstTab");
            setqq_firstTabProperties();
            qq_firstTab.setMinimumSize(new Dimension(0, 0));
            qq_firstTab.add( getqq_sometext_sp() );
        }
        return qq_firstTab;
    }

    public void setqq_firstTab(Panel value) {
        Panel oldValue = qq_firstTab;
        qq_firstTab = value;
        this.qq_Listeners.firePropertyChange("qq_firstTab", oldValue, value);
    }

    /**
     * qq_secondTab: transformed from: qqds_Panel
     * TagId=21
     * isInherited=FALSE
     */
    protected void setqq_secondTabProperties() {
        FrameColor.set(qq_secondTab, Constants.C_INHERIT);
        HeightPolicy.set(qq_secondTab, Constants.SP_TO_PARENT);
        WidthPolicy.set(qq_secondTab, Constants.SP_TO_PARENT);
        qq_secondTab.setLocation(2, 21);
    }

    public Panel getqq_secondTab() {
        if (qq_secondTab == null) {
            qq_secondTab = CompoundFieldFactory.newPanel("secondTab");
            setqq_secondTabProperties();
            qq_secondTab.setMinimumSize(new Dimension(0, 0));
        }
        return qq_secondTab;
    }

    public void setqq_secondTab(Panel value) {
        Panel oldValue = qq_secondTab;
        qq_secondTab = value;
        this.qq_Listeners.firePropertyChange("qq_secondTab", oldValue, value);
    }

    /**
     * qq_thirdTab: transformed from: qqds_Panel
     * TagId=22
     * isInherited=FALSE
     */
    protected void setqq_thirdTabProperties() {
        FrameColor.set(qq_thirdTab, Constants.C_INHERIT);
        HeightPolicy.set(qq_thirdTab, Constants.SP_TO_PARENT);
        WidthPolicy.set(qq_thirdTab, Constants.SP_TO_PARENT);
        qq_thirdTab.setLocation(2, 21);
    }

    public Panel getqq_thirdTab() {
        if (qq_thirdTab == null) {
            qq_thirdTab = CompoundFieldFactory.newPanel("thirdTab");
            setqq_thirdTabProperties();
            qq_thirdTab.setMinimumSize(new Dimension(0, 0));
        }
        return qq_thirdTab;
    }

    public void setqq_thirdTab(Panel value) {
        Panel oldValue = qq_thirdTab;
        qq_thirdTab = value;
        this.qq_Listeners.firePropertyChange("qq_thirdTab", oldValue, value);
    }

    /**
     * qq_tabs: transformed from: qqds_TabFolder
     * TagId=20
     * isInherited=FALSE
     */
    public TabFolder getqq_tabs() {
        if (qq_tabs == null) {
            qq_tabs = CompoundFieldFactory.newTabFolder("tabs", JTabbedPane.SCROLL_TAB_LAYOUT);
            WidthPolicy.set(qq_tabs, Constants.SP_EXPLICIT);
            HeightPolicy.set(qq_tabs, Constants.SP_EXPLICIT);
            qq_tabs.setSize(new Dimension(426, 192));
            qq_tabs.setMinimumSize(new Dimension(426, 192));
            qq_tabs.setPreferredSize(new Dimension(426, 192));
            // TODO [1004,Minor]: No data mapping has been generated for this field
            qq_tabs.addTab("First", getqq_firstTab());
            qq_tabs.addTab("Second", getqq_secondTab());
            qq_tabs.addTab("Third", getqq_thirdTab());
        }
        return qq_tabs;
    }

    public void setqq_tabs(TabFolder value) {
        TabFolder oldValue = qq_tabs;
        qq_tabs = value;
        this.qq_Listeners.firePropertyChange("qq_tabs", oldValue, value);
    }

    /**
     * qq_palette: transformed from: qqds_PaletteList
     * TagId=25
     * isInherited=FALSE
     */
    public PaletteList getqq_palette() {
        if (qq_palette == null) {
            qq_palette = PaletteListFactory.newPaletteList();
            qq_palette.setOrientation( Constants.FO_VERTICAL );
            qq_palette.setWrapSize( 1 );
            Array_Of_ListElement<ListElement> aole = new Array_Of_ListElement<ListElement>();
            aole.add(new ListElement(new ImageData(new ImageIcon(Main.class.getResource("main.qq_palette_1.png"))),
                    1, "One\n", ListElement.qq_Resolver.cIMAGEVALUE_INTEGERVALUE_TEXTVALUE));
            aole.add(new ListElement(new ImageData(new ImageIcon(Main.class.getResource("main.qq_palette_2.png"))),
                    2, "Two\n", ListElement.qq_Resolver.cIMAGEVALUE_INTEGERVALUE_TEXTVALUE));
            aole.add(new ListElement(new ImageData(new ImageIcon(Main.class.getResource("main.qq_palette_3.png"))),
                    3, "Three\n", ListElement.qq_Resolver.cIMAGEVALUE_INTEGERVALUE_TEXTVALUE));
            aole.add(new ListElement(new ImageData(new ImageIcon(Main.class.getResource("main.qq_palette_4.png"))),
                    4, "Four\n", ListElement.qq_Resolver.cIMAGEVALUE_INTEGERVALUE_TEXTVALUE));
            getBindingManager().bindComponent(qq_palette, "palette", aole);
            WidthPolicy.set(qq_palette, Constants.SP_NATURAL);
            HeightPolicy.set(qq_palette, Constants.SP_NATURAL);
            qq_palette.setSize(new Dimension(40, 148));
            qq_palette.setMinimumSize(new Dimension(40, 148));
            qq_palette.setPreferredSize(new Dimension(40, 148));
        }
        return qq_palette;
    }

    public void setqq_palette(PaletteList value) {
        PaletteList oldValue = qq_palette;
        qq_palette = value;
        this.qq_Listeners.firePropertyChange("qq_palette", oldValue, value);
    }

    /**
     * qq_GridField12: transformed from: qqds_GridField
     * TagId=12
     * isInherited=FALSE
     * In forte this was a 2x2 grid field.
     * There are no cell margins set
     * The width policy is set to Natural, and the height policy is set to Natural.
     */
    protected void setqq_GridField12Properties() {
        qq_GridField12.setCollapsed(true);
        qq_GridField12.setHeightPolicy(Constants.SP_NATURAL);
        qq_GridField12.setWidthPolicy(Constants.SP_NATURAL);
        qq_GridField12.setBackground(null);
        qq_GridField12.setLocation(0, 0);
    }

    public GridField getqq_GridField12() {
        if (qq_GridField12 == null) {
            qq_GridField12 = CompoundFieldFactory.newGridField("qq_GridField12", true);
            setqq_GridField12Properties();
            qq_GridField12.setMinimumSize(new Dimension(456, 285));
            GridBagConstraints qq_gbc = new GridBagConstraints();
            qq_gbc.gridx = 1; // Column 2
            qq_gbc.gridy = 0; // Row 1
            qq_gbc.weightx = 0;
            qq_gbc.weighty = 0;
            qq_gbc.anchor = GridBagConstraints.WEST; // Gravity - original: CG_MIDDLELEFT
            qq_gbc.fill = GridBagConstraints.NONE; // Size to parent - original: No size to parent
            qq_gbc.insets = new Insets(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_GridField13(), 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(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_palette(), qq_gbc1 );

            GridBagConstraints qq_gbc2 = new GridBagConstraints();
            qq_gbc2.gridx = 1; // Column 2
            qq_gbc2.gridy = 1; // Row 2
            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(0, 0, 0, 0); // Top, Left, Bottom, Right Margin
            qq_GridField12.add( getqq_tabs(), qq_gbc2 );

        }
        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( "main" );
            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_GridField13(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_GridField14(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_AAALbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_aaa(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_BBBLbl(), Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_bbb(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_radio(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_tabs(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_secondTab(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_thirdTab(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_firstTab(), Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_sometext(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_palette(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
    }
    // </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();
                Main main_start = new Main();
                main_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 main
// c Pass 2 Conversion Time: 359 milliseconds
TOP

Related Classes of LumleyNestedTab.Main

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.