All Downloads are FREE. Search and download functionalities are using the official Maven repository.

javafx.scene.web.PopupFeatures Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
 */
package javafx.scene.web;

/**
 * This class describes features of a Web popup window as specified by
 * JavaScript {@code window.open} function. Instances are passed into popup
 * handlers registered on a {@code WebEngine} using
 * {@link WebEngine#setCreatePopupHandler} method.
 * 
 * @see WebEngine
 * @see WebEngine#setCreatePopupHandler
 * @since JavaFX 2.0
 */
public final class PopupFeatures {

    private final boolean menu, status, toolbar, resizable;

    /**
     * Creates a new instance.
     *
     * @param menu whether menu bar should be present
     * @param status whether status bar should be present
     * @param toolbar whether tool bar should be present
     * @param resizable whether popup window should be resizable
     */
    public PopupFeatures(
            boolean menu, boolean status, boolean toolbar, boolean resizable) {
        this.menu = menu;
        this.status = status;
        this.toolbar = toolbar;
        this.resizable = resizable;
    }

    /**
     * Returns whether menu bar should be present.
     */
    public final boolean hasMenu() {
        return menu;
    }

    /**
     * Returns whether status bar should be present.
     */
    public final boolean hasStatus() {
        return status;
    }

    /**
     * Returns whether tool bar should be present.
     */
    public final boolean hasToolbar() {
        return toolbar;
    }

    /**
     * Returns whether popup window should be resizable.
     */
    public final boolean isResizable() {
        return resizable;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy