Skip to content

Commit 9307738

Browse files
author
Open Lowcode SAS
committed
Changing insets for vertical component band
(does not need to add extra vertical space)
1 parent 1fc8854 commit 9307738

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/org/openlowcode/client/graphic/widget/CComponentBand.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@
2929
import javafx.scene.control.TabPane;
3030
import javafx.scene.layout.Background;
3131
import javafx.scene.layout.BackgroundFill;
32+
import javafx.scene.layout.Border;
33+
import javafx.scene.layout.BorderStroke;
34+
import javafx.scene.layout.BorderStrokeStyle;
35+
import javafx.scene.layout.BorderWidths;
36+
import javafx.scene.layout.CornerRadii;
3237
import javafx.scene.layout.HBox;
3338
import javafx.scene.layout.Pane;
3439
import javafx.scene.layout.VBox;
@@ -127,16 +132,22 @@ public CComponentBand(MessageReader reader, CPageSignifPath parentpath) throws O
127132
* @return a pane with the given direction
128133
*/
129134
public static Pane returnBandPane(int direction) {
130-
Pane thispane;
135+
Pane thispane=null;
136+
boolean valid=false;
131137
if (direction == DIRECTION_DOWN) {
132138
thispane = new VBox(8);
133-
134-
} else {
135-
139+
thispane.setPadding(new Insets(5, 5, 5, 0));
140+
valid=true;
141+
}
142+
if (direction == DIRECTION_RIGHT) {
136143
thispane = new HBox(8);
144+
thispane.setPadding(new Insets(0, 0, 0, 0));
145+
valid=true;
137146
}
147+
if (!valid) throw new RuntimeException("Direction "+direction+" not supported");
148+
138149
thispane.setBackground(new Background(new BackgroundFill(Color.WHITE, null, null)));
139-
thispane.setPadding(new Insets(5, 5, 5, 0));
150+
140151
return thispane;
141152
}
142153

0 commit comments

Comments
 (0)