Cliff Evan

Greenhorn
+ Follow
since Oct 06, 2018
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Cliff Evan

Hello again.

I'm trying to make a swap animation of two cells in ListView<String>. The code looks like:


Everything works, except one thing. If cellMax is out from viewport  of ListView ( you need to scroll listview to see cellMax) then it's not rendered (or visible) when Transition changes cellMax.tranlateY.

I tried to do: cellMax.setVisible(true), cellMax.setOpacity(1) but nothing helped.

Don't know if that can help, but for cellMin in a debug:
LayoutFlag = CLEAN
Visible = BooleanProperty [bean: ListViewSkin$2@4a5c2efb[styleClass=cell indexed-cell list-cell]'book0', name: visible, value: true]

And for a cellMax (that located out of viewport) :
LayoutFlag = NEEDS_LAYOUT
Visible = null

How can i render cellMax, when it appear in viewport by Translating it's Y value? Or may be there is another way to swap two cells with a Transitions?

Big thanks for any help


1 month ago
Hello.

I created a FXML with fx:root construct and put on it for example ImageView image; The root AnchorPane has 500 x 500 dimension, and that image located in a center 250 x 250 and has width = 50 and height = 50. I can see all bounds and cooridnates in Scene Builder.
Then i need to do some calculation in a constructor based on image Width\Height and X, Y; But all of them are equals to zero.



As i understood all layouts are invalid until my component is placed into some other parent container of stage and after stage.show() method. But i need to do calculations based just on initial FXML of a component.
I found 2 ways.
The first is to surround them into Platform->runLater():

But i'm sure that this is a wrong approach, because i have to put all initialisation component logic (positioning, transitions and so on) inside that thread.

The second way is to create a method with that calculations and execute it after parent stage initialized    ShellForm.Shell.SOME_INIT_METHOD();


That also seems to be wrong, because i have to control initialization of component inner structure outside that component.


How can i get a correct dimensions of those "child" components in a constructor of my FXML component?
2 months ago
Hello.

I'm trying to create unique resizable interface on the transparent stage. 4 corner elements are perfoming resizing of the window.
I put them into AcnhorPane and wrote handlers (for test left top and right top):


but when i resize and change stage width the opposite elements are twiching\jiggling. The same behavior you can see in top right corner of Chrome Browser, when you resize it. Here you can see what's happening.
Can you give an advice how to avoid and "fix" that issue?
Thanks

9 months ago