Package RadioLists

Source Code of RadioLists.Main

package RadioLists;

import DisplayProject.CloseHideAdaptor;
import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.RadioList;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.AppletConnectionInfo;
import DisplayProject.actions.UserWindow;
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.ListFieldFactory;
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.ListElement;
import Framework.RuntimeProperties;
import Framework.UsageException;
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.JFrame;
import javax.swing.JPanel;
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 int vertical;
    private int wrappedHorvConstant1;
    private int horozintalPacked;
    private int horizontal;
    private int wrappedVertConstant;
    private int wrappedVertPacked;
    private int wrappedHorvConstant;
    private int wrappedHorzPacked;

    // ------------
    // Constructors
    // ------------
    public Main() {
        // 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;
    }

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

    public int getVertical() {
        return this.vertical;
    }

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

    public int getWrappedHorvConstant1() {
        return this.wrappedHorvConstant1;
    }

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

    public int getHorozintalPacked() {
        return this.horozintalPacked;
    }

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

    public int getHorizontal() {
        return this.horizontal;
    }

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

    public int getWrappedVertConstant() {
        return this.wrappedVertConstant;
    }

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

    public int getWrappedVertPacked() {
        return this.wrappedVertPacked;
    }

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

    public int getWrappedHorvConstant() {
        return this.wrappedHorvConstant;
    }

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

    public int getWrappedHorzPacked() {
        return this.wrappedHorzPacked;
    }

    // -------
    // 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 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 JPanel Form;
    public RadioList qq_horizontal;
    public RadioList qq_horozintalPacked;
    public RadioList qq_vertical;
    public RadioList qq_wrappedHorvConstant1;
    public RadioList qq_wrappedHorvConstant;
    public RadioList qq_wrappedHorzPacked;
    public RadioList qq_wrappedVertConstant;
    public RadioList qq_wrappedVertPacked;

    /**
     * qq_vertical: transformed from: qqds_RadioList
     * TagId=12
     * isInherited=FALSE
     */
    public RadioList getqq_vertical() {
        if (qq_vertical == null) {
            String[] names = {"One", "Two", "Three", "Four"};
            qq_vertical = ListFieldFactory.newRadioList(Constants.FO_VERTICAL, "Vert", 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_vertical.setName("vertical");
            getBindingManager().bindComponent(qq_vertical, "vertical", elements);
            if (qq_vertical.getSelectedIndex() == -1)
                qq_vertical.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_vertical, mcat);
            qq_vertical.setLocation(28, 14);
        }
        return qq_vertical;
    }

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

    /**
     * qq_wrappedVertConstant: transformed from: qqds_RadioList
     * TagId=13
     * isInherited=FALSE
     */
    public RadioList getqq_wrappedVertConstant() {
        if (qq_wrappedVertConstant == null) {
            String[] names = {"1", "2", "Three", "4"};
            qq_wrappedVertConstant = ListFieldFactory.newRadioList(Constants.FO_VERTICAL, "Vert Wrap Const", names, 3, 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_wrappedVertConstant.setName("wrappedVertConstant");
            getBindingManager().bindComponent(qq_wrappedVertConstant, "wrappedVertConstant", elements);
            if (qq_wrappedVertConstant.getSelectedIndex() == -1)
                qq_wrappedVertConstant.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_wrappedVertConstant, mcat);
            qq_wrappedVertConstant.setLocation(117, 64);
        }
        return qq_wrappedVertConstant;
    }

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

    /**
     * qq_horozintalPacked: transformed from: qqds_RadioList
     * TagId=14
     * isInherited=FALSE
     */
    public RadioList getqq_horozintalPacked() {
        if (qq_horozintalPacked == null) {
            String[] names = {"1", "2", "Three", "4"};
            qq_horozintalPacked = ListFieldFactory.newRadioList(Constants.FO_HORIZONTAL, "Horiz Packed", names, 1, Constants.LP_PACKED);
            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_horozintalPacked.setName("horozintalPacked");
            getBindingManager().bindComponent(qq_horozintalPacked, "horozintalPacked", elements);
            if (qq_horozintalPacked.getSelectedIndex() == -1)
                qq_horozintalPacked.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_horozintalPacked, mcat);
            qq_horozintalPacked.setLocation(114, 19);
        }
        return qq_horozintalPacked;
    }

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

    /**
     * qq_horizontal: transformed from: qqds_RadioList
     * TagId=15
     * isInherited=FALSE
     */
    public RadioList getqq_horizontal() {
        if (qq_horizontal == null) {
            String[] names = {"1", "2", "Three", "4"};
            qq_horizontal = ListFieldFactory.newRadioList(Constants.FO_HORIZONTAL, "Horiz Const", 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_horizontal.setName("horizontal");
            getBindingManager().bindComponent(qq_horizontal, "horizontal", elements);
            if (qq_horizontal.getSelectedIndex() == -1)
                qq_horizontal.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_horizontal, mcat);
            qq_horizontal.setLocation(117, 132);
        }
        return qq_horizontal;
    }

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

    /**
     * qq_wrappedVertPacked: transformed from: qqds_RadioList
     * TagId=13
     * isInherited=FALSE
     */
    public RadioList getqq_wrappedVertPacked() {
        if (qq_wrappedVertPacked == null) {
            String[] names = {"1", "2", "Three", "4"};
            qq_wrappedVertPacked = ListFieldFactory.newRadioList(Constants.FO_VERTICAL, "Vert Wrap Pack", names, 3, Constants.LP_PACKED);
            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_wrappedVertPacked.setName("wrappedVertPacked");
            getBindingManager().bindComponent(qq_wrappedVertPacked, "wrappedVertPacked", elements);
            if (qq_wrappedVertPacked.getSelectedIndex() == -1)
                qq_wrappedVertPacked.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_wrappedVertPacked, mcat);
            qq_wrappedVertPacked.setLocation(271, 67);
        }
        return qq_wrappedVertPacked;
    }

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

    /**
     * qq_wrappedHorvConstant: transformed from: qqds_RadioList
     * TagId=16
     * isInherited=FALSE
     */
    public RadioList getqq_wrappedHorvConstant() {
        if (qq_wrappedHorvConstant == null) {
            String[] names = {"1", "2", "Three", "4"};
            qq_wrappedHorvConstant = ListFieldFactory.newRadioList(Constants.FO_HORIZONTAL, "Horz Wrap Const", names, 3, 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_wrappedHorvConstant.setName("wrappedHorvConstant");
            getBindingManager().bindComponent(qq_wrappedHorvConstant, "wrappedHorvConstant", elements);
            if (qq_wrappedHorvConstant.getSelectedIndex() == -1)
                qq_wrappedHorvConstant.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_wrappedHorvConstant, mcat);
            qq_wrappedHorvConstant.setLocation(119, 187);
        }
        return qq_wrappedHorvConstant;
    }

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

    /**
     * qq_wrappedHorzPacked: transformed from: qqds_RadioList
     * TagId=17
     * isInherited=FALSE
     */
    public RadioList getqq_wrappedHorzPacked() {
        if (qq_wrappedHorzPacked == null) {
            String[] names = {"1", "2", "Three", "4"};
            qq_wrappedHorzPacked = ListFieldFactory.newRadioList(Constants.FO_HORIZONTAL, "Horz Wrap Pack", names, 3, Constants.LP_PACKED);
            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_wrappedHorzPacked.setName("wrappedHorzPacked");
            getBindingManager().bindComponent(qq_wrappedHorzPacked, "wrappedHorzPacked", elements);
            if (qq_wrappedHorzPacked.getSelectedIndex() == -1)
                qq_wrappedHorzPacked.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_wrappedHorzPacked, mcat);
            qq_wrappedHorzPacked.setLocation(241, 188);
        }
        return qq_wrappedHorzPacked;
    }

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

    /**
     * qq_wrappedHorvConstant1: transformed from: qqds_RadioList
     * TagId=18
     * isInherited=FALSE
     */
    public RadioList getqq_wrappedHorvConstant1() {
        if (qq_wrappedHorvConstant1 == null) {
            String[] names = {"1", "2", "Three", "4", "5", "6", "7", "8", "9", "10", "11"};
            qq_wrappedHorvConstant1 = ListFieldFactory.newRadioList(Constants.FO_HORIZONTAL, "Horz Wrap Const", names, 2, 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 ) );
            elements.add( new ListElement( 5, names[4], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 6, names[5], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 7, names[6], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 8, names[7], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 9, names[8], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 10, names[9], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            elements.add( new ListElement( 11, names[10], ListElement.qq_Resolver.cINTEGERVALUE_TEXTVALUE ) );
            qq_wrappedHorvConstant1.setName("wrappedHorvConstant1");
            getBindingManager().bindComponent(qq_wrappedHorvConstant1, "wrappedHorvConstant1", elements);
            if (qq_wrappedHorvConstant1.getSelectedIndex() == -1)
                qq_wrappedHorvConstant1.setSelectedIndex(0);
            // OPTIONAL UIutils.reloadLabelText(qq_wrappedHorvConstant1, mcat);
            qq_wrappedHorvConstant1.setLocation(66, 288);
        }
        return qq_wrappedHorvConstant1;
    }

    public void setqq_wrappedHorvConstant1(RadioList value) {
        RadioList oldValue = qq_wrappedHorvConstant1;
        qq_wrappedHorvConstant1 = value;
        this.qq_Listeners.firePropertyChange("qq_wrappedHorvConstant1", 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_wrappedHorvConstant1() );
            Form.add( getqq_wrappedHorzPacked() );
            Form.add( getqq_wrappedHorvConstant() );
            Form.add( getqq_wrappedVertPacked() );
            Form.add( getqq_horizontal() );
            Form.add( getqq_horozintalPacked() );
            Form.add( getqq_wrappedVertConstant() );
            Form.add( getqq_vertical() );
        }
        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_vertical(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_wrappedVertConstant(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_horozintalPacked(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_horizontal(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_wrappedVertPacked(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_wrappedHorvConstant(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_wrappedHorzPacked(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_wrappedHorvConstant1(), 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: 250 milliseconds
TOP

Related Classes of RadioLists.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.