class DiameterUI implements StatisticsUI {

    private GraphDistancePanel panel;
    private GraphDistance graphDistance;

    @Override
    public JPanel getSettingsPanel() {
        panel = new GraphDistancePanel();
        return panel;
    }

    @Override
    public void setup(Statistics statistics) {
        this.graphDistance = (GraphDistance) statistics;
        if (panel != null) {
            panel.setDirected(graphDistance.isDirected());
            panel.doNormalize(graphDistance.isNormalized());
        }
    }

    @Override
    public void unsetup() {<FILL_FUNCTION_BODY>}

    @Override
    public Class<? extends Statistics> getStatisticsClass() {
        return GraphDistance.class;
    }

    @Override
    public String getValue() {
        DecimalFormat df = new DecimalFormat("###.###");
        return "" + df.format(graphDistance.getDiameter());
    }

    @Override
    public String getDisplayName() {
        return NbBundle.getMessage(getClass(), "DiameterUI.name");
    }

    @Override
    public String getCategory() {
        return StatisticsUI.CATEGORY_NETWORK_OVERVIEW;
    }

    @Override
    public int getPosition() {
        return 100;
    }

    @Override
    public String getShortDescription() {
        return NbBundle.getMessage(getClass(), "DiameterUI.shortDescription");
    }
}

        if (panel != null) {
            graphDistance.setDirected(panel.isDirected());
            graphDistance.setNormalized(panel.normalize());
        }
        panel = null;
        graphDistance = null;
    
<no_super_class>