Package jsky.catalog

Examples of jsky.catalog.TableQueryResult


        _navigator.addChangeListener(new ChangeListener() {
            public void stateChanged(ChangeEvent e) {
                JComponent c = _navigator.getResultComponent();
                if (c instanceof TableDisplayTool) {
                    _tableCellsEditableMenuItem.setEnabled(true);
                    TableQueryResult queryResult = ((TableDisplayTool) c)
                            .getTable();
                    if (queryResult instanceof MemoryCatalog) {
                        MemoryCatalog cat = (MemoryCatalog) queryResult;
                        _tableCellsEditableMenuItem.setSelected(!cat
                                .isReadOnly());
View Full Code Here


     *
     * @param rowIndex the row index
     * @param v the row values
     */
    public void updateRow(int rowIndex, Vector v) {
        TableQueryResult table = _tableDisplay.getTableQueryResult();
        for (int colIndex = 0; colIndex < v.size(); colIndex++) {
            table.setValueAt(v.get(colIndex), rowIndex, colIndex);
        }
        _tableDisplay.update();
    }
View Full Code Here

    /**
     * Set the editable state of the cells in the displayed table.
     * @param b true if editable
     */
    public void setTableCellsEditable(boolean b) {
        TableQueryResult queryResult = _tableDisplay.getTableQueryResult();
        if (queryResult instanceof MemoryCatalog) {
            ((MemoryCatalog) queryResult).setReadOnly(!b);
        }
    }
View Full Code Here

     *
     * @param stats    describes the selected object
     * @param isUpdate set to true if this is just an update of the previously selected position
     */
    public void addToTable(PickObjectStatistics stats, boolean isUpdate) {
        TableQueryResult table = null;
        TableDisplayTool tableDisplayTool = null;

        // see if a table is already being displayed, and if so, use it

        JComponent resultComponent = _navigator.getResultComponent();
View Full Code Here

     */
    public StarTable getStarTable() {
        JComponent c = getResultComponent();
        if (c instanceof TableDisplayTool) {
            TableDisplayTool t = (TableDisplayTool) c;
            TableQueryResult tqr = t.getTable();
            if (tqr != null) {
                return tqr.getStarTable();
            }
        }
        return null;
    }
View Full Code Here

     */
    public void displayFITSTable(int hduIndex) {
        FITSImage fitsImage = getFitsImage();
        if (fitsImage != null && hduIndex > 0 && hduIndex < fitsImage.getNumHDUs()) {
            try {
                TableQueryResult table = NavigatorFITSTable.getTable(getFilename(), fitsImage.getFits(), hduIndex);
                showNavigatorFrame(null);
                openCatalogWindow(table.getCatalog());

                // update the FITS header display, if needed
                FITSKeywordsFrame fitsKeywordsFrame = getFitsKeywordsFrame();
                if (fitsKeywordsFrame != null) {
                    fitsKeywordsFrame.getFITSKeywords().updateDisplay(hduIndex);
View Full Code Here

            DialogUtil.error(this, "This operation is only supported on FITS files.");
            return;
        }

        try {
            TableQueryResult newTable = NavigatorFITSTable.saveWithImage(getFilename(), fitsImage.getFits(), table);
            if (newTable == null) {
                return;
            }

            setSaveNeeded(true);
            checkExtensions(true);

            // unplot the original table, since the FITS table will be plotted from now on
            TablePlotter plotter = _navigator.getPlotter();
            if (plotter != null) {
                plotter.unplot(table);
                //plotter.plot(newTable);
                _navigator.setQueryResult(newTable.getCatalog());
            }
        } catch (Exception e) {
            DialogUtil.error(this, e);
        }
    }
View Full Code Here

     */
    private Map _makeTransmitSelectedRowsMessage(List<Integer> rowList) {
        Navigator navigator = _imageFrame.getNavigator();
        QueryResult queryResult = navigator.getQueryResult();
        if (queryResult instanceof TableQueryResult) {
            TableQueryResult table = (TableQueryResult) queryResult;
            String tableId = table.getId();
            String sampId = TableSendActionManager.getSampId(tableId);
            if (sampId != null) {
                // Must be a table we sent, so use the samp table id we sent it with
                tableId = sampId;
            }
View Full Code Here

     * @param fits object to use for FITS I/O
     * @param navigator window object managing the table display and plotting
     * @param name the name of the table to plot (FITS keyword EXTNAME)
     */
    private static void _plotTable(String filename, Fits fits, Navigator navigator, String name) throws FitsException, IOException {
        TableQueryResult table = NavigatorFITSTable._findTable(filename, fits, name);
        if (table != null) {
            navigator.setQueryResult(table.getCatalog());
        }
    }
View Full Code Here

        if (!(resultComponent instanceof TableDisplayTool)) {
            DialogUtil.error("This operation is only supported for tables");
        } else if (_imageDisplay == null) {
            DialogUtil.error("No current FITS image.");
        } else {
            TableQueryResult table = ((TableDisplayTool) resultComponent).getTable();
            _imageDisplay.saveFITSTable(table);
        }
    }
View Full Code Here

TOP

Related Classes of jsky.catalog.TableQueryResult

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.