Spec-Zone .ru
спецификации, руководства, описания, API
|
001/* 002 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 003 */ 004package javafx.scene.web; 005 006/** 007 * This class describes features of a Web popup window as specified by 008 * JavaScript {@code window.open} function. Instances are passed into popup 009 * handlers registered on a {@code WebEngine} using 010 * {@link WebEngine#setCreatePopupHandler} method. 011 * 012 * @see WebEngine 013 * @see WebEngine#setCreatePopupHandler 014 */ 015public final class PopupFeatures { 016 017 private final boolean menu, status, toolbar, resizable; 018 019 /** 020 * Creates a new instance. 021 * 022 * @param menu whether menu bar should be present 023 * @param status whether status bar should be present 024 * @param toolbar whether tool bar should be present 025 * @param resizable whether popup window should be resizable 026 */ 027 public PopupFeatures( 028 boolean menu, boolean status, boolean toolbar, boolean resizable) { 029 this.menu = menu; 030 this.status = status; 031 this.toolbar = toolbar; 032 this.resizable = resizable; 033 } 034 035 /** 036 * Returns whether menu bar should be present. 037 */ 038 public final boolean hasMenu() { 039 return menu; 040 } 041 042 /** 043 * Returns whether status bar should be present. 044 */ 045 public final boolean hasStatus() { 046 return status; 047 } 048 049 /** 050 * Returns whether tool bar should be present. 051 */ 052 public final boolean hasToolbar() { 053 return toolbar; 054 } 055 056 /** 057 * Returns whether popup window should be resizable. 058 */ 059 public final boolean isResizable() { 060 return resizable; 061 } 062}