1
我有這樣一個場景:哈弗拖動
FlowPane
AnchorPane
VBox
Label
LabeledText
HBox
ImageView
VBox
Label
LabeledView
StackPane
HBox
ImageView
的FlowPane
有多個AnchorPane
節點。我需要的是讓AnchorPane
在拖拽任何內容的同時進行盤旋。就像我沒有拖動鼠標一樣。 我可以以編程方式觸發hover
,使用:
private static PseudoClass HOVER_PSEUDO_CLASS = PseudoClass.getPseudoClass("hover");
anchorePane.pseudoClassStateChanged(HOVER_PSEUDO_CLASS, true);
,但是這隻能如果鼠標右鍵拖動AnchorPane
節點上。如果鼠標拖過label
或image
......它不會懸停。 你能幫我嗎?
謝謝。它像一個魅力。 – Robert