Skip to content

Commit

Permalink
Expose TextPosition record
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Dupuy <[email protected]>
  • Loading branch information
flo-dup committed Dec 16, 2024
1 parent e26cde9 commit 623d5b7
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ public abstract class AbstractLayout implements Layout {

private Map<String, Point> initialNodePositions = Collections.emptyMap();
private Set<String> nodesWithFixedPosition = Collections.emptySet();
private Map<String, TextPosition> textNodesWithFixedPosition = new HashMap<>();

record TextPosition(Point topLeftPosition, Point edgeConnection) {
}
private final Map<String, TextPosition> textNodesWithFixedPosition = new HashMap<>();

@Override
public void run(Graph graph, LayoutParameters layoutParameters) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
package com.powsybl.nad.layout;

import com.powsybl.nad.layout.AbstractLayout.TextPosition;
import com.powsybl.nad.model.Point;

import java.util.Map;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
*/
package com.powsybl.nad.layout;

import com.powsybl.nad.model.Point;
import com.powsybl.nad.svg.metadata.DiagramMetadata;

import java.io.InputStream;
import java.io.Reader;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

import com.powsybl.nad.layout.AbstractLayout.TextPosition;
import com.powsybl.nad.model.Point;
import com.powsybl.nad.svg.metadata.DiagramMetadata;

/**
* @author Massimo Ferraro {@literal <massimo.ferraro at soft.it>}
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* Copyright (c) 2024, RTE (http://www.rte-france.com)
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
* SPDX-License-Identifier: MPL-2.0
*/
package com.powsybl.nad.layout;

import com.powsybl.nad.model.Point;

/**
* @author Florian Dupuy {@literal <florian.dupuy at rte-france.com>}
*/
public record TextPosition(Point topLeftPosition, Point edgeConnection) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import com.powsybl.iidm.network.Network;
import com.powsybl.nad.build.iidm.NetworkGraphBuilder;
import com.powsybl.nad.build.iidm.VoltageLevelFilter;
import com.powsybl.nad.layout.AbstractLayout.TextPosition;
import com.powsybl.nad.model.Graph;
import com.powsybl.nad.model.Point;

Expand Down

0 comments on commit 623d5b7

Please sign in to comment.