Browse Source

Formatting.

pull/170/head
weisj 5 years ago
parent
commit
8e4ce7dc1f
  1. 3
      core/src/main/java/com/github/weisj/darklaf/components/color/PopupColorChooser.java
  2. 12
      core/src/main/java/com/github/weisj/darklaf/components/text/SearchTextFieldWithHistory.java
  3. 3
      core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipContext.java
  4. 6
      core/src/test/java/ui/button/ButtonDemo.java
  5. 4
      core/src/test/java/ui/label/LoadIndicatorDemo.java

3
core/src/main/java/com/github/weisj/darklaf/components/color/PopupColorChooser.java

@ -129,8 +129,7 @@ public class PopupColorChooser extends JToolTip {
}
protected ToolTipContext createToolTipContext() {
return new ToolTipContext()
.setAlignment(Alignment.CENTER)
return new ToolTipContext().setAlignment(Alignment.CENTER)
.setCenterAlignment(Alignment.SOUTH)
.setUseBestFit(true)
.setToolTipInsets(new Insets(2, 2, 2, 2))

12
core/src/main/java/com/github/weisj/darklaf/components/text/SearchTextFieldWithHistory.java

@ -24,6 +24,9 @@
*/
package com.github.weisj.darklaf.components.text;
import com.github.weisj.darklaf.ui.text.DarkTextFieldUI;
import com.github.weisj.darklaf.ui.text.DarkTextUI;
import java.util.List;
import javax.swing.text.Document;
@ -64,7 +67,7 @@ public class SearchTextFieldWithHistory extends SearchTextField {
public SearchTextFieldWithHistory(final Document doc, final String text, final int columns) {
super(doc, text, columns);
history = new TextFieldHistoryPopup(this, 100, 800);
putClientProperty("JTextField.Search.FindPopup", history);
putClientProperty(DarkTextFieldUI.KEY_FIND_POPUP, history);
}
/**
@ -169,11 +172,4 @@ public class SearchTextFieldWithHistory extends SearchTextField {
public int getLength() {
return history.getLength();
}
public void setHistoryLength(final int length) {
if (length < 0) throw new IllegalArgumentException("History can't have negative size");
if (length == 0) {
putClientProperty("JTextField.Search.FindPopup", null);
}
}
}

3
core/src/main/java/com/github/weisj/darklaf/components/tooltip/ToolTipContext.java

@ -413,8 +413,7 @@ public class ToolTipContext {
* @see #setInsideArea(Area)
*/
public ToolTipContext setInsideArea(final Rectangle insideRect) {
this.hotSpotArea = new Area(insideRect);
return this;
return setInsideArea(new Area(insideRect));
}
/**

6
core/src/test/java/ui/button/ButtonDemo.java

@ -122,12 +122,10 @@ public class ButtonDemo implements ComponentDemo {
controlPanel = panel.addControls();
controlPanel.add(new QuickColorChooser(DarkButtonUI.KEY_HOVER_COLOR, Color.BLACK,
(b, c) -> button
.putClientProperty(DarkButtonUI.KEY_HOVER_COLOR,
(b, c) -> button.putClientProperty(DarkButtonUI.KEY_HOVER_COLOR,
b ? c : null)));
controlPanel.add(new QuickColorChooser(DarkButtonUI.KEY_HOVER_COLOR, Color.BLACK,
(b, c) -> button
.putClientProperty(DarkButtonUI.KEY_CLICK_COLOR,
(b, c) -> button.putClientProperty(DarkButtonUI.KEY_CLICK_COLOR,
b ? c : null)));
controlPanel = panel.addControls();

4
core/src/test/java/ui/label/LoadIndicator.java → core/src/test/java/ui/label/LoadIndicatorDemo.java

@ -32,10 +32,10 @@ import ui.DemoResources;
import com.github.weisj.darklaf.components.loading.LoadingIndicator;
public class LoadIndicator extends LabelDemoBase<LoadingIndicator> {
public class LoadIndicatorDemo extends LabelDemoBase<LoadingIndicator> {
public static void main(final String[] args) {
ComponentDemo.showDemo(new LoadIndicator());
ComponentDemo.showDemo(new LoadIndicatorDemo());
}
@Override
Loading…
Cancel
Save