Package RemoveEventsWithAnchoredObjects

Source Code of RemoveEventsWithAnchoredObjects.A

package RemoveEventsWithAnchoredObjects;

import DisplayProject.Constants;
import DisplayProject.CursorMgr;
import DisplayProject.DataField;
import DisplayProject.UDSWindow;
import DisplayProject.UIutils;
import DisplayProject.WindowManager;
import DisplayProject.WindowUsageMap;
import DisplayProject.actions.DefaultButton;
import DisplayProject.actions.HeightPolicy;
import DisplayProject.actions.UserWindow;
import DisplayProject.actions.WidthPolicy;
import DisplayProject.binding.BindingManager;
import DisplayProject.binding.beans.Observable;
import DisplayProject.events.ClientEventManager;
import DisplayProject.factory.CompoundFieldFactory;
import DisplayProject.factory.DataFieldFactory;
import DisplayProject.factory.PushButtonFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.EventHandle;
import Framework.EventRegistration;
import Framework.EventRegistrationCallback;
import Framework.ForteKeyboardFocusManager;
import Framework.ParameterHolder;
import Framework.RuntimeProperties;
import RemoveEventsWithAnchoredObjects.B;
import RemoveEventsWithAnchoredObjects.Boss;
import RemoveEventsWithAnchoredObjects.Notify;
import RemoveEventsWithAnchoredObjects.interfaces.*;
import java.awt.Dimension;
import java.awt.KeyboardFocusManager;
import java.io.Serializable;
import java.lang.String;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;

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

    // ----------
    // Attributes
    // ----------
    protected BindingManager bindingManager = null;
    private String status;
    private Notify theNotify;

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

    }

    // ----------------------
    // Accessors and Mutators
    // ----------------------
    protected BindingManager getBindingManager() {
        if (this.bindingManager == null) {
            this.bindingManager = new BindingManager(this);
        }
        return bindingManager;
    }

    public void setStatus(String status) {
        String oldValue = this.status;
        this.status = status;
        this.qq_Listeners.firePropertyChange("status", oldValue, this.status);
    }

    public String getStatus() {
        return this.status;
    }

    private void setTheNotify(Notify theNotify) {
        Notify oldValue = this.theNotify;
        this.theNotify = theNotify;
        this.qq_Listeners.firePropertyChange("theNotify", oldValue, this.theNotify);
    }

    // -------
    // Methods
    // -------
    /**
     * events (Translation of Forte Event Handler)<p>
     * <p>
     * @return EventRegistration
     */
    public EventRegistration events() {
        EventRegistration qq_resultRegistration = new EventRegistration();

        // -------------
        // <other>.click
        // -------------
        qq_resultRegistration.addRegistration( ClientEventManager.register(
                this.getqq_other(), "Click",
                new EventRegistrationCallback("PushButton_Click_getqq_other") {
                    /**
                     * handleEvent is called when the event is received. If this method returns false, the enclosing event loop will abort
                     */
                    public boolean handleEvent(EventHandle qq_currentEvent) {
                        boolean qq_HandlerResult = true;
                        try {
                            CursorMgr.startEvent();
                            // ================ Begin Forte Event Handler Translation ================
                            new Boss.AsyncRunner().display(new B());
                        // ================= End Forte Event Handler Translation =================
                        }
                        finally {
                            CursorMgr.endEvent();
                        }
                        return qq_HandlerResult;
                    }
                }) );


        // ----------------------
        // theNotify.StatusChange
        // ----------------------
        qq_resultRegistration.addRegistration( ClientEventManager.register(
                this.theNotify, Notify.cEVENT_STATUS_CHANGE,
                new EventRegistrationCallback("Notify_StatusChange_theNotify") {
                    /**
                     * handleEvent is called when the event is received. If this method returns false, the enclosing event loop will abort
                     */
                    public boolean handleEvent(EventHandle qq_currentEvent) {
                        boolean qq_HandlerResult = true;
                        try {
                            CursorMgr.startEvent();
                            // ================ Begin Forte Event Handler Translation ================
                            int value = ((ParameterHolder)qq_currentEvent.getParameter("value")).getInt();
                            A.this.refreshStatus(value);
                        // ================= End Forte Event Handler Translation =================
                        }
                        finally {
                            CursorMgr.endEvent();
                        }
                        return qq_HandlerResult;
                    }
                }) );

        return qq_resultRegistration;
    }

    /**
     * onOpen<p>
     * <p>
     */
    public void onOpen() {
        this.refreshStatus(2);
        this.theNotify = SO_proxy.getInstance().getNotify();
    }

    /**
     * refreshStatus<p>
     * <p>
     * @param value Type: int
     */
    public void refreshStatus(int value) {
        switch (value) {
            case 1: {
                this.setStatus("Processed");
                break;
            }
            case 2: {
                this.setStatus("To be done");
                break;
            }
        }
    }

    // ------------------
    // Window Definitions
    // ------------------
    // <editor-fold defaultstate="collapsed" desc="Window Definitions">
    private int qq_defaultSet = 1;
    private int qq_msgNumber = 0;
    private int qq_msgSet = 0;
    public DataField qq_status;
    public JButton qq_other;

    /**
     * qq_status: transformed from: qqds_DataField
     * TagId=65548
     * isInherited=FALSE
     */
    public DataField getqq_status() {
        if (qq_status == null) {
            // Mask type: MK_NONE
            qq_status = DataFieldFactory.newDataField("status", 48, Constants.MK_NONE);
            qq_status.setOriginalFormatText(null);
            qq_status.setHorizontalAlignment(JTextField.LEFT);
            getBindingManager().bindComponent(qq_status, "status");
            WidthPolicy.set(qq_status, Constants.SP_EXPLICIT);
            HeightPolicy.set(qq_status, Constants.SP_NATURAL);
            qq_status.setMinimumSize(new Dimension(297, 19));
            qq_status.setSize(new Dimension(297, 19));
            qq_status.setLocation(48, 24);
        }
        return qq_status;
    }

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

    /**
     * qq_other: transformed from: qqds_PushButton
     * TagId=65549
     * isInherited=FALSE
     */
    public JButton getqq_other() {
        if (qq_other == null) {
            qq_other = PushButtonFactory.newInstance("other", "Show other");
            DefaultButton.set(qq_other, true);
            qq_other.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_other, Constants.SP_NATURAL);
            HeightPolicy.set(qq_other, Constants.SP_NATURAL);
            qq_other.setMinimumSize(new Dimension(69, 21));
            qq_other.setLocation(163, 71);
        }
        return qq_other;
    }

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

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

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

    public void setForm(JPanel value) {
        JPanel oldValue = Form;
        Form = value;
        this.qq_Listeners.firePropertyChange("Form", oldValue, 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( "A" );
            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
    //-----------------
    public void qq_setupWindowUsage() {
        this.usage = new WindowUsageMap();
        this.usage.add(getqq_status(), Constants.FS_INACTIVE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_UPDATE, Constants.FS_UPDATE, Constants.FS_UPDATE);
        this.usage.add(getqq_other(), 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) {
        KeyboardFocusManager.setCurrentKeyboardFocusManager(new ForteKeyboardFocusManager());
        try {
            UIManager.setLookAndFeel(new Win32LookAndFeel());
        }
        catch (Exception e) {}
        ToolTipManager.sharedInstance().setDismissDelay(Integer.MAX_VALUE);
        A myClass = new A();
        myClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        myClass.setVisible(true);
        UIutils.processGUIActions();
    }
// end class A
// c Pass 2 Conversion Time: 249 milliseconds
TOP

Related Classes of RemoveEventsWithAnchoredObjects.A

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.