Browse Source

Add MigLayout for test code

pull/52/head
Vladimir Sitnikov 5 years ago
parent
commit
c43697be93
  1. 2
      core/build.gradle.kts
  2. 6
      core/src/test/java/ui/toolTip/ToolTipDemo.java
  3. 2
      dependencies-bom/build.gradle.kts
  4. 1
      gradle.properties

2
core/build.gradle.kts

@ -15,6 +15,8 @@ dependencies {
implementation("org.swinglabs:jxlayer")
compileOnly("org.swinglabs:swingx")
testImplementation("com.formdev:svgSalamander")
testImplementation("com.miglayout:miglayout-core")
testImplementation("com.miglayout:miglayout-swing")
testImplementation("org.swinglabs:swingx")
}

6
core/src/test/java/ui/toolTip/ToolTipDemo.java

@ -28,6 +28,7 @@ import com.github.weisj.darklaf.components.tooltip.ToolTipContext;
import com.github.weisj.darklaf.components.tooltip.ToolTipStyle;
import com.github.weisj.darklaf.components.tooltip.TooltipAwareButton;
import com.github.weisj.darklaf.util.Alignment;
import net.miginfocom.swing.MigLayout;
import ui.ComponentDemo;
import ui.DemoPanel;
@ -48,13 +49,12 @@ public class ToolTipDemo implements ComponentDemo {
button.setToolTipText("ToolTip demo text!");
JPanel controlPanel = panel.getControls();
controlPanel.setLayout(new GridLayout(4, 2));
controlPanel.setLayout(new MigLayout("fillx, wrap 2", "[][grow]"));
controlPanel.add(new JLabel());
controlPanel.add(new JCheckBox("Align inside") {{
setSelected(context.isAlignInside());
addActionListener(e -> context.setAlignInside(isSelected()));
}});
}}, "span");
controlPanel.add(new JLabel("Tooltip Style:", JLabel.RIGHT));
controlPanel.add(new JComboBox<ToolTipStyle>(ToolTipStyle.values()) {{
setSelectedItem(ToolTipStyle.BALLOON);

2
dependencies-bom/build.gradle.kts

@ -33,5 +33,7 @@ dependencies {
apiv("org.swinglabs:jxlayer")
apiv("org.swinglabs:swingx")
apiv("com.formdev:svgSalamander")
apiv("com.miglayout:miglayout-core", "miglayout")
apiv("com.miglayout:miglayout-swing", "miglayout")
}
}

1
gradle.properties

@ -17,5 +17,6 @@ com.github.johnrengelman.shadow.version =5.1.0
# Dependencies
jna.version =4.1.0
jxlayer.version =3.0.4
miglayout.version =5.2
swingx.version =1.6.1
svgSalamander.version =1.1.2.1

Loading…
Cancel
Save