use of javafx.scene.layout.Region in project phoenicis by PhoenicisOrg.
the class WinePrefixContainerDisplayTab method populate.
private void populate() {
final VBox displayPane = new VBox();
final Text title = new TextWithStyle(tr("Display settings"), TITLE_CSS_CLASS);
displayPane.getStyleClass().add(CONFIGURATION_PANE_CSS_CLASS);
displayPane.getChildren().add(title);
final GridPane displayContentPane = new GridPane();
displayContentPane.getStyleClass().add("grid");
final ComboBox<UseGLSL> glslComboBox = new ComboBox<>();
glslComboBox.setMaxWidth(Double.MAX_VALUE);
glslComboBox.setValue(container.getUseGlslValue());
glslComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(glslComboBox, UseGLSL.class);
displayContentPane.add(new TextWithStyle(tr("GLSL support"), CAPTION_TITLE_CSS_CLASS), 0, 0);
displayContentPane.add(glslComboBox, 1, 0);
final ComboBox<DirectDrawRenderer> directDrawRendererComboBox = new ComboBox<>();
directDrawRendererComboBox.setMaxWidth(Double.MAX_VALUE);
directDrawRendererComboBox.setValue(container.getDirectDrawRenderer());
directDrawRendererComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(directDrawRendererComboBox, DirectDrawRenderer.class);
displayContentPane.add(new TextWithStyle(tr("Direct Draw Renderer"), CAPTION_TITLE_CSS_CLASS), 0, 1);
displayContentPane.add(directDrawRendererComboBox, 1, 1);
final ComboBox<VideoMemorySize> videoMemorySizeComboBox = new ComboBox<>();
videoMemorySizeComboBox.setMaxWidth(Double.MAX_VALUE);
videoMemorySizeComboBox.setValue(container.getVideoMemorySize());
videoMemorySizeComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItemsVideoMemorySize(videoMemorySizeComboBox);
displayContentPane.add(new TextWithStyle(tr("Video memory size"), CAPTION_TITLE_CSS_CLASS), 0, 2);
displayContentPane.add(videoMemorySizeComboBox, 1, 2);
final ComboBox<OffscreenRenderingMode> offscreenRenderingModeComboBox = new ComboBox<>();
offscreenRenderingModeComboBox.setMaxWidth(Double.MAX_VALUE);
offscreenRenderingModeComboBox.setValue(container.getOffscreenRenderingMode());
offscreenRenderingModeComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(offscreenRenderingModeComboBox, OffscreenRenderingMode.class);
displayContentPane.add(new TextWithStyle(tr("Offscreen rendering mode"), CAPTION_TITLE_CSS_CLASS), 0, 3);
displayContentPane.add(offscreenRenderingModeComboBox, 1, 3);
final ComboBox<RenderTargetModeLock> renderTargetModeLockComboBox = new ComboBox<>();
renderTargetModeLockComboBox.setMaxWidth(Double.MAX_VALUE);
renderTargetModeLockComboBox.setValue(container.getRenderTargetModeLock());
renderTargetModeLockComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(renderTargetModeLockComboBox, RenderTargetModeLock.class);
displayContentPane.add(new TextWithStyle(tr("Render target lock mode"), CAPTION_TITLE_CSS_CLASS), 0, 4);
displayContentPane.add(renderTargetModeLockComboBox, 1, 4);
final ComboBox<Multisampling> multisamplingComboBox = new ComboBox<>();
multisamplingComboBox.setMaxWidth(Double.MAX_VALUE);
multisamplingComboBox.setValue(container.getMultisampling());
multisamplingComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(multisamplingComboBox, Multisampling.class);
displayContentPane.add(new TextWithStyle(tr("Multisampling"), CAPTION_TITLE_CSS_CLASS), 0, 5);
displayContentPane.add(multisamplingComboBox, 1, 5);
final ComboBox<StrictDrawOrdering> strictDrawOrderingComboBox = new ComboBox<>();
strictDrawOrderingComboBox.setMaxWidth(Double.MAX_VALUE);
strictDrawOrderingComboBox.setValue(container.getStrictDrawOrdering());
strictDrawOrderingComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(strictDrawOrderingComboBox, StrictDrawOrdering.class);
displayContentPane.add(new TextWithStyle(tr("Strict Draw Ordering"), CAPTION_TITLE_CSS_CLASS), 0, 6);
displayContentPane.add(strictDrawOrderingComboBox, 1, 6);
final ComboBox<AlwaysOffscreen> alwaysOffscreenComboBox = new ComboBox<>();
alwaysOffscreenComboBox.setMaxWidth(Double.MAX_VALUE);
alwaysOffscreenComboBox.setValue(container.getAlwaysOffscreen());
alwaysOffscreenComboBox.valueProperty().addListener((observable, oldValue, newValue) -> this.changeSettings(newValue));
addItems(alwaysOffscreenComboBox, AlwaysOffscreen.class);
displayContentPane.add(new TextWithStyle(tr("Always Offscreen"), CAPTION_TITLE_CSS_CLASS), 0, 7);
displayContentPane.add(alwaysOffscreenComboBox, 1, 7);
Region spacer = new Region();
GridPane.setHgrow(spacer, Priority.ALWAYS);
displayContentPane.add(spacer, 2, 0);
displayPane.getChildren().addAll(displayContentPane);
this.setContent(displayPane);
lockableElements.addAll(Arrays.asList(glslComboBox, directDrawRendererComboBox, offscreenRenderingModeComboBox, renderTargetModeLockComboBox, multisamplingComboBox, strictDrawOrderingComboBox, alwaysOffscreenComboBox, videoMemorySizeComboBox));
}
use of javafx.scene.layout.Region in project TestFX by TestFX.
the class WriteRobotImplTest method setup.
@Before
public void setup() throws Exception {
stage = FxToolkit.registerStage(Stage::new);
scene = FxToolkit.setupScene(() -> new Scene(new Region()));
baseRobot = mock(BaseRobot.class);
sleepRobot = mock(SleepRobot.class);
windowFinder = mock(WindowFinder.class);
writeRobot = new WriteRobotImpl(baseRobot, sleepRobot, windowFinder);
}
use of javafx.scene.layout.Region in project TestFX by TestFX.
the class AwtRobotAdapterTest method setup.
@Before
public void setup() throws Exception {
robotAdapter = new AwtRobotAdapter();
targetStage = FxToolkit.setupStage(stage -> {
region = new Region();
region.setStyle("-fx-background-color: magenta;");
VBox box = new VBox(region);
box.setPadding(new Insets(10));
box.setSpacing(10);
VBox.setVgrow(region, Priority.ALWAYS);
sceneRoot = new StackPane(box);
Scene scene = new Scene(sceneRoot, 300, 100);
stage.setScene(scene);
stage.show();
});
PointLocator pointLocator = new PointLocatorImpl(new BoundsLocatorImpl());
regionPoint = pointLocator.point(region).atPosition(Pos.CENTER).query();
}
use of javafx.scene.layout.Region in project TestFX by TestFX.
the class GlassRobotAdapterTest method setup.
@Before
public void setup() throws Exception {
robotAdapter = new GlassRobotAdapter();
targetStage = FxToolkit.setupStage(stage -> {
region = new Region();
region.setStyle("-fx-background-color: magenta;");
VBox box = new VBox(region);
box.setPadding(new Insets(10));
box.setSpacing(10);
VBox.setVgrow(region, Priority.ALWAYS);
sceneRoot = new StackPane(box);
Scene scene = new Scene(sceneRoot, 300, 100);
stage.setScene(scene);
stage.show();
});
PointLocator pointLocator = new PointLocatorImpl(new BoundsLocatorImpl());
regionCenter = pointLocator.point(region).atPosition(Pos.CENTER).query();
}
use of javafx.scene.layout.Region in project TestFX by TestFX.
the class NodeFinderImplTest method setup.
@Before
public void setup() throws TimeoutException {
FxToolkit.registerPrimaryStage();
FxToolkit.setupScene(() -> new Scene(new Region(), 600, 400));
FxToolkit.setupFixture(this::setupStages);
windowFinder = new WindowFinderStub();
windowFinder.windows = new ArrayList<>();
windowFinder.windows.add(window);
windowFinder.windows.add(otherWindow);
windowFinder.windows.add(twinWindow);
nodeFinder = new NodeFinderImpl(windowFinder);
}
Aggregations