Package jsky.science

Examples of jsky.science.CoordinatesOffset


            return null;
        }
    }

    public void setCoordinatesOffset(CoordinatesOffset offset) {
        CoordinatesOffset old = getCoordinatesOffset();
        fOldOffset = offset;

        String raString = "";
        String decString = "";
        if (offset != null) {
View Full Code Here


        firePropertyChange(COORDINATES_OFFSET_PROPERTY, old, offset);
    }

    public void setCoordinatesOffset(String ra, String dec) {
        try {
            CoordinatesOffset hold = fOldOffset;
            CoordinatesOffset newPosition = stringToOffset(ra, dec);

            fOldOffset = newPosition;

            if (!fRaField.getText().equals(ra)) {
                fRaField.setText(ra);
View Full Code Here

    protected CoordinatesOffset stringToOffset(String raString, String decString)
            throws NumberFormatException, IllegalArgumentException {
        double ra = new Double(raString).doubleValue();
        double dec = new Double(decString).doubleValue();
        return new CoordinatesOffset(ra, dec, Coordinates.ARCSEC);
    }
View Full Code Here

    public void actionPerformed(ActionEvent e) {
        if (e.getActionCommand() == RAOFFSET_PROPERTY
                || e.getActionCommand() == DECOFFSET_PROPERTY) {
            try {
                CoordinatesOffset newOffset = textFieldToOffset();
                firePropertyChange(COORDINATES_OFFSET_PROPERTY, fOldOffset, newOffset);
                fOldOffset = newOffset;
            } catch (NumberFormatException ex) {
                showErrorDialog();
                if (fOldOffset != null) {
View Full Code Here

                                      "Invalid CoordinatesOffset",
                                      JOptionPane.ERROR_MESSAGE);
    }

    public static void main(String[] args) {
        CoordinatesOffset offset = new CoordinatesOffset(5., 5.,
                                                         Coordinates.ARCSEC);
        CoordinatesOffsetPanel panel = new CoordinatesOffsetPanel();
        panel.setCoordinatesOffset(offset);
        //panel.setOrientation(VERTICAL);
        JOptionPane.showConfirmDialog(null, panel);
View Full Code Here

TOP

Related Classes of jsky.science.CoordinatesOffset

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.