|
see Users group for news,tutorial and documentation about JDLayout 2.2.1
14/04/2009 - NEW RELEASE JDLayout 2.2.1!! Resolved some compilation bugs Compiled with NetBeans JavaFX v.1.1.1
18/03/2009 - RELEASE JDLayout 2.2 Resolved Span and other bugs Indipendent special rows setting Vertical or/and Horizontal Grow item into cell Different cell fill setting Best expand control
NEW! DOWNLOAD THE NEW JDLayout v2.2 jar library release DOWNLOAD THE NEW JDLayout v2.2 source library release
JDLAYOUT IS A DIEGO BENNA JAVAFX PROJECT In JDLayout package jar there is the DigLayout.
"I dreamed my layout as a group of sheeps. The sheeps were sorted by columns and rows. Each column and row had a dog and each sheep was watching at two dogs. The firs one was giving her the column and the second one the row positioning. If there was a bigger sheep, then a new special dog was created for her. That dog was taking his position whatching some other friend dogs"
Diego
Structure code sample import Window.JDLayout.*;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.effect.*;
/** * @author Diego Benna diego.benna@gmail.com
*/
var panel = DigLayout{
// All setting
.....
// Rows and Items
digrows:[
Row{
items:[
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "Item 1"
}
}
,
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "Item 2"
}
}
]
},
Row{
items:[
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "Item 3"
}
}
,
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "Item 4"
}
}
]
}
]
};
Stage{
title : "UnitTest Simple Panel"
scene : Scene{
width: 540
height: 370
content: [
panel
]
};
}
Use DigLayout dynamic Layout Manager Percentual extension | Demo Dynamic Layout Manager with percentual extension: | | | Demos source: | DOWNLOAD | ....
// External margin
margin:10
internalstroke: javafx.scene.paint.Color.GRAY
// Set columns and rows size
// e:xxx -> are empty cols or empty columns
// 40% of the remaining scene size in column 3
// 60% of the remaining scene size in column 5
columns:["150","e:20","40%","e:20","60%"]
rows:["e:20","50","e:40","100%","e:5","50"]
// Yes resize with window
fixed:false
// Resize al percentual column column with windows
percentualFlag:true
digrows:[
....
]
Use DigLayout dynamic Layout Manager | Demo Dynamic Layout Manager last column/row extension: | | | Demos source: | DOWNLOAD | ....
// External margin
margin:10
internalstroke: javafx.scene.paint.Color.GRAY
// Set columns and rows size
// e:xxx -> are empty cols or empty columns
// 40% of the remaining scene size in column 3
// 60% of the remaining scene size in column 5
columns:["150","e:20","40%","e:20","60%"]
rows:["e:20","50","e:40","100%","e:5","50"]
// Yes resize with window
fixed:false
// Resize only last column with windows
percentualFlag:false
digrows:[
....
]
Use DigLayout with Colspan | Demo DigLayout with colspanl: | | | Demos source: | DOWNLOAD | DigLayout{
// External margin
margin:10
internalstroke: javafx.scene.paint.Color.GRAY
// Set columns and rows size
// e:xxx -> are empty cols or empty columns
// 40% of the remaining scene size in column 3
// 60% of the remaining scene size in column 5
columns:["150","e:20","40%","e:20","60%"]
rows:["50","100%","50"]
// Yes resize with window
fixed:false
// Resize al percentual column column with windows
percentualFlag:true
digrows:[
Row{
items:[
Item{
valign:"middle"
halign:"center"
colspan:2
fill: javafx.scene.paint.LinearGradient {
startX: 0.0, startY: 0.0, endX: 0.0, endY: 1.0, proportional: true
stops: [
javafx.scene.paint.Stop {offset: 0.0 color: javafx.scene.paint.Color.web("#e9e19e")},
javafx.scene.paint.Stop {offset: 1.0 color: javafx.scene.paint.Color.web("#c2bb77")}
]
}
item:
javafx.ext.swing.SwingLabel {
text: "colspan: 2"
}
},
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "W 40% - H 50px"
}
}
,
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "W 60% - H 50px"
}
}
]
},
Row{
items:[
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "W 150px - H 100%"
}
}
,
Item{
valign:"middle"
halign:"center"
colspan:3
fill: javafx.scene.paint.LinearGradient {
startX: 0.0, startY: 0.0, endX: 1.0, endY: 1.0, proportional: true
stops: [
javafx.scene.paint.Stop {offset: 0.0 color: javafx.scene.paint.Color.web("#ebcd2c")},
javafx.scene.paint.Stop {offset: 1.0 color: javafx.scene.paint.Color.web("#c67414")}
]
}
item:
javafx.ext.swing.SwingLabel {
text: "colspan: 3"
}
}
]
},
Row{
items:[
Item{
valign:"middle"
halign:"center"
colspan:4
fill: javafx.scene.paint.LinearGradient {
startX: 0.0, startY: 0.0, endX: 1.0, endY: 1.0, proportional: true
stops: [
javafx.scene.paint.Stop {offset: 0.0 color: javafx.scene.paint.Color.web("#fffacd")},
javafx.scene.paint.Stop {offset: 1.0 color: javafx.scene.paint.Color.web("#ffffff")}
]
}
item:
javafx.ext.swing.SwingLabel {
text: "colspan: 4"
}
}
,
Item{
valign:"middle"
halign:"center"
item:
javafx.ext.swing.SwingLabel {
text: "W 60% - H 50px"
}
}
]
},
]
};
Thank you Tommaso detto Tommone for translate! Now think something.. and now you lose the game!
|