Browse Source

Merge branch 'master' of https://github.com/weisJ/darklaf

pull/60/head
weisj 5 years ago
parent
commit
7d62789b66
  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") implementation("org.swinglabs:jxlayer")
compileOnly("org.swinglabs:swingx") compileOnly("org.swinglabs:swingx")
testImplementation("com.formdev:svgSalamander") testImplementation("com.formdev:svgSalamander")
testImplementation("com.miglayout:miglayout-core")
testImplementation("com.miglayout:miglayout-swing")
testImplementation("org.swinglabs:swingx") 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.ToolTipStyle;
import com.github.weisj.darklaf.components.tooltip.TooltipAwareButton; import com.github.weisj.darklaf.components.tooltip.TooltipAwareButton;
import com.github.weisj.darklaf.util.Alignment; import com.github.weisj.darklaf.util.Alignment;
import net.miginfocom.swing.MigLayout;
import ui.ComponentDemo; import ui.ComponentDemo;
import ui.DemoPanel; import ui.DemoPanel;
@ -48,13 +49,12 @@ public class ToolTipDemo implements ComponentDemo {
button.setToolTipText("ToolTip demo text!"); button.setToolTipText("ToolTip demo text!");
JPanel controlPanel = panel.getControls(); 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") {{ controlPanel.add(new JCheckBox("Align inside") {{
setSelected(context.isAlignInside()); setSelected(context.isAlignInside());
addActionListener(e -> context.setAlignInside(isSelected())); addActionListener(e -> context.setAlignInside(isSelected()));
}}); }}, "span");
controlPanel.add(new JLabel("Tooltip Style:", JLabel.RIGHT)); controlPanel.add(new JLabel("Tooltip Style:", JLabel.RIGHT));
controlPanel.add(new JComboBox<ToolTipStyle>(ToolTipStyle.values()) {{ controlPanel.add(new JComboBox<ToolTipStyle>(ToolTipStyle.values()) {{
setSelectedItem(ToolTipStyle.BALLOON); setSelectedItem(ToolTipStyle.BALLOON);

2
dependencies-bom/build.gradle.kts

@ -33,5 +33,7 @@ dependencies {
apiv("org.swinglabs:jxlayer") apiv("org.swinglabs:jxlayer")
apiv("org.swinglabs:swingx") apiv("org.swinglabs:swingx")
apiv("com.formdev:svgSalamander") 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 # Dependencies
jna.version =4.1.0 jna.version =4.1.0
jxlayer.version =3.0.4 jxlayer.version =3.0.4
miglayout.version =5.2
swingx.version =1.6.1 swingx.version =1.6.1
svgSalamander.version =1.1.2.1 svgSalamander.version =1.1.2.1

Loading…
Cancel
Save