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

3如何做网站推广搜狗站长平台主动提交

3如何做网站推广,搜狗站长平台主动提交,做网站 (公司),苏州公司排名VBox布局将子节点堆叠在垂直列中。新添加的子节点被放置在上一个子节点的下面。默认情况下,VBox尊重子节点的首选宽度和高度。 当父节点不可调整大小时,例如Group节点,最大垂直列的宽度基于具有最大优选宽度的节点。 默认情况下,…

VBox布局将子节点堆叠在垂直列中。新添加的子节点被放置在上一个子节点的下面。默认情况下,VBox尊重子节点的首选宽度和高度。

当父节点不可调整大小时,例如Group节点,最大垂直列的宽度基于具有最大优选宽度的节点。
默认情况下,每个子节点与左上(Pos.TOP_LEFT)位置对齐。

示例

以下代码将TextArea控件设置为在调整父VBox的高度时垂直增长:

TextArea  myTextArea = new TextArea();
//设置后跟随外边框增长
VBox.setHgrow(myTextArea,  Priority.ALWAYS);

完整的代码如下所示

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.Priority;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(Stage primaryStage) {TextArea myTextArea = new TextArea();VBox hbox = new VBox();hbox.getChildren().add(myTextArea);//设置以后跟随外边框增长VBox.setVgrow(myTextArea, Priority.ALWAYS);Scene scene = new Scene(hbox, 320, 112, Color.rgb(0, 0, 0, 0));primaryStage.setScene(scene);primaryStage.show();}public static void main(String[] args) {launch(args);}
}

示例

下面的代码使用四个矩形来演示VBox的使用。

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.layout.VBox;
import javafx.scene.shape.Rectangle;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(Stage primaryStage) {Group root = new Group();Scene scene = new Scene(root, 300, 250);// 5 pixels space between child nodesVBox vbox = new VBox(5);// 1 pixel padding between child nodes onlyvbox.setPadding(new Insets(1));Rectangle r1 = new Rectangle(10, 10);Rectangle r2 = new Rectangle(20, 100);Rectangle r3 = new Rectangle(50, 20);Rectangle r4 = new Rectangle(20, 50);VBox.setMargin(r1, new Insets(2, 2, 2, 2));vbox.getChildren().addAll(r1, r2, r3, r4);root.getChildren().add(vbox);primaryStage.setScene(scene);primaryStage.show();}public static void main(String[] args) {launch(args);}
}

VBox间距

VBox vbox = new VBox(8); // spacing = 8
vbox.getChildren().addAll(new Button("Cut"), new Button("Copy"), new Button("Paste"));

完整的实现代码如下所示

import javafx.application.Application;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;public class Main extends Application {@Overridepublic void start(final Stage stage) {stage.setTitle("HTML");stage.setWidth(500);stage.setHeight(500);Scene scene = new Scene(new Group());VBox vbox = new VBox(8); // spacing = 8vbox.getChildren().addAll(new Button("Cut"), new Button("Copy"), new Button("Paste"));scene.setRoot(vbox);stage.setScene(scene);stage.show();}public static void main(String[] args) {launch(args);}
}

设置填充和间距

import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.stage.Stage;public class Main extends Application {public static void main(String[] args) {Application.launch(args);}@Overridepublic void start(Stage primaryStage) {primaryStage.setTitle("VBox Test");// VBoxVBox vb = new VBox();vb.setPadding(new Insets(10, 50, 50, 50));vb.setSpacing(10);Label lbl = new Label("VBox");lbl.setFont(Font.font("Amble CN", FontWeight.BOLD, 24));vb.getChildren().add(lbl);// ButtonsButton btn1 = new Button();btn1.setText("Button1");vb.getChildren().add(btn1);Button btn2 = new Button();btn2.setText("Button2");vb.getChildren().add(btn2);Button btn3 = new Button();btn3.setText("Button3");vb.getChildren().add(btn3);Button btn4 = new Button();btn4.setText("Button4");vb.getChildren().add(btn4);// Adding VBox to the sceneScene scene = new Scene(vb);primaryStage.setScene(scene);primaryStage.show();}
}

http://www.yidumall.com/news/19912.html

相关文章:

  • 白银做网站网站优化方案怎么写
  • 网站防采集如何建立一个自己的网站?
  • 手机模版网站价格微信seo是什么意思
  • 网站 日历插件网站数据统计工具
  • 音乐网站开发文档全网营销平台
  • 网站发送邮件功能seo学徒
  • 惠州做公司网站做谷歌推广比较好的公司
  • 哪个网站专题做的好免费建立个人网站
  • 北京市住房城乡建设委官方网站做关键词优化
  • wordpress自适应博客主题郑州seo关键词排名优化
  • 做网站的宽和高有限制吗广告营销包括哪些方面
  • 一个网站为什么做的不好看买域名
  • 做电商网站价钱深圳最新疫情
  • 日本巨乳做视频网站东莞关键词排名提升
  • 怎么判断代运营是真是假seo确定关键词
  • 做粘土的网站市场营销策划方案3000字
  • 有哪些网站免费做推广百度爱采购客服电话
  • 视频网站建设费用网络营销策划书3000字
  • 海南网站设计seo优化推广流程
  • 建筑公司企业技术负责人岗位职责吉林seo关键词
  • 制定网站建设方案上海推广外包
  • app与小程序的区别整站优化和单词
  • 企业网站用什么做二次开发最快公司注册流程
  • 湘西网站制作最近三天的国内新闻
  • e语言可以做网站吗竞价是什么意思
  • 一级a做爰片免费网站在线广告公司推广平台
  • 麦当劳订餐网站 是谁做的公司网站的作用
  • 做网站服务器配置线上推广产品
  • 口碑好的丹徒网站建设官网seo哪家公司好
  • 我的文章被其他公司网站抄袭怎么做网络推广网站排名