scrollpane

JavaFX ScrollPane on Android - Too Slow

百般思念 提交于 2020-01-06 15:42:34
问题 I have just coded a simple example of using a scrolling pane in JavaFX. Just one ScrollPane placed in the Scene, and the ScrollPane holds a Label component with a large text. Using gradle I have uploaded the app on a Nexus 4 android device. As you can see from the video I have uploaded, the scrolling is way too slow. I am sure others have experienced this. Any suggestion of how this can be changed to the native speed scroll is really much appreciated. Source code of the app can be downloaded

Is there a way to update a scrollbar when there is a modification which changes its scrollpane content height. It is during a dragging operation

霸气de小男生 提交于 2020-01-06 06:25:07
问题 There is a JAVAFX Scrollpane which contains a treeview. Inside the treeview, i have a few vboxs. Their height can change. Firstly, there was a problem : when i move a vbox thanks to a drag operation, the scrollbar which belongs to the scrollpane didn't want to move. In order to resolve this problem, i have done a few researches here. I found a solution. The code is below private ScrollBar getVerticalScrollbar() { ScrollBar result = null; for (Node n : scrollPane.lookupAll(".scroll-bar")) { if

Wrapping a GridPane in a ScrollPane or programatically modifying it. Most efficient approach?

痞子三分冷 提交于 2020-01-05 10:32:47
问题 In a game I have a GridPane displaying the Tiles of the world in square cells. The player can, using the keyboard, move what is displayed by a column\row. The approaches I've thought of are: Having the GridPane change programmatically the displayed tiles by moving everything by x steps on player input. Wrapping the GridPane in a ScrollPane and tying the ScrollPane's scroll to Keyboard input. My question is, assuming that things that are off-sight but on the same map are always loaded, what

How to make scrolling of wide content smoooth with JavaFx?

回眸只為那壹抹淺笑 提交于 2020-01-05 08:50:52
问题 I'm developing gant chart with JavaFx. My main content is placed inside of ScrollPane. I have zoom option which is changing content width. This is performance related to content size: zoom: x1 - 2880px // smooth scrolling x2 - 5760px // smooth scrolling x3 - 8640px // smooth scrolling x4 - 11520px // bad/jumps x5 - 14410px // very bad/ not smooth at all x6 - ... // :-/ Is it possible to fix it some how? Which way to go ... I don't have any idea how to start or even is it possible to fix it :-

JavaFX ScrollPane setVvalue() not working as intended

左心房为你撑大大i 提交于 2019-12-25 08:29:01
问题 In my application I have a ScrollPane with a VBox that potentially contains anywhere from 0 to 1000 panes at a set height of 90 each. Each pane has related items that could loaded from a button inside that clears the VBox and adds its children along with a 'Return to Results' button that loads the previous list and should return to the same place in the ScrollPane. However, the setVvalue() doesn't appear to be working. The panes and their children are of the same class. package application;

JavaFX - Adding nodes to ScrollPane with correct scrolling direction

女生的网名这么多〃 提交于 2019-12-23 10:12:33
问题 I have a ScrollPane in my scene and would like to add a series of Nodes to it. The exact amount must be dynamic. I've been testing the concept with Label nodes and can successfully add as many Labels as I want to the content of the ScrollPane (currently a VBox). My problem is figuring out how to allow the user to scroll normally through the ScrollPane full of Nodes. The content matches pace with the scrollbar; that is, when I scroll down, the content moves down. I scroll up, the content

JavaFX - Zoom relative to mouse position

白昼怎懂夜的黑 提交于 2019-12-22 18:26:51
问题 I can't get working zoom relative to mouse position in JavaFX. I've read and tried rewrite this and this, but it's not working. Can't scroll viewport using scrollPane.setViewportBounds() . I must use scrollPane.setHvalue() and scrollPane.setVvalue() , but can't get right recalculation to keep the same pixels under the mouse cursor. Current code keeps scrollbars positions: ZoomHandler.java import javafx.event.EventHandler; import javafx.scene.control.ScrollPane; import javafx.scene.input

How to use my trackpad for horizontal mousewheel scrolling in a Java AWT ScrollPane

≡放荡痞女 提交于 2019-12-22 05:18:20
问题 Like many modern mice and trackpads, my laptop supports vertical and horizontal scrolling. It's an addictive feature once you get used to it. I simply want my Java apps to support horizontal scrolling via the trackpad/mousewheel, but everywhere I search it seems that this is not possible in Java. I really want someone to tell me that I'm somehow doing it wrong, this feature is already requested behaviour: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6440198 The inability to do this

How to create a scrollable panel of components in JavaFX?

六月ゝ 毕业季﹏ 提交于 2019-12-21 13:03:10
问题 So, basically, I'm trying to achieve this a scrollable set of components with spacing etc. and the ability to add more components. The list of components are custom anchorpane components. Here's an example that I got working: The problem is that that uses a gridpane inside of a scrollpane and for some reason the gridpane does not fill the width of the scrollpane at all. So, if I resize, everything stays where it is instead of stretching inside the gridpane columns. Also, if I were to stick to

Sizing a JScrollPane in a JTabbedPane in a JFrame

馋奶兔 提交于 2019-12-20 07:10:00
问题 I understand from this post Don't Set sizes on a JComponent that you dont set preferred sizes on any component and instead let the layout manager do this for you. My question is, I have a JPanel that I put into a JTabbedPane into a JFrame like this JFrame frame=new JFrame(); JTabbedPane pane=new JTabbedPane(); pane.addTab("Tab 1",new JScrollPane(getJPanel1())); pane.addTab("Tab 2",new JScrollPane(getJPanel2())); frame.setContentPane(pane); Now in this case the JTabbedPane will take the size