Package org.gephi.attribute.api

Examples of org.gephi.attribute.api.TimeFormat


   
    public void setup(DynamicStatistics dynamicStatistics) {
        GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
        GraphModel graphModel = graphController.getGraphModel();
        AttributeModel attributeModel = graphController.getAttributeModel();
        TimeFormat timeFormat = attributeModel.getTimeFormat();

        //Bounds
        bounds = dynamicStatistics.getBounds();
        if (bounds == null) {
            bounds = graphModel.getTimeBoundsVisible();
        }
        String boundsStr = timeFormat.print(bounds.getLow())+" - "+timeFormat.print(bounds.getHigh());
        currentIntervalLabel.setText(boundsStr);

        //TimeUnit
        if (timeFormat.equals(TimeFormat.DOUBLE)) {
            windowTimeUnitCombo.setVisible(false);
            tickTimeUnitCombo.setVisible(false);
        }

        //Set latest selected item
        if (!timeFormat.equals(TimeFormat.DOUBLE)) {
            loadDefaultTimeUnits();
        }

        //Window and tick
        double initValue = 0.;
        if(bounds.getHigh() - bounds.getLow() > 1) {
            initValue = 1.;
        }
        if (timeFormat.equals(TimeFormat.DOUBLE)) {
            windowTextField.setText(initValue + "");
            tickTextField.setText(initValue + "");
        } else {
            windowTextField.setText("" + windowTimeUnit.convert((long) initValue, TimeUnit.MILLISECONDS));
            tickTextField.setText("" + tickTimeUnit.convert((long) initValue, TimeUnit.MILLISECONDS));
View Full Code Here

TOP

Related Classes of org.gephi.attribute.api.TimeFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.