Examples of HMS


Examples of jsky.coords.HMS

        if (s.equals(""))
            return null;

        if (c == Double.class || c == Float.class) {
            if (fieldDesc.isRA()) {
                HMS hms = new HMS(s);
                if (c == Double.class)
                    return hms.getVal();
                else
                    return new Float(hms.getVal());
            } else if (fieldDesc.isDec()) {
                DMS dms = new DMS(s);
                if (c == Double.class)
                    return dms.getVal();
                else
View Full Code Here

Examples of jsky.coords.HMS

        double lonArr[] = new double[lonLevels.size()];
        String lonLabels[] = new String[lonLevels.size()];
        for (int i = 0; i < lonArr.length; i++) {
            lonArr[i] = lonLevels.get(i);
            double v = (lonArr[i] >= 0 ? lonArr[i] : lonArr[i] + 360);
            lonLabels[i] = (new HMS(v / 15.0)).toString();
        }
        double latArr[] = new double[latLevels.size()];
        String latLabels[] = new String[latLevels.size()];
        for (int i = 0; i < latArr.length; i++) {
            latArr[i] = latLevels.get(i);
View Full Code Here

Examples of jsky.coords.HMS

                val = (Double) value;
            }
        }
        if (!Double.isNaN(val)) {
            if (_isRA) {
                HMS hms = new HMS(val/15.);
                ((JLabel) component).setText(hms.toString(_showSeconds));
            } else {
                DMS dms = new DMS(val);
                ((JLabel) component).setText(dms.toString(_showSeconds));
            }
        }
View Full Code Here

Examples of jsky.coords.HMS

        if (DATE_VIEW.equals(_unitType)) {
            DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT);
            startStr = format.format(getDateForTime(_displayStart));
        } else if (TIME_VIEW.equals(_unitType)) {
            HMS hms = new HMS(_displayStart.getValue(Time.HOUR));
            startStr = hms.toString();
        } else {
            DecimalFormat form = new DecimalFormat();
            form.setMaximumFractionDigits(2);
            startStr = form.format(_displayStart.getValue(_unitType));
        }
View Full Code Here

Examples of jsky.coords.HMS

        if (DATE_VIEW.equals(_unitType)) {
            DateFormat format = DateFormat.getDateInstance(DateFormat.SHORT);
            endStr = format.format(getDateForTime(_displayEnd));
        } else if (TIME_VIEW.equals(_unitType)) {
            HMS hms = new HMS(_displayEnd.getValue(Time.HOUR));
            endStr = hms.toString();
        } else {
            DecimalFormat form = new DecimalFormat();
            form.setMaximumFractionDigits(2);
            endStr = form.format(_displayEnd.getValue(_unitType));
        }
View Full Code Here

Examples of jsky.coords.HMS

                val = (Double) value;
            }
        }
        if (!Double.isNaN(val)) {
            if (hoursFlag) {
                ((JTextField) component).setText(new HMS(val / 15.).toString());
            } else {
                ((JTextField) component).setText(new DMS(val).toString());
            }
        }
View Full Code Here

Examples of jsky.coords.HMS

    public Object getCellEditorValue() {
        Object o = super.getCellEditorValue();
        if (o instanceof String) {
            if (hoursFlag) {
                try {
                    HMS hms = new HMS((String) o);
                    return hms.getVal() * 15.;
                } catch (Exception e) {
                    DialogUtil.error("Invalid value: '" + o + "', expected decimal degrees or h:m:s");
                }
            } else {
                try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.