Examples of DisplayEventConsumer


Examples of com.sun.midp.lcdui.DisplayEventConsumer

        /*
         * Find DisplayEventConsumer instance by nativeEvent.intParam4
         * and (if not null) call DisplayEventConsumer methods ...
         */
        DisplayEventConsumer dc =
            displayContainer.findDisplayEventConsumer(nativeEvent.intParam4);

        if (dc != null) {
            switch (event.getType()) {
            case EventTypes.KEY_EVENT:
                if (nativeEvent.intParam1 == EventConstants.IME) {
                    dc.handleInputMethodEvent(nativeEvent.stringParam1);
                } if (Logging.REPORT_LEVEL < Constants.LOG_DISABLED &&
                      nativeEvent.intParam2 == EventConstants.DEBUG_TRACE1) {
                    // This is a special VM hook to print all stacks
                    if (nativeEvent.intParam1 == EventConstants.PRESSED) {
                      System.getProperty("__debug.only.pss");
                    }
                } else {
                    dc.handleKeyEvent(
                        nativeEvent.intParam1,
                        nativeEvent.intParam2);
                }
                return;

            case EventTypes.PEN_EVENT:
                dc.handlePointerEvent(
                    nativeEvent.intParam1,
                    nativeEvent.intParam2,
                    nativeEvent.intParam3);
                return;

            case EventTypes.COMMAND_EVENT:
                dc.handleCommandEvent(
                    /* nativeEvent.intParamX - will contain screenId */
                    nativeEvent.intParam1);
                return;

            case EventTypes.PEER_CHANGED_EVENT:
                dc.handlePeerStateChangeEvent(
                    nativeEvent.intParam1,
                    nativeEvent.intParam2,
                    nativeEvent.intParam3);

                return;

            case EventTypes.ROTATION_EVENT:
                dc.handleRotationEvent();
                return;

            default:
                if (Logging.REPORT_LEVEL <= Logging.WARNING) {
                    Logging.report(Logging.WARNING, LogChannels.LC_CORE,
View Full Code Here
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.