dukke / fxskins Goto Github PK
View Code? Open in Web Editor NEWSkins with new features and looks for existing JavaFX controls
Home Page: https://pixelduke.com/fxskins/
Skins with new features and looks for existing JavaFX controls
Home Page: https://pixelduke.com/fxskins/
Issue:
Wide Intermediate Progress Bars do not "stop" in the center of the Progress Bar. For small Progress Bars it works fine but the wider it becomes the more the center of the "stop" shifts to the right.
Video:
Example code:
TestProgressBar.java:
import com.pixelduke.control.skin.FXSkins;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class TestProgressBar extends Application {
@Override
public void start(Stage stage) throws Exception {
FXMLLoader loader = new FXMLLoader(this.getClass().getResource("TestProgressBar.fxml"));
loader.setController(this);
Parent root = loader.load();
Scene scene = new Scene(root);
scene.getStylesheets().add(FXSkins.getStylesheetURL());
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
TestProgressBar.fxml:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ProgressBar?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<VBox xmlns="http://javafx.com/javafx/15.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<AnchorPane>
<children>
<StackPane style="-fx-background-color: lightgrey;" AnchorPane.leftAnchor="340.0" AnchorPane.rightAnchor="340.0">
<children>
<ProgressBar maxWidth="-Infinity" minWidth="-Infinity" prefWidth="300.0">
<StackPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</StackPane.margin>
</ProgressBar>
</children>
</StackPane>
</children>
</AnchorPane>
<StackPane style="-fx-background-color: lightgrey;">
<children>
<ProgressBar prefWidth="1000.0">
<StackPane.margin>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</StackPane.margin>
</ProgressBar>
</children>
</StackPane>
</children>
</VBox>
At https://pixelduke.com/fxskins/ it is written compile 'com.pixelduke:fxskins:1.0.0'
however, it does not work because
compile
is removed from Gradle, it should be implementation
Would be great if you could add this badge to your readme:
[![JFXCentral](https://img.shields.io/badge/Find_me_on-JFXCentral-blue?logo=googlechrome&logoColor=white)](https://www.jfx-central.com/libraries/fxskins)
README.md:
## License
FXSkins uses the ['GNU General Public License, version 2, with the Classpath Exception'](https://openjdk.java.net/legal/gplv2+ce.html)
pom in maven central:
...
<license>
<name>GNU General Public License v3.0-or-later</name>
<url>https://opensource.org/licenses/lgpl-3.0.html</url>
<distribution>repo</distribution>
</license>
...
Note the maven central license url returns a 404 error.
I'm not sure if this is the same as #3 or not, but since it is not related to drag 'n drop, I am logging this as a new issue.
When using a scrollpane, the scroll bar (e.g the vertical scroll bar), is not sitting on the edge of the view, but is instead shifted in from the edge and overlapping with other components in my view:
If I turn FXSkins off it looks like this:
which is as expected.
In the documentation, it mentions using padding. I tried that, and I can shift my content far enough away that it doesn't get overlapped, but it still look bad that the scrollbar is so far from the edge of the view.
I'm not sure if it matters, but this is happening inside a Dialog.
If there is not a way to fix it, is there a way to disable the Conscious Scroll Pane, but keep other FXSkins features?
Thanks for your help!
Environment:
OS: Windows 10
Java: 17.0.2
JavaFX: 17.0.2
Firstly great work on this and Jmetro!
I have a somewhat strange glitch happening. In my program the user can drag and drop tabs into different tab panes. These tabs have a scroll pane inside them and therefore have scrollbars with the JXSkin.
Sometimes I've noticed when dragging and dropping one of the scrollbars can sometimes not move where it should:
The second I move my mouse to where it should be, everything appears fixed but after the wide scrollbar animates out to be replaced with the thin one, it is in the wrong position again (but only sometimes :/).
I cannot get this glitch to work when using normal scroll bars, so I suspect it is the FXSkins library. Everything fixes itself if resize the stage in anyway so I suspect I'm causing a css/layout pass. Perhaps the scrollbar is not properly being labelled as dirty for a css pass when it should be?
This is with JavaFX17, FXSkins 1.0.0 and JMetro 11.6.15
I also get the following error sometimes:
java.lang.RuntimeException: Error while creating node:class javafx.scene.control.ScrollBar id:null
NODE INFORMATION
Node:ScrollBar@60ddfefe[styleClass=scroll-bar normal-scroll-bar] Class:class javafx.scene.control.ScrollBar Id:null
Children:[StackPane@717df4d9[styleClass=track-background], ScrollBarSkin$2@ab2165[styleClass=increment-button], ScrollBarSkin$3@6d684be0[styleClass=decrement-button], StackPane@2d7ce594[styleClass=track], ScrollBarSkin$1@33b907de[styleClass=thumb]]
PARENT INFORMATION
Node:ScrollPane@2beb2dbf[styleClass=scroll-pane] Class:class javafx.scene.control.ScrollPane Id:null
Children:[ScrollPaneSkin$5@52911160[styleClass=viewport], ScrollBar@7909bf3a[styleClass=scroll-bar], ScrollBar@5d2b5257[styleClass=scroll-bar], StackPane@419f7540[styleClass=corner], ScrollBar@5ce7c754[styleClass=scroll-bar minimal-scroll-bar], ScrollBar@5156ec96[styleClass=scroll-bar minimal-scroll-bar], ScrollBar@248851d5[styleClass=scroll-bar normal-scroll-bar]]
at org.fxconnector.node.SVNodeFactory.createNode(SVNodeFactory.java:56)
at org.fxconnector.StageControllerImpl.createNode(StageControllerImpl.java:773)
at org.fxconnector.StageControllerImpl.lambda$new$10(StageControllerImpl.java:229)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
at javafx.base/javafx.collections.FXCollections$UnmodifiableObservableListImpl.lambda$new$0(FXCollections.java:963)
at javafx.base/javafx.collections.WeakListChangeListener.onChanged(WeakListChangeListener.java:88)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$SingleChange.fireValueChangedEvent(ListListenerHelper.java:164)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.lambda$new$0(VetoableListDecorator.java:76)
at javafx.base/com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329)
at javafx.base/com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73)
at javafx.base/javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:239)
at javafx.base/javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
at javafx.base/javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
at javafx.base/javafx.collections.ObservableListBase.endChange(ObservableListBase.java:211)
at javafx.base/javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:190)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:331)
at javafx.base/com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:220)
at javafx.graphics/javafx.scene.Parent.toFront(Parent.java:729)
at javafx.graphics/javafx.scene.Node.toFront(Node.java:2016)
at com.pixelduke.control.skin.ConsciousScrollPaneSkin.doMouseEnteredOnNormalBar(ConsciousScrollPaneSkin.java:104)
at com.pixelduke.control.skin.ConsciousScrollPaneSkin.mouseEnteredOnNormalVBar(ConsciousScrollPaneSkin.java:94)
at javafx.base/com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:247)
at javafx.base/com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:234)
at javafx.base/com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at javafx.base/com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at javafx.base/com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at javafx.base/com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at javafx.base/com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.base/javafx.event.Event.fireEvent(Event.java:198)
at javafx.base/com.sun.javafx.event.EventQueue.fire(EventQueue.java:48)
at javafx.graphics/javafx.scene.Scene$MouseHandler.handleEnterExit(Scene.java:3811)
at javafx.graphics/javafx.scene.Scene$MouseHandler.process(Scene.java:3882)
at javafx.graphics/javafx.scene.Scene.processMouseEvent(Scene.java:1878)
at javafx.graphics/javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2623)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:411)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:301)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$2(GlassViewEventHandler.java:450)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:424)
at javafx.graphics/com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:449)
at javafx.graphics/com.sun.glass.ui.View.handleMouseEvent(View.java:557)
at javafx.graphics/com.sun.glass.ui.View.notifyMouse(View.java:943)
at com.sun.jna.Native.invokeLong(Native Method)
at com.sun.jna.Function.invoke(Function.java:428)
at com.sun.jna.Function.invoke(Function.java:361)
at com.sun.jna.Library$Handler.invoke(Library.java:265)
at com.sun.proxy.$Proxy8.CallWindowProc(Unknown Source)
at ch.micheljung.fxwindow.DecorationWindowProcedure.callback(DecorationWindowProcedure.java:122)
at jdk.internal.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at com.sun.jna.CallbackReference$DefaultCallbackProxy.invokeCallback(CallbackReference.java:520)
at com.sun.jna.CallbackReference$DefaultCallbackProxy.callback(CallbackReference.java:551)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
at java.base/java.lang.Thread.run(Thread.java:832)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.