class AbstractScaleLayout extends AbstractLayout implements Layout {

    private double scale;
    private Graph graph;

    public AbstractScaleLayout(LayoutBuilder layoutBuilder, double scale) {
        super(layoutBuilder);
        this.scale = scale;
    }

    @Override
    public void initAlgo() {
        setConverged(false);
    }

    @Override
    public void goAlgo() {
        graph = graphModel.getGraphVisible();
        graph.readLock();
        try {
            double xMean = 0, yMean = 0;
            for (Node n : graph.getNodes()) {
                xMean += n.x();
                yMean += n.y();
            }
            xMean /= graph.getNodeCount();
            yMean /= graph.getNodeCount();

            for (Node n : graph.getNodes()) {
                if (!n.isFixed()) {
                    double dx = (n.x() - xMean) * getScale();
                    double dy = (n.y() - yMean) * getScale();

                    n.setX((float) (xMean + dx));
                    n.setY((float) (yMean + dy));
                }
            }
            setConverged(true);
        } finally {
            graph.readUnlockAll();
        }
    }

    @Override
    public void endAlgo() {
    }

    @Override
    public LayoutProperty[] getProperties() {<FILL_FUNCTION_BODY>}

    @Override
    public void resetPropertiesValues() {
    }

    /**
     * @return the scale
     */
    public Double getScale() {
        return scale;
    }

    /**
     * @param scale the scale to set
     */
    public void setScale(Double scale) {
        this.scale = scale;
    }
}

        List<LayoutProperty> properties = new ArrayList<>();
        try {
            properties.add(LayoutProperty.createProperty(
                this, Double.class,
                NbBundle.getMessage(getClass(), "ScaleLayout.scaleFactor.name"),
                null,
                "ScaleLayout.scaleFactor.name",
                NbBundle.getMessage(getClass(), "ScaleLayout.scaleFactor.desc"),
                "getScale", "setScale"));
        } catch (Exception e) {
            Exceptions.printStackTrace(e);
        }
        return properties.toArray(new LayoutProperty[0]);
    
<methods>public void <init>(org.gephi.layout.spi.LayoutBuilder) ,public boolean canAlgo() ,public static void ensureSafeLayoutNodePositions(GraphModel) ,public org.gephi.layout.spi.LayoutBuilder getBuilder() ,public boolean isConverged() ,public void setConverged(boolean) ,public void setGraphModel(GraphModel) <variables>private boolean converged,protected GraphModel graphModel,private final non-sealed org.gephi.layout.spi.LayoutBuilder layoutBuilder