Package jsky.coords

Examples of jsky.coords.WorldCoords


        int row = _w.table.getSelectedRow();
        if (row >= 0) {
            String name = _w.nameField.getText();
            String raStr = _w.raField.getText();
            String decStr = _w.decField.getText();
            WorldCoords pos = new WorldCoords(raStr, decStr);
            String description = _w.descriptionField.getText();
            String priority = _w.priorityField.getText();
            String category = _w.categoryField.getText();
            _changeRow(row, new TargetDesc(name, pos, description, priority, category));
        }
View Full Code Here


    // Add a new row to the table
    private void _addRow(TargetDesc target) {
        DefaultTableModel model = (DefaultTableModel) _w.table.getModel();
        Vector<Object> row = new Vector<Object>(5);
        row.add(target.getName());
        WorldCoords pos = target.getCoordinates();
        row.add(pos.getRA().toString());
        row.add(pos.getDec().toString());
        row.add(target.getDescription());
        row.add(target.getPriority());
        row.add(target.getCategory());
        model.addRow(row);
        _edited = true;
View Full Code Here

        _edited = true;
    }

    // Change the given row in the table
    private void _changeRow(int row, TargetDesc target) {
        WorldCoords pos = target.getCoordinates();
        DefaultTableModel model = (DefaultTableModel) _w.table.getModel();
        model.setValueAt(target.getName(), row, NAME_COL);
        model.setValueAt(pos.getRA().toString(), row, RA_COL);
        model.setValueAt(pos.getDec().toString(), row, DEC_COL);
        model.setValueAt(target.getDescription(), row, DESCRIPTION_COL);
        model.setValueAt(target.getPriority(), row, PRIORITY_COL);
        model.setValueAt(target.getCategory(), row, CATEGORY_COL);
        _edited = true;
    }
View Full Code Here

        _targets = new TargetDesc[n];
        for (int i = 0; i < n; i++) {
            String name = (String) model.getValueAt(i, NAME_COL);
            String raStr = (String) model.getValueAt(i, RA_COL);
            String decStr = (String) model.getValueAt(i, DEC_COL);
            WorldCoords pos = new WorldCoords(raStr, decStr);
            String description = (String) model.getValueAt(i, DESCRIPTION_COL);
            String priority = (String) model.getValueAt(i, PRIORITY_COL);
            String category = (String) model.getValueAt(i, CATEGORY_COL);
            _targets[i] = new TargetDesc(name, pos, description, priority, category);
        }
View Full Code Here

        _targets = targets;
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>(targets.length);
        for (TargetDesc target : targets) {
            Vector<Object> row = new Vector<Object>(3);
            row.add(target.getName());
            WorldCoords pos = target.getCoordinates();
            row.add(pos.getRA().toString());
            row.add(pos.getDec().toString());
            row.add(target.getDescription());
            row.add(target.getPriority());
            row.add(target.getCategory());
            rows.add(row);
        }
View Full Code Here

TOP

Related Classes of jsky.coords.WorldCoords

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.