标签:
public class EffectTest extends Application { ObservableList cursors = FXCollections.observableArrayList( Cursor.DEFAULT, Cursor.CROSSHAIR, Cursor.WAIT, Cursor.TEXT, Cursor.HAND, Cursor.MOVE, Cursor.N_RESIZE, Cursor.NE_RESIZE, Cursor.E_RESIZE, Cursor.SE_RESIZE, Cursor.S_RESIZE, Cursor.SW_RESIZE, Cursor.W_RESIZE, Cursor.NW_RESIZE, Cursor.NONE ); @Override public void start(Stage stage) { ChoiceBox choiceBoxRef = ChoiceBoxBuilder.create() .items(cursors) .build(); VBox box = new VBox(); box.getChildren().add(choiceBoxRef); final Scene scene = new Scene(box,300, 250); scene.setFill(null); stage.setScene(scene); stage.show(); scene.cursorProperty().bind(choiceBoxRef.getSelectionModel() .selectedItemProperty()); } public static void main(String[] args) { launch(args); }
标签:
原文地址:http://www.cnblogs.com/rojas/p/4720565.html