Package RemoveEventsWithAnchoredObjects

Source Code of RemoveEventsWithAnchoredObjects.B

package RemoveEventsWithAnchoredObjects;

import DisplayProject.Constants;
import DisplayProject.CursorMgr;
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.PushButtonFactory;
import DisplayProject.plaf.Win32LookAndFeel;
import Framework.EventHandle;
import Framework.EventManager;
import Framework.EventRegistration;
import Framework.EventRegistrationCallback;
import Framework.ForteKeyboardFocusManager;
import Framework.ParameterHolder;
import Framework.RuntimeProperties;
import RemoveEventsWithAnchoredObjects.Boss;
import RemoveEventsWithAnchoredObjects.Notify;
import RemoveEventsWithAnchoredObjects.interfaces.*;
import java.awt.Dimension;
import java.awt.KeyboardFocusManager;
import java.io.Serializable;
import java.util.Hashtable;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;

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

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

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

    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();

        // ----------
        // <ok>.click
        // ----------
        qq_resultRegistration.addRegistration( ClientEventManager.register(
                this.getqq_ok(), "Click",
                new EventRegistrationCallback("PushButton_Click_getqq_ok") {
                    /**
                     * 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;
                        qq_Block: try {
                            CursorMgr.startEvent();
                            // ================ Begin Forte Event Handler Translation ================
                            qq_HandlerResult = false;
                            break qq_Block;
                        // ================= End Forte Event Handler Translation =================
                        }
                        finally {
                            CursorMgr.endEvent();
                        }
                        return qq_HandlerResult;
                    }
                }) );


        // --------------
        // <cancel>.click
        // --------------
        qq_resultRegistration.addRegistration( ClientEventManager.register(
                this.getqq_cancel(), "Click",
                new EventRegistrationCallback("PushButton_Click_getqq_cancel") {
                    /**
                     * 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;
                        qq_Block: try {
                            CursorMgr.startEvent();
                            // ================ Begin Forte Event Handler Translation ================
                            Hashtable<String,Object> qq_Params = new Hashtable<String,Object>();
                            qq_Params.put( "value", new ParameterHolder(2) );
                            EventManager.postEvent( B.this.theNotify, Notify.cEVENT_STATUS_CHANGE, qq_Params );
                            qq_HandlerResult = false;
                            break qq_Block;
                        // ================= 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();
                            int x = value;
                        // ================= End Forte Event Handler Translation =================
                        }
                        finally {
                            CursorMgr.endEvent();
                        }
                        return qq_HandlerResult;
                    }
                }) );

        return qq_resultRegistration;
    }

    /**
     * onClose<p>
     * <p>
     */
    public void onClose() {
        Hashtable<String,Object> qq_Params = new Hashtable<String,Object>();
        qq_Params.put( "value", new ParameterHolder(2) );
        EventManager.postEvent( this.theNotify, Notify.cEVENT_STATUS_CHANGE, qq_Params );
    }

    /**
     * onOpen<p>
     * <p>
     */
    public void onOpen() {
        this.theNotify = SO_proxy.getInstance().getNotify();
        Hashtable<String,Object> qq_Params = new Hashtable<String,Object>();
        qq_Params.put( "value", new ParameterHolder(1) );
        EventManager.postEvent( this.theNotify, Notify.cEVENT_STATUS_CHANGE, qq_Params );
    }

    // ------------------
    // 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 JButton qq_cancel;
    public JButton qq_ok;

    /**
     * qq_ok: transformed from: qqds_PushButton
     * TagId=65548
     * isInherited=FALSE
     */
    public JButton getqq_ok() {
        if (qq_ok == null) {
            qq_ok = PushButtonFactory.newInstance("ok", "OK");
            qq_ok.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_ok, Constants.SP_NATURAL);
            HeightPolicy.set(qq_ok, Constants.SP_NATURAL);
            qq_ok.setMinimumSize(new Dimension(28, 21));
            qq_ok.setLocation(43, 24);
        }
        return qq_ok;
    }

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

    /**
     * qq_cancel: transformed from: qqds_PushButton
     * TagId=65549
     * isInherited=FALSE
     */
    public JButton getqq_cancel() {
        if (qq_cancel == null) {
            qq_cancel = PushButtonFactory.newInstance("cancel", "Cancel");
            DefaultButton.set(qq_cancel, true);
            qq_cancel.setVerifyInputWhenFocusTarget(true);
            WidthPolicy.set(qq_cancel, Constants.SP_NATURAL);
            HeightPolicy.set(qq_cancel, Constants.SP_NATURAL);
            qq_cancel.setMinimumSize(new Dimension(47, 21));
            qq_cancel.setLocation(93, 24);
        }
        return qq_cancel;
    }

    public void setqq_cancel(JButton value) {
        JButton oldValue = qq_cancel;
        qq_cancel = value;
        this.qq_Listeners.firePropertyChange("qq_cancel", 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_cancel() );
            Form.add( getqq_ok() );
        }
        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( "B" );
            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_ok(), Constants.FS_UPDATE, Constants.FS_VIEWONLY, Constants.FS_QUERY, Constants.FS_INACTIVE, Constants.FS_INACTIVE, Constants.FS_INACTIVE);
        this.usage.add(getqq_cancel(), 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);
        B myClass = new B();
        myClass.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        myClass.setVisible(true);
        UIutils.processGUIActions();
    }
// end class B
// c Pass 2 Conversion Time: 219 milliseconds
TOP

Related Classes of RemoveEventsWithAnchoredObjects.B

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.