javafx - Float hbox to parent -
i having fxml file show popup bottom right. @ first fxml size 500*700. if make file maximum then, hbox should go bottom-right right sticking @ initial position.
how can make hbox floating per screen?
<?xml version="1.0" encoding="utf-8"?> <vbox minheight="600.0" prefwidth="800.0" stylesheets="@nonrepudiation.css" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> <children> <!-- <hbox> --> <!-- <padding> --> <!-- <insets bottom="5.0" left="5.0" right="5.0" top="20.0" /> --> <!-- </padding> --> <!-- </hbox> --> <hbox> <children> <titledpane animated="true" layouty="34.0" minwidth="-infinity" prefheight="580.0" prefwidth="366.0" style="-fx-font-weight: bold;" text="filter criteria" anchorpane.bottomanchor="0.0" anchorpane.leftanchor="0.0" anchorpane.topanchor="64.0"> <content> <anchorpane maxwidth="-infinity" minwidth="-infinity" prefheight="580.0" prefwidth="356.0"> <children> <titledpane animated="true" minwidth="-infinity" style="-fx-font-weight: bold;" styleclass="hiddenheader" text="filter criteria" translatex="-20.0"> <font> <font name="calibri bold" size="11.0" /> </font> </titledpane> <vbox prefheight="580.0" prefwidth="359.0" style="-fx-font-weight: bold;"> <children> <titledpane animated="true" prefheight="145.0" prefwidth="359.0" style="-fx-font-weight: bold;" styleclass="custom-pane" text="quick search"> <content> <anchorpane minheight="0.0" minwidth="0.0" prefheight="90.0" prefwidth="357.0"> <children> <vbox layoutx="10.0" layouty="20.0"> <children> <!--<hbox layoutx="10.0" layouty="0.0" prefheight="35.0" prefwidth="318.0" spacing="8.0" styleclass="vbox-column"> <children> <label prefheight="14.0" prefwidth="94.0" text="value date from"> <hbox.margin> <insets right="2.0" top="5.0" /> </hbox.margin> </label> <datepicker prefwidth="94.0" /> <label prefheight="14.0" prefwidth="20.0" text=" to"> <hbox.margin> <insets top="5.0" /> </hbox.margin> </label> <datepicker prefwidth="94.0" /> </children> <padding> <insets top="10.0" /> </padding> </hbox> --> <hbox layoutx="10.0" layouty="20.0" prefheight="35.0" prefwidth="345.0" spacing="8.0" styleclass="vbox-column"> <children> <label prefheight="14.0" prefwidth="91.0" text="deal number"> <hbox.margin> <insets right="2.0" top="5.0" /> </hbox.margin> </label> <textfield fx:id="dealnumber" prefwidth="160.0" /> </children> <padding> <insets top="10.0" /> </padding> </hbox> <hbox layoutx="10.0" layouty="50.0" prefheight="35.0" prefwidth="345.0" spacing="8.0" styleclass="vbox-column"> <children> <label prefheight="14.0" prefwidth="91.0" text="digest reference"> <hbox.margin> <insets right="2.0" top="5.0" /> </hbox.margin> </label> <textfield fx:id="digestreference" prefwidth="160.0" /> <button maxheight="-infinity" minheight="22.0" mnemonicparsing="false" onaction="#onquicksearch" styleclass="advancedredbutton" text="search" /> </children> <padding> <insets top="10.0" /> </padding> </hbox> </children> </vbox> </children> </anchorpane> </content> </titledpane> <titledpane animated="true" prefheight="430.0" prefwidth="359.0" style="-fx-border-width: 1 1 0 1;" styleclass="custom-pane" text="advanced search"> <content> <anchorpane minheight="0.0" minwidth="0.0" prefheight="580.0" prefwidth="357.0"> <children> <hbox layoutx="7.0" layouty="1.0" prefheight="336.0" prefwidth="341.0"> <children> <gridpane hgap="3.0" layoutx="6.6" layouty="40.0" prefheight="223.0" prefwidth="341.0" vgap="1.0" anchorpane.bottomanchor="30.0" anchorpane.leftanchor="-3.0" anchorpane.rightanchor="-10.0" anchorpane.topanchor="51.0"> <columnconstraints> <columnconstraints hgrow="sometimes" maxwidth="132.99999237060547" minwidth="10.0" prefwidth="122.0" /> <columnconstraints hgrow="sometimes" maxwidth="101.0" minwidth="10.0" prefwidth="92.0" /> <columnconstraints hgrow="sometimes" minwidth="10.0" prefwidth="100.0" /> </columnconstraints> <rowconstraints> <rowconstraints maxheight="43.0" minheight="7.0" prefheight="22.0" vgrow="sometimes" /> <rowconstraints maxheight="88.0" minheight="10.0" prefheight="28.0" vgrow="sometimes" /> <rowconstraints maxheight="107.0" minheight="10.0" prefheight="29.0" vgrow="sometimes" /> <rowconstraints maxheight="119.0" minheight="10.0" prefheight="29.0" vgrow="sometimes" /> <rowconstraints maxheight="133.0" minheight="0.0" prefheight="20.0" vgrow="sometimes" /> <rowconstraints maxheight="138.0" minheight="0.0" prefheight="79.0" vgrow="sometimes" /> </rowconstraints> <children> <text stroketype="outside" strokewidth="0.0" style="-fx-font-weight: bold; -fx-font-size: 14px;" text="field" textalignment="center" wrappingwidth="35.9765625" gridpane.halignment="center" gridpane.valignment="center"> </text> <text stroketype="outside" strokewidth="0.0" style="-fx-font-weight: bold; -fx-font-size: 14px;" text="operator" gridpane.columnindex="1" gridpane.halignment="center"> </text> <text stroketype="outside" strokewidth="0.0" style="-fx-font-weight: bold; -fx-font-size: 14px;" text="value" gridpane.columnindex="2" gridpane.halignment="center"> </text> <combobox fx:id="advoperator1" prefwidth="150.0" prompttext="select operator" gridpane.columnindex="1" gridpane.rowindex="1"> <items> <fxcollections fx:factory="observablearraylist"> <string fx:value="in" /> <string fx:value="not in" /> <string fx:value="equals" /> <string fx:value="not equals" /> <string fx:value="less than" /> <string fx:value="less equals" /> <string fx:value="greater than" /> <string fx:value="greater equals" /> </fxcollections> </items> </combobox> <combobox fx:id="advoperator2" prefwidth="150.0" prompttext="select operator" gridpane.columnindex="1" gridpane.rowindex="2"> <items> <fxcollections fx:factory="observablearraylist"> <string fx:value="in" /> <string fx:value="not in" /> <string fx:value="equals" /> <string fx:value="not equals" /> <string fx:value="less than" /> <string fx:value="less equals" /> <string fx:value="greater than" /> <string fx:value="greater equals" /> </fxcollections> </items> </combobox> <combobox fx:id="advoperator3" prefwidth="150.0" prompttext="select operator" gridpane.columnindex="1" gridpane.rowindex="3"> <items> <fxcollections fx:factory="observablearraylist"> <string fx:value="in" /> <string fx:value="not in" /> <string fx:value="equals" /> <string fx:value="not equals" /> <string fx:value="less than" /> <string fx:value="less equals" /> <string fx:value="greater than" /> <string fx:value="greater equals" /> </fxcollections> </items> </combobox> <!-- <combobox prefwidth="150.0" prompttext="message type" gridpane.rowindex="5" /> <combobox prefwidth="150.0" prompttext="equals" gridpane.columnindex="1" gridpane.rowindex="5" /> <combobox prefwidth="150.0" prompttext="ccy" gridpane.rowindex="6" /> <combobox prefwidth="150.0" prompttext="in" gridpane.columnindex="1" gridpane.rowindex="6" /> --> <textfield gridpane.columnindex="2" gridpane.rowindex="1" /> <textfield gridpane.columnindex="2" gridpane.rowindex="2" /> <textfield fx:id="advtext1" gridpane.columnindex="2" gridpane.rowindex="1" /> <textfield fx:id="advtext2" gridpane.columnindex="2" gridpane.rowindex="2" /> <textfield fx:id="advtext3" gridpane.columnindex="2" gridpane.rowindex="3" /> <label text="select field" gridpane.rowindex="1"> <gridpane.margin> <insets left="5.0" /> </gridpane.margin> </label> <label text="select field" gridpane.rowindex="2"> <gridpane.margin> <insets left="5.0" /> </gridpane.margin> </label> <label text="select field" gridpane.rowindex="3"> <padding> <insets left="5.0" /> </padding> </label> <label text="update date" gridpane.rowindex="4"> <padding> <insets left="5.0" /> </padding> </label> <!-- <textfield gridpane.columnindex="2" gridpane.rowindex="4" /> <textfield gridpane.columnindex="2" gridpane.rowindex="6" /> --> </children> </gridpane> </children> </hbox> <hbox layoutx="7.0" layouty="245.0" prefheight="35.0" prefwidth="348.0"> <children> <text layoutx="7.0" layouty="250.0" stroketype="outside" strokewidth="0.0" text="template name"> <hbox.margin> <insets right="5.0" top="9.0" /> </hbox.margin> </text> <combobox layoutx="94.0" layouty="319.0" prefwidth="248.0" prompttext="default template"> <items> <fxcollections fx:factory="observablearraylist"> <string fx:value="private" /> <string fx:value="public" /> </fxcollections> </items> <hbox.margin> <insets left="7.0" /> </hbox.margin> </combobox> </children> </hbox> <hbox layoutx="7.0" layouty="285.0" prefheight="35.0" prefwidth="348.0"> <children> <text stroketype="outside" strokewidth="0.0" text="type of template"> <hbox.margin> <insets top="9.0" /> </hbox.margin> </text> <combobox prefwidth="248.0" prompttext="public"> <hbox.margin> <insets left="5.0" /> </hbox.margin> </combobox> </children> </hbox> <hbox layoutx="5.0" layouty="325.0" prefheight="45.0" prefwidth="352.0"> <children> <button mnemonicparsing="false" prefheight="45.0" prefwidth="67.0" styleclass="advancedredbutton" text="save template" textalignment="center" wraptext="true" /> <button mnemonicparsing="false" prefheight="45.0" prefwidth="67.0" styleclass="advancedredbutton" text="edit template" textalignment="center" wraptext="true"> <hbox.margin> <insets left="8.0" /> </hbox.margin> </button> <button mnemonicparsing="false" prefheight="45.0" prefwidth="67.0" styleclass="advancedredbutton" text="delete template" textalignment="center" wraptext="true"> <hbox.margin> <insets left="8.0" /> </hbox.margin> </button> <button mnemonicparsing="false" prefheight="45.0" prefwidth="55.0" styleclass="advancedredbutton" text="clear" textalignment="center" wraptext="true"> <hbox.margin> <insets left="8.0" /> </hbox.margin> </button> <button mnemonicparsing="false" onaction="#onadvancedsearch" prefheight="45.0" prefwidth="55.0" styleclass="advancedredbutton" text="search"> <hbox.margin> <insets left="8.0" /> </hbox.margin> </button> </children> </hbox> <hbox layoutx="140.0" layouty="206.0" prefheight="22.0" prefwidth="251.0"> <children> <datepicker layoutx="28.0" layouty="230.0" prefwidth="92.0"> <hbox.margin> <insets right="5.0" /> </hbox.margin> </datepicker> <text layoutx="131.0" layouty="247.0" stroketype="outside" strokewidth="0.0" text="to"> <hbox.margin> <insets right="5.0" top="5.0" /> </hbox.margin> </text> <datepicker layoutx="173.0" layouty="232.0" prefwidth="92.0" /> </children> </hbox> </children> </anchorpane> </content> </titledpane> </children> </vbox> </children> </anchorpane> </content> <graphic> <label layoutx="-20.0" styleclass="triggerlink" text="filter criteria" /> </graphic> <styleclass> <string fx:value="arrowpane" /> <string fx:value="greyborder" /> </styleclass> </titledpane> <anchorpane minheight="500.0" minwidth="434.0" hbox.hgrow="always"> <children> <hbox fillheight="true" minheight="500.0" minwidth="434.0" styleclass="greyborder" anchorpane.bottomanchor="0.0" anchorpane.leftanchor="0.0" anchorpane.rightanchor="0.0" anchorpane.topanchor="0.0" hbox.hgrow="always"> <children> <tableview fx:id="tableview" hbox.hgrow="always" vbox.vgrow="always"> <columns> <tablecolumn style="-fx-font-family: calibri; -fx-font-size: 11px;" text="messageid"> <cellvaluefactory> <propertyvaluefactory property="messageid" /> </cellvaluefactory> </tablecolumn> <tablecolumn prefwidth="110.0" style="-fx-font-family: calibri; -fx-font-size: 11px;" text="digest reference"> <cellvaluefactory> <propertyvaluefactory property="digestreference" /> </cellvaluefactory> </tablecolumn> <tablecolumn prefwidth="115.0" style="-fx-font-family: calibri; -fx-font-size: 11px;" text="message reference"> <cellvaluefactory> <propertyvaluefactory property="messageref" /> </cellvaluefactory> </tablecolumn> <tablecolumn prefwidth="115.0" style="-fx-font-family: calibri; -fx-font-size: 11px;" text="deal number"> <cellvaluefactory> <propertyvaluefactory property="dealno" /> </cellvaluefactory> </tablecolumn> <tablecolumn style="-fx-font-family: calibri; -fx-font-size: 11px;" text="digest value"> <cellvaluefactory> <propertyvaluefactory property="digestvalue" /> </cellvaluefactory> </tablecolumn> <tablecolumn prefwidth="100.0" style="-fx-font-family: calibri; -fx-font-size: 11px;" text="updated date time"> <cellvaluefactory> <propertyvaluefactory property="updatetime" /> </cellvaluefactory> </tablecolumn> </columns> </tableview> </children> </hbox> <hbox fx:id="columnconfighbox" fillheight="false" layoutx="310.0" layouty="427.0"> <children> <tableview fx:id="columnconfigtable" prefheight="150.0" prefwidth="110.0" styleclass="noborderright" hbox.hgrow="always" vbox.vgrow="always"> <columns> <tablecolumn editable="false" minwidth="80.0" prefwidth="90.0" sortable="false" style="-fx-font-family: calibri; -fx-font-size: 11px;" text="column config"> <cellvaluefactory> <propertyvaluefactory property="columnconfig" /> </cellvaluefactory> </tablecolumn> </columns> <columnresizepolicy> <tableview fx:constant="constrained_resize_policy" /> </columnresizepolicy> </tableview> <button minheight="15.0" minwidth="15.0" mnemonicparsing="false" onaction="#closethis" styleclass="closethis" /> </children> </hbox> <!-- <gridpane fx:id="columnconfig" layoutx="320.0" layouty="480.0" visible="false"> <columnconstraints> <columnconstraints hgrow="sometimes" minwidth="10.0" prefwidth="100.0" /> </columnconstraints> <rowconstraints> <rowconstraints minheight="10.0" prefheight="30.0" vgrow="sometimes" /> <rowconstraints minheight="10.0" prefheight="30.0" vgrow="sometimes" /> <rowconstraints minheight="10.0" prefheight="30.0" vgrow="sometimes" /> </rowconstraints> <children> <text stroketype="outside" strokewidth="0.0" text="ccy" /> <text stroketype="outside" strokewidth="0.0" text="ccy amount" gridpane.rowindex="1" /> <text stroketype="outside" strokewidth="0.0" text="ctr ccy" gridpane.rowindex="2" /> </children> </gridpane> --> </children> </anchorpane> </children> </hbox> </children> <styleclass> <!-- <string fx:value="sapphire" /> --> <string fx:value="defaultfont" /> </styleclass> </vbox>
Comments
Post a Comment