当前位置: 首页>>代码示例>>Java>>正文


Java SceneAntialiasing类代码示例

本文整理汇总了Java中javafx.scene.SceneAntialiasing的典型用法代码示例。如果您正苦于以下问题:Java SceneAntialiasing类的具体用法?Java SceneAntialiasing怎么用?Java SceneAntialiasing使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


SceneAntialiasing类属于javafx.scene包,在下文中一共展示了SceneAntialiasing类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: mainMenu

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
/**
 * Displays the main menu
 *
 * @throws Exception
 */
public void mainMenu() throws Exception
{
    // Load in the .fxml file:
    System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Hello World!");

    FXMLLoader loader = new FXMLLoader(getClass().getResource("/View/MainMenu.fxml"));
    loader.setController(UIManager.mc);
    Parent root = loader.load();

    // Set the scene:
    mainStage.setScene(new Scene(root, 1000, 750, true, SceneAntialiasing.BALANCED));
    mainStage.setTitle("PearPlanner");
    mainStage.getIcons().add(new Image("file:icon.png"));
    mainStage.showAndWait();
}
 
开发者ID:Alienturnedhuman,项目名称:PearPlanner,代码行数:21,代码来源:UIManager.java

示例2: create

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
private void create() {
  myEditorController = new EditorController();
  HierarchyTreeViewController componentTree = new HierarchyTreeViewController(myEditorController);
  ContentPanelController canvas = new ContentPanelController(myEditorController);
  InspectorPanelController propertyTable = new InspectorPanelController(myEditorController);
  LibraryPanelController palette = new LibraryPanelController(myEditorController);

  loadFile();
  startChangeListener();

  SplitPane leftPane = new SplitPane();
  leftPane.setOrientation(Orientation.VERTICAL);
  leftPane.getItems().addAll(palette.getPanelRoot(), componentTree.getPanelRoot());
  leftPane.setDividerPositions(0.5, 0.5);

  SplitPane.setResizableWithParent(leftPane, Boolean.FALSE);
  SplitPane.setResizableWithParent(propertyTable.getPanelRoot(), Boolean.FALSE);

  SplitPane mainPane = new SplitPane();

  mainPane.getItems().addAll(leftPane, canvas.getPanelRoot(), propertyTable.getPanelRoot());
  mainPane.setDividerPositions(0.11036789297658862, 0.8963210702341137);

  myPanel.setScene(new Scene(mainPane, -1, -1, true, SceneAntialiasing.BALANCED));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:SceneBuilderImpl.java

示例3: start

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
@Override
public void start(Stage stage) {
	Group group = buildScene();

    Scene scene = new Scene(
      new StackPane(group),
      VIEWPORT_SIZE, VIEWPORT_SIZE,
      true,
      SceneAntialiasing.BALANCED
    );

    scene.setFill(Color.rgb(10, 10, 40));

    scene.setCamera(new PerspectiveCamera());

    stage.setScene(scene);
    stage.show();

    stage.setFullScreen(true);

    rotateAroundYAxis(group).play();
}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:23,代码来源:MarsViewer.java

示例4: VirtualUniverseView

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
public VirtualUniverseView(double width, double height, Scene _container) {
		super(new Group(), width, height, true, SceneAntialiasing.BALANCED);
		rootWorld = (Group) this.getRoot();

		camera     = new QuaternionCamera();

		controller = new DefaultQuaternionController();
		if(_container != null)
			controller.setScene(_container);
		controller.setSubScene(this);
		controller.setCamera(camera);

		setFill(Color.BLACK);
		setCamera(camera);

//		rootWorld.getChildren().add(camera);
		rootWorld.getChildren().add(camera.getGroup());
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:19,代码来源:VirtualUniverseView.java

示例5: VirtualUniverseScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
public VirtualUniverseScene(double width, double height) {
		super(new Group(), width, height, true, SceneAntialiasing.BALANCED);
		rootWorld = (Group) this.getRoot();

		camera     = new QuaternionCamera();

		controller = new DefaultQuaternionController();
		controller.setScene(this);
		controller.setCamera(camera);

		setFill(Color.BLACK);
		setCamera(camera);

//		rootWorld.getChildren().add(camera);
		rootWorld.getChildren().add(camera.getGroup());
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:17,代码来源:VirtualUniverseScene.java

示例6: TestApplication3DPattern

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
public TestApplication3DPattern() {
		root = new StackPane();
		scene = new Scene(root, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);

		worldRoot = new Group();
		subscene = new SubScene(worldRoot, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);

		camera = new EulerCamera();
//		camera.setTranslateZ(-1000);
		
		worldRoot.getChildren().add(camera);

		controller = new DefaultEulerController();
		controller.setScene(scene);
		controller.setSubScene(subscene);
		controller.setCamera(camera);

		scene.setFill(Color.BLACK);
		subscene.setFill(Color.BLACK);
		configure();

//		scene.setCamera(camera);
		subscene.setCamera(camera);

		root.getChildren().addAll(subscene);
	}
 
开发者ID:sanke69,项目名称:fr.xs.jtk,代码行数:27,代码来源:TestApplication3DPattern.java

示例7: initScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
public Scene initScene(City city, PerspectiveCamera camera, String cityName) {
      Group root = new Group();
      buildCamera(root, camera);
      root.getTransforms().addAll(rxBox, ryBox, rzBox);
      subScene = new SubScene(root, SCENE_WIDTH, SCENE_HEIGHT, true, SceneAntialiasing.BALANCED);
      subScene.setCamera(camera);
      root.getChildren().add(city);

      // 2D
      BorderPane pane = new BorderPane();
      Pane toolBar = null;
try {
	toolBar = new CityToolBarService().load(cityName);
} catch (IOException e) {
	e.printStackTrace();
}
      pane.setBottom(subScene);
      pane.setTop(toolBar);
      
      Scene scene = new Scene(pane, SCENE_WIDTH, SCENE_HEIGHT);
      subScene.heightProperty().bind(scene.heightProperty());
      subScene.widthProperty().bind(scene.widthProperty());      
      return scene;
  }
 
开发者ID:canoo,项目名称:code-of-gotham,代码行数:25,代码来源:StageUtil.java

示例8: SimpleGraphView3D

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
public SimpleGraphView3D(boolean perspective) {
    super(new Group(), 800, 800, true, SceneAntialiasing.BALANCED);
    // root is dummy
    node3D = new Node3D();
    node3D.setTranslateX(400);
    node3D.setTranslateY(400);
    setRoot(node3D);
    setFill(Color.gray(0.95));
    if (perspective) {
        setCamera(new PerspectiveCamera());
    }

    MouseHandler3D handler = new MouseHandler3D(node3D);
    setOnMousePressed(handler);
    setOnMouseDragged(handler);
    setOnMouseReleased(handler);

    setOnScroll(new ZoomHandler3D(node3D));
}
 
开发者ID:kcoolsae,项目名称:Equi,代码行数:20,代码来源:SimpleGraphView3D.java

示例9: showGantt

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
/**
 * Displays a GanttishDiagram window for the given Assignment.
 *
 * @param assignment Assignment for which to generate the GanttishDiagram.
 */
public void showGantt(Assignment assignment)
{
    Stage stage = new Stage();

    // Layout:
    VBox layout = new VBox();
    layout.setSpacing(10);
    layout.setPadding(new Insets(15));
    layout.getStylesheets().add("/Content/stylesheet.css");
    // =================

    // Nav bar:
    HBox nav = new HBox();
    nav.setSpacing(15.0);
    // =================

    // Title:
    Label title = new Label("Ganttish Diagram");
    title.getStyleClass().add("title");
    HBox x = new HBox();
    HBox.setHgrow(x, Priority.ALWAYS);
    // =================

    // Buttons:
    Button save = new Button("Save");
    save.setOnAction(e -> {
        String path = this.saveFileDialog(stage);
        GanttishDiagram.createGanttishDiagram(MainController.getSPC().getPlanner(), assignment, path);
    });
    Button close = new Button("Close");
    close.setOnAction(e -> ((Stage) close.getScene().getWindow()).close());
    // =================

    nav.getChildren().addAll(title, x, save, close);

    // Content:
    BufferedImage gantt = GanttishDiagram.createGanttishDiagram(MainController.getSPC().getPlanner(), assignment);
    Image image = SwingFXUtils.toFXImage(gantt, null);
    Pane content = new Pane();
    VBox.setVgrow(content, Priority.ALWAYS);
    content.setBackground(new Background(
            new BackgroundImage(image, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT,
                    new BackgroundSize(BackgroundSize.AUTO, BackgroundSize.AUTO, false, false, true, false))));
    // =================

    layout.getChildren().addAll(nav, content);

    // Set the scene:
    stage.setScene(new Scene(layout, 1300, 800, true, SceneAntialiasing.BALANCED));
    stage.setTitle("Ganttish Diagram");
    stage.resizableProperty().setValue(true);
    stage.getIcons().add(new Image("file:icon.png"));
    stage.setFullScreen(true);
    stage.showAndWait();
    // =================
}
 
开发者ID:Alienturnedhuman,项目名称:PearPlanner,代码行数:62,代码来源:UIManager.java

示例10: showStage

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
private void showStage(Stage stage) {
	Scene scene = new Scene(root, sceneWidth, sceneHeight, true, SceneAntialiasing.BALANCED);
	scene.setFill(Color.web("3d3d3d"));

	loadCamera(scene);
	loadControls(scene);

	stage.setTitle("F(X)yz Sample: 3D Dragging");
	stage.setScene(scene);
	stage.show();
}
 
开发者ID:callakrsos,项目名称:Gargoyle,代码行数:12,代码来源:Drag3DObject.java

示例11: createSubScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
protected SubScene createSubScene() {
	Group group = new Group();
	group.getChildren().add(createPlayerModel());
	group.getTransforms().add(zRotate);
	
	camera.getTransforms().addAll(yRotate, translate, scale);
	
	subScene = new SubScene(group, preW, preH, true,
			msaa ? SceneAntialiasing.BALANCED : SceneAntialiasing.DISABLED);
       subScene.setFill(Color.ALICEBLUE);
       subScene.setCamera(camera);
       
       return subScene;
}
 
开发者ID:InfinityStudio,项目名称:minecraft-jfx-skin,代码行数:15,代码来源:SkinCanvas.java

示例12: getTopLeftScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
@Override
protected SubScene getTopLeftScene() {
    rootTLMV = buildGroupMover();
    SubScene ss = new SubScene(rootTLMV.getGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:8,代码来源:SubSceneDepthTestApp.java

示例13: getTopRightScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
@Override
protected SubScene getTopRightScene() {
    rootTRMV = buildGroupMover();
    rootTRMV.setRotateY(60);

    SubScene ss = new SubScene(rootTRMV.getGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:10,代码来源:SubSceneDepthTestApp.java

示例14: getDownLeftScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
@Override
protected SubScene getDownLeftScene() {
    rootDLMV = buildGroupMover();
    rootDLMV.setRotateY(-60);
    SubScene ss = new SubScene(rootDLMV.getGroup(), SS_WIDTH, SS_HEIGHT, true, SceneAntialiasing.DISABLED);
    ss.setCamera(new PerspectiveCamera());
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:9,代码来源:SubSceneDepthTestApp.java

示例15: getSubScene

import javafx.scene.SceneAntialiasing; //导入依赖的package包/类
private SubScene getSubScene(int num) {
    Group root = cases[num].buildAll();
    cases[num].getGroupMover().translateXProperty().set(WIDTH / 4);
    cases[num].getGroupMover().translateYProperty().set(HEIGHT / 4);
    SubScene ss = new SubScene(root, HEIGHT / 2, WIDTH / 2, true, SceneAntialiasing.DISABLED);
    cases[num].addCamera(ss);
    ss.setFill(Color.GREEN);
    if (!isTest()) {
        cases[num].initRotation(ss);
    }
    return ss;
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:13,代码来源:SubSceneShape3DAbstractApp.java


注:本文中的javafx.scene.SceneAntialiasing类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。