Browse Source

Util: Move GraphicsUtil to util module.

pull/235/head
weisj 4 years ago
parent
commit
27b04c9673
No known key found for this signature in database
GPG Key ID: 31124CB75461DA2A
  1. 30
      core/src/main/java/com/github/weisj/darklaf/DarkLaf.java
  2. 4
      core/src/main/java/com/github/weisj/darklaf/components/DefaultColorPipette.java
  3. 2
      core/src/main/java/com/github/weisj/darklaf/components/HoveringPanel.java
  4. 4
      core/src/main/java/com/github/weisj/darklaf/components/border/BubbleBorder.java
  5. 2
      core/src/main/java/com/github/weisj/darklaf/components/color/SmallColorChooser.java
  6. 2
      core/src/main/java/com/github/weisj/darklaf/graphics/PaintUtil.java
  7. 2
      core/src/main/java/com/github/weisj/darklaf/graphics/StringPainter.java
  8. 2
      core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java
  9. 2
      core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java
  10. 2
      core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonBorder.java
  11. 4
      core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java
  12. 4
      core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java
  13. 4
      core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkPreviewPanel.java
  14. 2
      core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/SwatchPanel.java
  15. 2
      core/src/main/java/com/github/weisj/darklaf/ui/label/DarkLabelUI.java
  16. 4
      core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java
  17. 4
      core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java
  18. 4
      core/src/main/java/com/github/weisj/darklaf/ui/numberingpane/DarkNumberingPaneUI.java
  19. 4
      core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java
  20. 4
      core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkMacScrollBarUI.java
  21. 4
      core/src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java
  22. 2
      core/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerBorder.java
  23. 2
      core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java
  24. 2
      core/src/main/java/com/github/weisj/darklaf/ui/table/header/DarkTableHeaderUI.java
  25. 4
      core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextBorder.java
  26. 2
      core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java
  27. 4
      core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java
  28. 4
      core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java
  29. 4
      core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/radiobutton/DarkRadioButtonUI.java
  30. 2
      core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkToolTipUI.java
  31. 2
      core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java
  32. 4
      core/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java
  33. 2
      utils/src/main/java/com/github/weisj/darklaf/util/graphics/GraphicsContext.java
  34. 2
      utils/src/main/java/com/github/weisj/darklaf/util/graphics/GraphicsUtil.java

30
core/src/main/java/com/github/weisj/darklaf/DarkLaf.java

@ -46,11 +46,18 @@ public class DarkLaf extends ThemedLookAndFeel {
/*
* All tasks for initializing the ui defaults in order of execution.
*/
private static final DefaultsInitTask[] INIT_TASKS =
new DefaultsInitTask[] {new RemoveUnusedInitTask(), new ThemeDefaultsInitTask(),
new InputDefaultsInitTask(), new IdeaDefaultsInitTask(), new FontDefaultsInitTask(),
new StyleSheetInitTask(), new ResourceBundleInitTask(), new SystemDefaultsInitTask(),
new PlatformDefaultsInitTask(), new UserInitTask(), new UtilityDefaultsInitTask()};
private static final DefaultsInitTask[] INIT_TASKS = new DefaultsInitTask[] {
new RemoveUnusedInitTask(),
new ThemeDefaultsInitTask(),
new InputDefaultsInitTask(),
new IdeaDefaultsInitTask(),
new FontDefaultsInitTask(),
new StyleSheetInitTask(),
new ResourceBundleInitTask(),
new SystemDefaultsInitTask(),
new PlatformDefaultsInitTask(),
new UserInitTask(),
new UtilityDefaultsInitTask()};
/*
* The base look and feel. This may vary to handle different platform support.
*/
@ -66,9 +73,16 @@ public class DarkLaf extends ThemedLookAndFeel {
*/
private Theme theme;
private final boolean runListenerCallback;
DarkLaf(final boolean runListenerCallback) {
this.runListenerCallback = runListenerCallback;
base = getBase();
}
/** Create Custom Darcula LaF. */
public DarkLaf() {
base = getBase();
this(true);
}
private LookAndFeel getBase() {
@ -107,7 +121,9 @@ public class DarkLaf extends ThemedLookAndFeel {
PopupFactory.setSharedInstance(new DarkPopupFactory());
setupDecorations();
isInitialized = true;
SwingUtilities.invokeLater(LafManager::notifyThemeInstalled);
if (runListenerCallback) {
SwingUtilities.invokeLater(LafManager::notifyThemeInstalled);
}
}
private void setupDecorations() {

4
core/src/main/java/com/github/weisj/darklaf/components/DefaultColorPipette.java

@ -28,12 +28,12 @@ import java.awt.image.BufferedImage;
import javax.swing.*;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.icons.EmptyIcon;
import com.github.weisj.darklaf.ui.colorchooser.ColorListener;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.TimerUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class DefaultColorPipette extends ColorPipetteBase {
private static final int SIZE = 36;

2
core/src/main/java/com/github/weisj/darklaf/components/HoveringPanel.java

@ -26,9 +26,9 @@ import java.awt.*;
import javax.swing.*;
import javax.swing.plaf.BorderUIResource;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
public class HoveringPanel extends JPanel {

4
core/src/main/java/com/github/weisj/darklaf/components/border/BubbleBorder.java

@ -29,9 +29,9 @@ import java.awt.geom.RoundRectangle2D;
import javax.swing.border.AbstractBorder;
import javax.swing.plaf.InsetsUIResource;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class BubbleBorder extends AbstractBorder {

2
core/src/main/java/com/github/weisj/darklaf/components/color/SmallColorChooser.java

@ -41,7 +41,6 @@ import com.github.weisj.darklaf.components.DefaultColorPipette;
import com.github.weisj.darklaf.components.border.DarkBorders;
import com.github.weisj.darklaf.components.border.MarginBorderWrapper;
import com.github.weisj.darklaf.components.chooser.ChooserComponent;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.layout.LayoutHelper;
import com.github.weisj.darklaf.listener.UpdateDocumentListener;
import com.github.weisj.darklaf.ui.button.DarkButtonUI;
@ -52,6 +51,7 @@ import com.github.weisj.darklaf.ui.colorchooser.ColorValueFormatter;
import com.github.weisj.darklaf.ui.slider.DarkSliderUI;
import com.github.weisj.darklaf.ui.tabbedpane.DarkTabbedPaneUI;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class SmallColorChooser extends JPanel implements ChooserComponent<Color> {

2
core/src/main/java/com/github/weisj/darklaf/graphics/PaintUtil.java

@ -28,6 +28,8 @@ import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import com.github.weisj.darklaf.util.Scale;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public final class PaintUtil {

2
core/src/main/java/com/github/weisj/darklaf/graphics/StringPainter.java

@ -37,6 +37,8 @@ import sun.swing.SwingUtilities2;
import com.github.weisj.darklaf.color.ColorUtil;
import com.github.weisj.darklaf.ui.OpacityBufferedUI;
import com.github.weisj.darklaf.util.*;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public final class StringPainter {

2
core/src/main/java/com/github/weisj/darklaf/task/FontDefaultsInitTask.java

@ -35,7 +35,6 @@ import javax.swing.plaf.UIResource;
import com.github.weisj.darklaf.DarkLaf;
import com.github.weisj.darklaf.PropertyLoader;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.theme.Theme;
import com.github.weisj.darklaf.theme.info.FontSizeRule;
import com.github.weisj.darklaf.uiresource.DarkFontUIResource;
@ -43,6 +42,7 @@ import com.github.weisj.darklaf.util.FontUtil;
import com.github.weisj.darklaf.util.LogUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.SystemInfo;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class FontDefaultsInitTask implements DefaultsInitTask {

2
core/src/main/java/com/github/weisj/darklaf/ui/DarkPopupFactory.java

@ -29,11 +29,11 @@ import java.util.Objects;
import javax.swing.*;
import com.github.weisj.darklaf.color.ColorUtil;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.platform.DecorationsHandler;
import com.github.weisj.darklaf.ui.rootpane.DarkRootPaneUI;
import com.github.weisj.darklaf.uiresource.DarkColorUIResource;
import com.github.weisj.darklaf.util.*;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class DarkPopupFactory extends PopupFactory {

2
core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonBorder.java

@ -28,12 +28,12 @@ import javax.swing.border.Border;
import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.ui.VisualPaddingProvider;
import com.github.weisj.darklaf.util.AlignmentExt;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/** @author Jannis Weis */
public class DarkButtonBorder implements Border, UIResource, VisualPaddingProvider {

4
core/src/main/java/com/github/weisj/darklaf/ui/button/DarkButtonUI.java

@ -35,8 +35,6 @@ import javax.swing.plaf.basic.BasicGraphicsUtils;
import com.github.weisj.darklaf.components.tooltip.ToolTipStyle;
import com.github.weisj.darklaf.delegate.AbstractButtonLayoutDelegate;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.ui.VisualPaddingListener;
@ -46,6 +44,8 @@ import com.github.weisj.darklaf.util.AlignmentExt;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkButtonUI extends BasicButtonUI implements ButtonConstants {

4
core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/ColorTriangle.java

@ -37,8 +37,8 @@ import com.github.weisj.darklaf.color.DarkColorModel;
import com.github.weisj.darklaf.color.DarkColorModelHSB;
import com.github.weisj.darklaf.color.DarkColorModelHSL;
import com.github.weisj.darklaf.color.DarkColorModelRGB;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class ColorTriangle extends JComponent {

4
core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/DarkPreviewPanel.java

@ -27,8 +27,8 @@ import javax.swing.*;
import sun.swing.SwingUtilities2;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkPreviewPanel extends JPanel {

2
core/src/main/java/com/github/weisj/darklaf/ui/colorchooser/SwatchPanel.java

@ -27,10 +27,10 @@ import java.awt.event.*;
import javax.swing.*;
import com.github.weisj.darklaf.components.tooltip.ToolTipContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.task.ForegroundColorGenerationTask;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public abstract class SwatchPanel extends JPanel {

2
core/src/main/java/com/github/weisj/darklaf/ui/label/DarkLabelUI.java

@ -31,10 +31,10 @@ import javax.swing.plaf.basic.BasicLabelUI;
import sun.swing.SwingUtilities2;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/** @author Jannis Weis */
public class DarkLabelUI extends BasicLabelUI implements PropertyChangeListener {

4
core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuItemUIBase.java

@ -32,11 +32,11 @@ import sun.swing.MenuItemLayoutHelper;
import sun.swing.SwingUtilities2;
import sun.swing.UIAction;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.LazyActionMap;
import com.github.weisj.darklaf.util.StringUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/**
* @author Konstantin Bulenkov

4
core/src/main/java/com/github/weisj/darklaf/ui/menu/DarkMenuUI.java

@ -30,9 +30,9 @@ import javax.swing.event.MouseInputListener;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicMenuUI;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.listener.MouseInputDelegate;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class DarkMenuUI extends BasicMenuUI {

4
core/src/main/java/com/github/weisj/darklaf/ui/numberingpane/DarkNumberingPaneUI.java

@ -42,10 +42,10 @@ import com.github.weisj.darklaf.components.text.IconListener;
import com.github.weisj.darklaf.components.text.IndexListener;
import com.github.weisj.darklaf.components.text.LineHighlighter;
import com.github.weisj.darklaf.components.text.NumberingPane;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class DarkNumberingPaneUI extends ComponentUI {

4
core/src/main/java/com/github/weisj/darklaf/ui/progressbar/DarkProgressBarUI.java

@ -32,11 +32,11 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicProgressBarUI;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/**
* @author Konstantin Bulenkov

4
core/src/main/java/com/github/weisj/darklaf/ui/scrollpane/DarkMacScrollBarUI.java

@ -28,8 +28,8 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import com.github.weisj.darklaf.graphics.Animator;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
public class DarkMacScrollBarUI extends DarkScrollBarUI {

4
core/src/main/java/com/github/weisj/darklaf/ui/slider/DarkSliderUI.java

@ -31,8 +31,6 @@ import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicSliderUI;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.icons.RotatableIcon;
import com.github.weisj.darklaf.ui.VisualPaddingProvider;
@ -40,6 +38,8 @@ import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkSliderUI extends BasicSliderUI {

2
core/src/main/java/com/github/weisj/darklaf/ui/spinner/DarkSpinnerBorder.java

@ -28,10 +28,10 @@ import javax.swing.border.Border;
import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.ui.DividedWidgetPainter;
import com.github.weisj.darklaf.ui.VisualPaddingProvider;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/**
* @author Konstantin Bulenkov

2
core/src/main/java/com/github/weisj/darklaf/ui/tabbedpane/DarkTabbedPaneUI.java

@ -34,11 +34,11 @@ import javax.swing.text.View;
import com.github.weisj.darklaf.components.uiresource.UIResourceWrapper;
import com.github.weisj.darklaf.focus.FocusParentHelper;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/** @author Jannis Weis */
public class DarkTabbedPaneUI extends DarkTabbedPaneUIBridge {

2
core/src/main/java/com/github/weisj/darklaf/ui/table/header/DarkTableHeaderUI.java

@ -30,10 +30,10 @@ import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumn;
import javax.swing.table.TableColumnModel;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.ui.table.DarkTableScrollPaneBorder;
import com.github.weisj.darklaf.ui.table.DarkTableUI;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/** @author Jannis Weis */
public class DarkTableHeaderUI extends BasicTableHeaderUI {

4
core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextBorder.java

@ -29,13 +29,13 @@ import javax.swing.plaf.InsetsUIResource;
import javax.swing.plaf.UIResource;
import javax.swing.text.JTextComponent;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.Outline;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.ui.VisualPaddingProvider;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkTextBorder implements Border, UIResource, VisualPaddingProvider {

2
core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextFieldUI.java

@ -34,7 +34,6 @@ import javax.swing.text.JTextComponent;
import sun.swing.SwingUtilities2;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.listener.MouseClickListener;
import com.github.weisj.darklaf.listener.MouseMovementListener;
import com.github.weisj.darklaf.listener.PopupMenuAdapter;
@ -42,6 +41,7 @@ import com.github.weisj.darklaf.ui.text.bridge.DarkTextFieldUIBridge;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.FontUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/** @author Jannis Weis */
public class DarkTextFieldUI extends DarkTextFieldUIBridge implements PropertyChangeListener, MouseClickListener {

4
core/src/main/java/com/github/weisj/darklaf/ui/text/DarkTextUI.java

@ -33,8 +33,6 @@ import javax.swing.text.*;
import com.github.weisj.darklaf.components.border.MarginBorderWrapper;
import com.github.weisj.darklaf.components.tooltip.ToolTipStyle;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.ui.OpacityBufferedUI;
@ -49,6 +47,8 @@ import com.github.weisj.darklaf.ui.tooltip.ToolTipConstants;
import com.github.weisj.darklaf.ui.tree.DarkTreeUI;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public abstract class DarkTextUI extends BasicTextUI implements OpacityBufferedUI {

4
core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/DarkToggleButtonUI.java

@ -28,11 +28,11 @@ import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.UIResource;
import javax.swing.plaf.basic.BasicButtonListener;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.ui.button.ButtonConstants;
import com.github.weisj.darklaf.ui.button.DarkButtonUI;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkToggleButtonUI extends DarkButtonUI implements ToggleButtonConstants {

4
core/src/main/java/com/github/weisj/darklaf/ui/togglebutton/radiobutton/DarkRadioButtonUI.java

@ -34,14 +34,14 @@ import javax.swing.plaf.metal.MetalRadioButtonUI;
import sun.swing.SwingUtilities2;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.StringPainter;
import com.github.weisj.darklaf.ui.VisualPaddingListener;
import com.github.weisj.darklaf.ui.togglebutton.DarkToggleButtonUI;
import com.github.weisj.darklaf.ui.togglebutton.ToggleButtonConstants;
import com.github.weisj.darklaf.ui.togglebutton.ToggleButtonFocusNavigationActions;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkRadioButtonUI extends MetalRadioButtonUI implements PropertyChangeListener, ToggleButtonConstants {

2
core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkToolTipUI.java

@ -41,6 +41,8 @@ import com.github.weisj.darklaf.uiresource.DarkColorUIResource;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.DarkUIUtil;
import com.github.weisj.darklaf.util.PropertyKey;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/** @author Jannis Weis */
public class DarkToolTipUI extends BasicToolTipUI

2
core/src/main/java/com/github/weisj/darklaf/ui/tooltip/DarkTooltipBorder.java

@ -31,10 +31,10 @@ import javax.swing.border.Border;
import com.github.weisj.darklaf.components.border.BubbleBorder;
import com.github.weisj.darklaf.components.border.DropShadowBorder;
import com.github.weisj.darklaf.components.tooltip.ToolTipStyle;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.PropertyUtil;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
/** @author Jannis Weis */
public class DarkTooltipBorder implements Border, AlignableTooltipBorder {

4
core/src/main/java/javax/swing/text/DefaultHighlighterDark/DarkHighlightPainter.java

@ -33,12 +33,12 @@ import javax.swing.text.*;
import sun.swing.SwingUtilities2;
import com.github.weisj.darklaf.graphics.GraphicsContext;
import com.github.weisj.darklaf.graphics.GraphicsUtil;
import com.github.weisj.darklaf.graphics.PaintUtil;
import com.github.weisj.darklaf.ui.text.StyleConstantsEx;
import com.github.weisj.darklaf.util.Alignment;
import com.github.weisj.darklaf.util.ColorWrapper;
import com.github.weisj.darklaf.util.graphics.GraphicsContext;
import com.github.weisj.darklaf.util.graphics.GraphicsUtil;
/**
* Note this class only sits inside this weird package because of a hack used in

2
core/src/main/java/com/github/weisj/darklaf/graphics/GraphicsContext.java → utils/src/main/java/com/github/weisj/darklaf/util/graphics/GraphicsContext.java

@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.graphics;
package com.github.weisj.darklaf.util.graphics;
import java.awt.*;
import java.awt.geom.AffineTransform;

2
core/src/main/java/com/github/weisj/darklaf/graphics/GraphicsUtil.java → utils/src/main/java/com/github/weisj/darklaf/util/graphics/GraphicsUtil.java

@ -19,7 +19,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package com.github.weisj.darklaf.graphics;
package com.github.weisj.darklaf.util.graphics;
import java.awt.*;
Loading…
Cancel
Save