Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@
// Open new Stage
final Stage new_stage = new Stage();

// Configure for docking, i.e. with DockPane
DockStage.configureStage(new_stage, new Geometry(null), model.isStandalone());

// Use location and size from model for the window
double x = model.propX().getValue();
double y = model.propY().getValue();
Expand All @@ -78,8 +75,6 @@
y = window.getY();
}
}
new_stage.setX(x);
new_stage.setY(y);

// Size needs to account for the border and toolbar.
// Using fixed numbers, exact size of border and toolbar unknown
Expand All @@ -89,19 +84,22 @@
// Don't need to include space for toolbar in standalone
if (model.isStandalone())
{
width_margin = 5;
height_margin = 40;
width_margin = 2;
height_margin = 4;
}
new_stage.setWidth(model.propWidth().getValue() + width_margin);
new_stage.setHeight(model.propHeight().getValue() + height_margin);

// Configure for docking, i.e. with DockPane
String geometry_string = (model.propWidth().getValue() + width_margin)

Check warning on line 92 in app/display/runtime/src/main/java/org/csstudio/display/builder/runtime/app/DockItemRepresentation.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Rename this local variable to match the regular expression '^[a-z][a-zA-Z0-9]*$'.

See more on https://sonarcloud.io/project/issues?id=ControlSystemStudio_phoebus&issues=AaHpUNgfQL9lPbD_7ypk&open=AaHpUNgfQL9lPbD_7ypk&pullRequest=4027
+ "x"+(model.propHeight().getValue() + height_margin)
+ "+" +((int) x) + "+" +((int) y);
DockStage.configureStage(new_stage, new Geometry(geometry_string), model.isStandalone());
new_stage.show();

// New DockPane is now the 'active' one,
// model will be opened in it.
return representModelInNewDockItem(model);
}

@Override
public ToolkitRepresentation<Parent, Node> openStandaloneWindow(final DisplayModel model,
final Consumer<DisplayModel> close_handler)
Expand Down
Loading