Package js.dom

Examples of js.dom.UIEvent


     */
    private static final void type(Input input, Key key) {
        UIAction[] actions = {UIAction.KeyDown, UIAction.KeyPress, UIAction.KeyUp};

        for (UIAction action : actions) {
            UIEvent event = new UIEventMockForInput(input);
            event.action = action;
            event.which = key.code;

            input.event().publish(event);
        }
View Full Code Here


     * @param delete
     */
    public static void click(Button button) {
        Objects.nonNull(button);

        UIEvent event = new UIEvent();
        event.action = UIAction.Click;

        button.event().publish(event);
    }
View Full Code Here

     * @param delete
     */
    public static void click(Input button) {
        Objects.nonNull(button);

        UIEvent event = new UIEvent();
        event.action = UIAction.Click;

        button.event().publish(event);
    }
View Full Code Here

     *
     * @param action
     * @return
     */
    private static UIEvent event(UIAction action) {
        UIEvent event = new UIEvent();
        event.type = action.name;
        event.action = action;
        event.which = action.code;

        return event;
View Full Code Here

     *
     * @param element
     */
    public static void click(Element element) {
        if (element != null) {
            UIEvent event = document.createEvent("UIEvent");
            event.initEvent("click", true, true);

            element.dispatchEvent(event);
        }
    }
View Full Code Here

     *
     * @param element
     */
    public static void mouseDown(Element element) {
        if (element != null) {
            UIEvent event = document.createEvent("UIEvent");
            event.initEvent("mousedown", true, true);

            element.dispatchEvent(event);
        }
    }
View Full Code Here

TOP

Related Classes of js.dom.UIEvent

Copyright © 2018 www.massapicom. 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.