当前位置: 首页 > news >正文

商务网站建设流程200字网页设计主题参考

商务网站建设流程200字,网页设计主题参考,做外汇上什么网站看新闻,网上做博彩网站代理赚钱吗程序窗体显示一般有3中模式。非模态和模态,其中模态又分为程序模态和窗体模态。 非模态可以理解为窗体之间没有任何限制,可以用鼠标、键盘等工具在窗体间切换。 程序模态是窗体打开后,该程序的所有窗体都被冻结,无法切换&#x…

程序窗体显示一般有3中模式。非模态和模态,其中模态又分为程序模态和窗体模态。

非模态可以理解为窗体之间没有任何限制,可以用鼠标、键盘等工具在窗体间切换。

程序模态是窗体打开后,该程序的所有窗体都被冻结,无法切换,只能在程序模态窗体关闭后才可切换。

窗体模态是窗体打开后,该窗体上溯的所有窗体都被冻结,无法切换,但是程序中已打开,不在该上溯线上的窗体可以和该窗体自由切换。

测试代码如下:

package javafx8.ch04;import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Cursor;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.stage.Stage;
import javafx.stage.Window;import static javafx.stage.Modality.APPLICATION_MODAL;
import static javafx.stage.Modality.NONE;
import static javafx.stage.Modality.WINDOW_MODAL;/*** @copyright 2023-2022* @package   learnjavafx8.javafx8.ch04* @file      StageModalityApplication.java* @date      2023-02-02 20:59* @author    qiao wei* @version   1.0* @brief     设置窗体模态,JavaFX共分3中模态。*            非模态NONE:Defines a top-level window that is not modal and does not block any other window。*            程序模态APPLICATION_MODAL:Defines a modal window that blocks events from being delivered to any*            other application window。*            窗体模态WINDOW_MODAL:Defines a modal window that block events from being delivered to its entire*            owner window hierarchy。* @history*/
public class StageModalityApplication extends Application {@Overridepublic void start(Stage primaryStage) {// Buttons to display each kind of modal stage Button ownedNoneButton = new Button("Owned None");/*** 父控件为primaryStage,父控件与子控件stage之间为非模态,鼠标可以在父子控件间切换,当父控件关闭时,子控件* 跟随父控件一起关闭。*/ownedNoneButton.addEventHandler(MouseEvent.MOUSE_CLICKED,new EventHandler<MouseEvent>() {@Overridepublic void handle(MouseEvent event) {showDialog(primaryStage, NONE);}});
//        ownedNoneButton.setOnAction(e -> showDialog(primaryStage, NONE));
//        ownedNoneButton.setOnAction(new EventHandler<ActionEvent>() {
//            @Override
//            public void handle(ActionEvent actionEvent) {
//                showDialog(primaryStage, NONE);
//            }
//        });Button nonOwnedNoneButton = new Button("Non-owned None");/*** 父控件为null, primaryStage与控件stage之间为非模态,鼠标可以在两个控件间切换,当primaryStage控件关闭* 时,stage控件不关闭。*/nonOwnedNoneButton.setOnAction(e -> showDialog(null, NONE));// 与创建此窗口的上层窗口形成模态。Button ownedWinButton = new Button("Owned Window Modal");// 父控件为primaryStage的WINDOW_MODAL模式,只与父控件形成模态,与父控件的其余子控件不形成模态。ownedWinButton.setOnAction(e -> showDialog(primaryStage, WINDOW_MODAL));Button nonOwnedWinButton = new Button("Non-owned Window Modal");// 父控件为null的WINDOW_MODAL模式,因为父控件为null,相当与父控件、父控件的其余子控件不形成模态。nonOwnedWinButton.setOnAction(e -> showDialog(null, WINDOW_MODAL));// 与创建此窗口的程序的所有窗口均形成模态。Button ownedAppButton = new Button("Owned Application Modal");// Set button opacity。ownedAppButton.setOpacity(0.3);// 父控件为primaryStage的APPLICATION_MODAL模式,与Application中的的其余所有子控件均形成模态。ownedAppButton.setOnAction(e -> showDialog(primaryStage, APPLICATION_MODAL));Button nonOwnedAppButton = new Button("Non-owned Application Modal");// 父控件为null的APPLICATION_MODAL模式,与父控件、父控件的其余子控件均形成模态。nonOwnedAppButton.setOnAction((ActionEvent event)-> showDialog(null, APPLICATION_MODAL));VBox root = new VBox();root.getChildren().addAll(ownedNoneButton, nonOwnedNoneButton,ownedWinButton, nonOwnedWinButton,ownedAppButton, nonOwnedAppButton);Scene scene = new Scene(root, 300, 200);primaryStage.setScene(scene);primaryStage.setTitle("The Primary Stage");// Set full screen and unresizable。primaryStage.setFullScreen(true);
//        primaryStage.setResizable(false);primaryStage.show();}public static void main(String[] args) {Application.launch(StageModalityApplication.class, args);}/*** @class   StageModalityApplication* @date    2023-06-21 21:01* @author  qiao wei* @version 1.0* @brief   根据窗口拥有者和模式设置窗口状态。* @param   owner 窗口的父控件。* @param   modality 窗口模式。* @return  * @throws*/private void showDialog(Window owner, Modality modality) {// Create a new stage with specified owner and modalityStage stage = new Stage();// Set the stage owner and modalitystage.initOwner(owner);stage.initModality(modality);Label modalityLabel = new Label(modality.toString());Button closeButton = new Button("Close");
//        closeButton.setOnAction(e -> stage.close());closeButton.addEventHandler(MouseEvent.MOUSE_CLICKED, mouseEvent -> stage.close());VBox root = new VBox();root.getChildren().addAll(modalityLabel, closeButton);Scene scene = new Scene(root, 200, 100);// 设置鼠标在scene的显示模式scene.setCursor(Cursor.HAND);stage.setScene(scene);stage.setTitle("A Dialog Box");stage.show();}
}

http://www.jinmujx.cn/news/111293.html

相关文章:

  • 淘宝哪些做网站关键词排名的有用吗湖南正规关键词优化报价
  • 直销公司排行榜关键词排名优化软件价格
  • 有关网站建设的毕业设计seo策略有哪些
  • 网站免费源码大全无用下载无锡网站优化公司
  • 建好的网站怎么用网站设计平台
  • 网站上推广游戏怎么做网站优化效果
  • 便宜建站空间百度云网盘资源链接
  • 如何做百度网站推广常见的网络直接营销有哪些
  • 最新网站建设软件有哪些最稳定的灰色词排名
  • 网站建设与运营的预算方案外链服务
  • 2013影响网站百度搜索排名的关键因素统计seo流量的提升的软件
  • 漳州 网站建设多少钱做网站seo推广公司
  • 网站续费 多久广州百度seo优化排名
  • 网络维护公司排名一键优化清理
  • 做网站基本今天的新闻头条最新消息
  • 新手如何建设网站软文案例400字
  • 凡科网站自己如何做网络推广的细节
  • 做网站没有成本费用如何做账免费推广工具
  • 咸宁市住房和城乡建设委员会网站软文范文
  • 厦门做网站公司有哪些附近电脑培训学校
  • 网站建设流程是这样的 里面有很怎么开网站
  • seo是什么专业网站seo工具
  • 西安便宜网站建设外贸网站推广怎么做
  • 做食品网站搜索引擎关键词优化有哪些技巧
  • 做一个动态网站多少钱怎么制作网站链接
  • 嘉定网站设计网络软文名词解释
  • 个人建设电影网站备案游戏代理怎么做
  • 网站集约化建设纪要互联网推广与营销
  • 淘宝网站开发实训报告seo沈阳
  • php做的网站好不好知乎关键词排名