Giter Club home page Giter Club logo

colorpicker's People

Contributors

dependabot[bot] avatar dheid avatar nilon123456789 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

colorpicker's Issues

[BUG] NPE on using slider

Describe the bug
An NullPointerException is thrown on using the slider (tried in UiBooster test class)

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "javax.swing.JSlider.getOrientation()" because "this.slider" is null
	at com.bric.colorpicker.colorslider.SliderMouseListener.updateSliderValue(SliderMouseListener.java:24)
	at com.bric.colorpicker.colorslider.SliderMouseListener.mouseDragged(SliderMouseListener.java:42)
	at java.desktop/java.awt.Component.processMouseMotionEvent(Component.java:6662)
	at java.desktop/javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3360)
	at java.desktop/java.awt.Component.processEvent(Component.java:6383)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4990)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4919)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4565)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4489)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2769)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4822)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:117)
	at java.desktop/java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:190)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Code snippets
Used this code

Expected behavior
Changing the saturation of the color and not throw an exception ๐Ÿ˜Š

[REQUEST] Horizontal layout for controls

By default the controls and preview swatch are displayed to the right of the color wheel. I'd like to see more customization available by default, specifically an option to have all the modes displayed below the color wheel by default laid out horizontally rather than vertically. It would save a lot of time :)

[BUG] Install error: JVMTest.checksWhetherSystemIsMac:23

Describe the bug
In bash terminal, MacOS 14.3.1, 17.0.10+13-LTS
I type mvn install and get

[INFO] Running com.bric.colorpicker.JVMTest
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.031 s <<< FAILURE! -- in com.bric.colorpicker.JVMTest
[ERROR] com.bric.colorpicker.JVMTest.checksWhetherSystemIsMac -- Time elapsed: 0.020 s <<< FAILURE!
org.opentest4j.AssertionFailedError:

Expecting value to be false but was true
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at com.bric.colorpicker.JVMTest.checksWhetherSystemIsMac(JVMTest.java:23)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] JVMTest.checksWhetherSystemIsMac:23
Expecting value to be false but was true
[INFO]
[ERROR] Tests run: 8, Failures: 1, Errors: 0, Skipped: 0

Expected behavior
The build completes with no test failures

Additional context
I also got a failure when using Java 1.8.0_292-b10

[BUG] NullPointerException

I have a colour picker inside a dockable frame from DockingFrames. It starts off minimized and when it is shown the colour picker throws an NPE

java.lang.NullPointerException
	at java.desktop/javax.swing.plaf.basic.BasicSliderUI.calculateFocusRect(BasicSliderUI.java:674)
	at java.desktop/javax.swing.plaf.basic.BasicSliderUI.calculateGeometry(BasicSliderUI.java:660)
	at com.bric.colorpicker.colorslider.ColorSliderUI.access$000(ColorSliderUI.java:47)
	at com.bric.colorpicker.colorslider.ColorSliderUI$ResizeListener.componentResized(ColorSliderUI.java:207)
	at java.desktop/java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:168)
	at ...

[BUG] Illegal argument exception when color wheel is tiny

Describe the bug
When the component gets too small such as when the frame is resized, the color wheel disappears entirely. However, the selection handle/circle is still visible and creates an exception when you click on it.

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: The saturation value (-5.3851647) must be between [0,1]
	at com.bric.colorpicker.ColorPickerPanel.setHSB(ColorPickerPanel.java:460)
	at com.bric.colorpicker.ColorPickerPanel$ColorPickerMouseInputListener.mousePressed(ColorPickerPanel.java:682)

[BUG] Color slider doesn't update when using setColor()

Describe the bug
setColor() doesn't seem to update the position of the color slider (neither hue, brightness or saturation is updated)

Code snippets

public void setAccentColor(Color accentColor) {
    accentColorPicker.setColor(accentColor);
}

Capture

[BUG] Localization not implemented for ColorPicker/Option

Describe the bug
The ColorPicker class is not using localization.

Code snippets

ResourceBundle.getBundle("com.bric.colorpicker.resources.ColorPicker"); // This is not calling the getBundle with a local.

Expected behavior

ResourceBundle.getBundle("com.bric.colorpicker.resources.ColorPicker", local); // local being the current active localization

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.