- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我只是想知道,为什么我们使用这么多容器?我的意思是,例如这个项目在youtube上找到它,他使用了很多容器?他只能使用一个容器,对吗?不是容器内的容器内的容器??... 我只是想知道为什么我们在容器内的容器内使用容器..
FXML 代码:
<AnchorPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="controller.daftarBajuController">
<children>
<AnchorPane id="AnchorPane" fx:id="loadBaju" prefHeight="650.0"
prefWidth="1000.0"
style="-fx-background-color: white; -fx-background-image: url("/gambar/grid.jpg");"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<StackPane fx:id="tambahBaju" prefHeight="650.0"
prefWidth="1000.0" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<children>
<Group>
<children>
<StackPane fx:id="loadStage" layoutX="347.0" layoutY="182.0"
prefHeight="287.0" prefWidth="306.0"
style="-fx-background-color: white; -fx-background-radius: 10; -fx-padding: 10; -fx-effect: dropshadow(three-pass-box, rgba(0,0,0,0.8), 10, 0, 0, 0);"
AnchorPane.leftAnchor="358.0" />
<Button layoutX="642.0" layoutY="173.0" mnemonicParsing="false"
onAction="#btnClose" prefHeight="17.0" prefWidth="21.0"
style="-fx-background-image: url("/gambar/closePage.png"); -fx-background-size: 100% 100%;">
<font>
<Font size="8.0" />
</font>
</Button>
</children>
</Group>
</children>
</StackPane>
<SplitPane dividerPositions="0.18454935622317598"
focusTraversable="true" orientation="VERTICAL" prefHeight="633.0"
prefWidth="1000.0" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="17.0">
<items>
<AnchorPane maxHeight="-Infinity" minHeight="-Infinity"
prefHeight="124.0" prefWidth="998.0"
style="-fx-background-image: url("/gambar/header.gif"); -fx-background-size: 100% 100%;"
SplitPane.resizableWithParent="false">
<children>
<Label layoutX="30.0" layoutY="42.0" text="Example JavaFX"
textFill="#046272">
<font>
<Font name="Gill Sans MT" size="40.0" />
</font>
<effect>
<Reflection topOpacity="0.2" />
</effect>
</Label>
<HBox layoutX="803.0" layoutY="70.0" spacing="10.0"
AnchorPane.bottomAnchor="26.0" AnchorPane.rightAnchor="130.0"
AnchorPane.topAnchor="70.0">
<children>
<Label layoutX="803.0" layoutY="70.0" text="Login By :"
AnchorPane.bottomAnchor="26.0" AnchorPane.rightAnchor="140.0"
AnchorPane.topAnchor="70.0">
<font>
<Font size="14.0" />
</font>
</Label>
<Label fx:id="lblAdmin" layoutX="872.0" layoutY="71.0"
AnchorPane.bottomAnchor="26.0" AnchorPane.topAnchor="70.0">
<font>
<Font size="14.0" />
</font>
</Label>
</children>
</HBox>
</children>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="418.0"
prefWidth="676.0">
<children>
<AnchorPane fx:id="editBaju" layoutX="179.0" layoutY="63.0"
prefHeight="316.0" prefWidth="336.0" />
<SplitPane dividerPositions="0.23393574297188754"
focusTraversable="true" layoutX="602.0" layoutY="48.0"
prefHeight="525.0" prefWidth="998.0" AnchorPane.bottomAnchor="0.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<items>
<AnchorPane maxWidth="-Infinity" minHeight="0.0"
minWidth="-Infinity" prefHeight="160.0" prefWidth="230.0"
style="-fx-background-color: white;"
SplitPane.resizableWithParent="false">
<children>
<Accordion prefHeight="305.0" prefWidth="230.0"
AnchorPane.bottomAnchor="205.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<panes>
<TitledPane text="Menu">
<content>
<StackPane>
<children>
<ListView fx:id="listViewBaju" layoutX="-2.0"
onMouseClicked="#klikListDaftar" prefHeight="190.0"
prefWidth="236.0" AnchorPane.bottomAnchor="23.0"
AnchorPane.topAnchor="5.0" StackPane.alignment="CENTER">
<StackPane.margin>
<Insets bottom="-11.0" left="-12.0" right="-11.0"
top="-11.0" />
</StackPane.margin>
</ListView>
</children>
</StackPane>
</content>
</TitledPane>
<TitledPane text="Transaksi">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0"
prefHeight="180.0" prefWidth="200.0" />
</content>
</TitledPane>
<TitledPane text="Laporan">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0"
prefHeight="180.0" prefWidth="200.0" />
</content>
</TitledPane>
</panes>
</Accordion>
</children>
</AnchorPane>
<StackPane>
<children>
<StackPane fx:id="daftarListMenu" opacity="0.0"
prefHeight="150.0" prefWidth="200.0" />
<StackPane fx:id="menuBaju" style="-fx-background-color: white;"
StackPane.alignment="CENTER">
<children>
<Group layoutX="52.0" layoutY="67.0"
StackPane.alignment="CENTER">
<children>
<TableView fx:id="tableBaju" layoutX="32.0"
layoutY="2.0" onMouseClicked="#klikBaju" prefHeight="324.0"
prefWidth="666.0"
stylesheets="file:/D:/javafx/daftarHargaBaju/src/css/baju.css">
<columns>
<TableColumn fx:id="colNo" minWidth="0.0"
prefWidth="0.0" resizable="false" text="No" />
<TableColumn fx:id="colKode" prefWidth="73.0"
resizable="false" text="Kode" />
<TableColumn fx:id="colNama" prefWidth="142.0"
text="Nama Baju" />
<TableColumn fx:id="colVendor" prefWidth="142.0"
text="Vendor Baju" />
<TableColumn fx:id="colHarga" prefWidth="138.0"
text="Harga Baju" />
<TableColumn fx:id="colTanggal" prefWidth="152.0"
text="Tanggal" />
</columns>
</TableView>
<HBox layoutX="34.0" layoutY="346.0" spacing="10.0">
<children>
<Button layoutX="34.0" layoutY="366.0"
mnemonicParsing="false" onAction="#btnTambah"
prefHeight="31.0" prefWidth="74.0" style="-fx-text-fill: white;"
styleClass="custem-button-input"
stylesheets="file:/D:/javafx/daftarHargaBaju/src/css/baju.css"
text="Tambah">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<Button layoutX="149.0" layoutY="366.0"
mnemonicParsing="false" onAction="#btnEdit"
prefHeight="31.0" prefWidth="74.0" style="-fx-text-fill: white;"
styleClass="custem-button-input"
stylesheets="file:/D:/javafx/daftarHargaBaju/src/css/baju.css"
text="Edit">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<Button mnemonicParsing="false" onAction="#btnBatal"
prefHeight="31.0" prefWidth="74.0" style="-fx-text-fill: white;"
styleClass="custem-button-input"
stylesheets="file:/D:/javafx/daftarHargaBaju/src/css/baju.css"
text="Refresh">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
<Button layoutX="265.0" layoutY="366.0"
mnemonicParsing="false" onAction="#btnHapus"
prefHeight="31.0" prefWidth="74.0" style="-fx-text-fill: white;"
styleClass="custem-button-input"
stylesheets="file:/D:/javafx/daftarHargaBaju/src/css/baju.css"
text="Hapus">
<font>
<Font name="System Bold" size="12.0" />
</font>
</Button>
</children>
</HBox>
<TextField fx:id="txtCariBaju" layoutX="418.0"
layoutY="349.0" onKeyReleased="#cariBaju" prefHeight="25.0"
prefWidth="280.0" promptText="Pencarian" />
<Region layoutX="34.0" layoutY="-14.0"
prefHeight="16.0" prefWidth="677.0" />
<Region layoutX="20.0" layoutY="2.0" prefHeight="386.0"
prefWidth="12.0" />
</children>
<StackPane.margin>
<Insets bottom="4.0" left="4.0" right="4.0" top="4.0" />
</StackPane.margin>
</Group>
</children>
</StackPane>
</children>
</StackPane>
</items>
</SplitPane>
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
</AnchorPane>
<MenuBar prefHeight="25.0" prefWidth="1000.0"
AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" text="Close" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
<effect>
<DropShadow />
</effect>
</MenuBar>
</children>
</AnchorPane>
最佳答案
这通常会让移动/处理变得更容易,因为您的组件是分组的。
在某种程度上,它更符合逻辑并且与物理世界相似。
假设粗体字是容器,斜体字是组件(粗体斜体字是...容器和组件)。现在,如果您尝试描述一个书架:它在房子中,在>房间,在一侧,有多个架子,每个架子包含一些书籍或东西。并且每一个通常都是相对于其容器放置的。
如果您想查找一本书,它就在书架上。如果要移动书架,其中包含的每个组件将同时移动。这听起来很明显,对吧?
当然,可以使用更少的容器。我们看到一个房间包含书籍。它们与以前一样位于同一位置,但我们决定它们不再位于书架容器中。
房间里还有书。它们仍然在同一个位置,并且仍然像书本一样。
如果当您尝试移动书架时,书籍和其他东西仍然漂浮在原来位置的空中,这听起来正确吗?好吧,如果您不使用这些容器,可能会发生这种情况。
关于java - 为什么要串联 GUI 容器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35548660/
我正在尝试编写一行简单的代码,用于从各种服务器的 C 盘中删除各种用户文件。如何与 PowerShell 连接以获取到服务器的路径? 例如,这就是我想要做的,但 PowerShell 没有将 + 符号
我一直在尝试合并(连接)两个具有相同高度和宽度的 mp4 视频,但出现了一些错误。 代码是: FFmpeg ffmpeg = FFmpeg.getInstance(EditVideoActivity.
我正在尝试在 PostgreSQL 中进行简单的串联,但它不断抛出一条错误消息。我不明白我在这里做错了什么。 select concat('abcde', 'fgh'); No function ma
我不知道如何从一个函数中获取两个变量,这是我的菜鸟尝试,这可能吗?如果可以,它是如何完成的? #include float seriesParallel (float r1, float r2);/
我有以下代码: char stringHour[50], stringMinute[50], stringSecond[50]; // lots of code... itoa(hour, strin
我是套接字编程的新手,我正在尝试使用 TCP 实现客户端服务器。客户端在 Windows 中用 Java 编写,服务器在 Tandem/Hp-NonStop 中用 C 编写。我能够连接并向服务器发送请
到目前为止,我有以下内容。 DECLARE @Table Table (ID int, Value1 varchar(50), Value2 varchar(50), Value3 varchar(5
我是 Elasticsearch 的新手,想解决以下问题的用例 我有一些格式如下的文件 { "member_id":"number" "e_id":"number", "c_id":"numbe
我有这个功能来懒惰地观看日志文件... follow :: Handle -> IO [String] follow h = unsafeInterleaveIO $ do catch (do l
这个问题已经有答案了: List of lists changes reflected across sublists unexpectedly (17 个回答) 已关闭 3 年前。 我想创建一个没有
我们有一个 XML 文件,我们正试图找出一种动态使用的方法。 基本知识是这样的: 100.00 110.00 120.00 130.00 对于我们拥有的每个零件,我们希望在其上使用 xslt 以
我有一个很奇怪的问题。 下面的所有代码都工作正常: payload.modules.forEach(function(mod) { var modules_path = '..
如何使用 C 预处理自动生成以下代码模式(访问器)? // Immutable accessor. const auto& member1 () const { return _member1;
我有时间值来自数据库:00:30:00 这是我的代码: var gdtesttime = ; // 00:30:00 console.log(gdtesttime); var a = gdt
数据库:MySQL 我有两张表,一张用于用户分配的角色,一张包含角色信息。我的问题是分配的角色存储在单个字段中,用逗号分隔。我需要构建一个按名称而非 ID 列出角色的报告,但仍位于由列分隔的单个字段中
我在 ffmpeg 中使用以下命令,它会在视频开头添加 1 秒的黑帧。但是,我在输出视频中丢失了原始视频中的音频。我如何调整命令以确保原始音频与最终输出保持一致,或者更好的是,开头有 1 秒的“空白”
表 A 有 X 列,它是由表 B 中的 Y 列和 Z 列(均为 float )串联而成的 int。我想以类似于此的方式连接表 A 和 B: select * from tableA a inner j
pd.Series([1,1,1,1, "something", 1]).astype(float).cumsum().fillna(None) 我想在上面的系列中用 None 填充 NaN,但它告诉
在创建显示 OpenFileDialog/SaveFileDialog 的服务时,我正在考虑创建 LINQ 查询/清除 C# 代码到 Concatinate()/Join() 过滤表达式。 根据这个调
我正在尝试从数组中提取值并将所有值连接到一个字符串中,如下所示 var ingredient: String for tag in tags { if let text = tag.titleL
我是一名优秀的程序员,十分优秀!