Demo: apply right-to-left orientation to whole frame

This commit is contained in:
Karl Tauber
2019-09-07 17:10:05 +02:00
parent 522d7dc0a1
commit 177a1e6181
9 changed files with 9 additions and 11 deletions

View File

@@ -108,7 +108,7 @@ class BasicComponentsPanel
//======== this ======== //======== this ========
setLayout(new MigLayout( setLayout(new MigLayout(
"ltr,hidemode 3", "hidemode 3",
// columns // columns
"[]" + "[]" +
"[]" + "[]" +

View File

@@ -7,7 +7,7 @@ new FormModel {
"JavaCodeGenerator.defaultVariableLocal": true "JavaCodeGenerator.defaultVariableLocal": true
} }
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,hidemode 3" "$layoutConstraints": "hidemode 3"
"$columnConstraints": "[][][][][][]" "$columnConstraints": "[][][][][][]"
"$rowConstraints": "[][][][][][][][][][][][][]" "$rowConstraints": "[][][][][][][][][][][][][]"
} ) { } ) {

View File

@@ -157,9 +157,7 @@ class ControlBar
private void rightToLeftChanged() { private void rightToLeftChanged() {
boolean rightToLeft = rightToLeftCheckBox.isSelected(); boolean rightToLeft = rightToLeftCheckBox.isSelected();
int tabCount = tabbedPane.getTabCount(); rightToLeftChanged( frame, rightToLeft );
for( int i = 0; i < tabCount; i++ )
rightToLeftChanged( (Container) tabbedPane.getComponentAt( i ), rightToLeft );
} }
private void rightToLeftChanged( Container c, boolean rightToLeft ) { private void rightToLeftChanged( Container c, boolean rightToLeft ) {

View File

@@ -49,7 +49,7 @@ class DataComponentsPanel
//======== this ======== //======== this ========
setLayout(new MigLayout( setLayout(new MigLayout(
"ltr,hidemode 3", "hidemode 3",
// columns // columns
"[]" + "[]" +
"[200]" + "[200]" +

View File

@@ -7,7 +7,7 @@ new FormModel {
"JavaCodeGenerator.defaultVariableLocal": true "JavaCodeGenerator.defaultVariableLocal": true
} }
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,hidemode 3" "$layoutConstraints": "hidemode 3"
"$columnConstraints": "[][200][200]" "$columnConstraints": "[][200][200]"
"$rowConstraints": "[][::200][::150]" "$rowConstraints": "[][::200][::150]"
} ) { } ) {

View File

@@ -82,7 +82,7 @@ class MoreComponentsPanel
//======== this ======== //======== this ========
setLayout(new MigLayout( setLayout(new MigLayout(
"ltr,hidemode 3", "hidemode 3",
// columns // columns
"[]" + "[]" +
"[]" + "[]" +

View File

@@ -7,7 +7,7 @@ new FormModel {
"JavaCodeGenerator.defaultVariableLocal": true "JavaCodeGenerator.defaultVariableLocal": true
} }
add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "javax.swing.JPanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "ltr,hidemode 3" "$layoutConstraints": "hidemode 3"
"$columnConstraints": "[][][][][][]" "$columnConstraints": "[][][][][][]"
"$rowConstraints": "[][][][][][][][][]" "$rowConstraints": "[][][][][][][][][]"
} ) { } ) {

View File

@@ -88,7 +88,7 @@ class OptionPanePanel
//======== panel9 ======== //======== panel9 ========
{ {
panel9.setLayout(new MigLayout( panel9.setLayout(new MigLayout(
"flowy,ltr,hidemode 3", "flowy,hidemode 3",
// columns // columns
"[]" + "[]" +
"[]" + "[]" +

View File

@@ -10,7 +10,7 @@ new FormModel {
name: "this" name: "this"
"border": sfield com.jformdesigner.model.FormObject NULL_VALUE "border": sfield com.jformdesigner.model.FormObject NULL_VALUE
add( new FormContainer( "com.formdev.flatlaf.demo.ScrollablePanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) { add( new FormContainer( "com.formdev.flatlaf.demo.ScrollablePanel", new FormLayoutManager( class net.miginfocom.swing.MigLayout ) {
"$layoutConstraints": "flowy,ltr,hidemode 3" "$layoutConstraints": "flowy,hidemode 3"
"$columnConstraints": "[][][fill]" "$columnConstraints": "[][][fill]"
"$rowConstraints": "[top][top][top][top][top][top][top][top]" "$rowConstraints": "[top][top][top][top][top][top][top][top]"
} ) { } ) {