⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 importexportxmlpanel.java

📁 eq跨平台查询工具源码 eq跨平台查询工具源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    public String[] getSelectedTables() {        return secondPanel.getSelectedTables();    }        /** <p>Retrieves the table name for this process in     *  the case of a single table import/export.     *     *  @return the table name     */    public String getTableName() {        return secondPanel.getSelectedTables()[0];    }        /** <p>Retrieves the column names for this process.     *     *  @return the column names     */    public Vector<ColumnData> getSelectedColumns() {        return secondPanel.getSelectedColumns();    }        /**      * Returns a <code>Vector</code> of <code>DataTransferObject</code>      * objects containing all relevant data for the process.     *     * @return a <code>Vector</code> of <code>DataTransferObject</code> objects     */    public Vector getDataFileVector() {        return thirdPanel.getDataFileVector();    }        public String getTableIdentifier() {        return fourthPanel_im.getTableTagString();    }        public String getRowIdentifier() {        return fourthPanel_im.getRowTagString();    }        // returns single or multiple table export    public int getTableTransferType() {        return firstPanel.getTableTransferType();    }        public String getPrimaryImportNodes() {        return fourthPanel_im.getTagInfoString();    }    public String getXMLFormatString() {        if (fourthPanel_ex.getSelection() == ImportExportProcess.SCHEMA_ELEMENT) {            return "Schema and table elements";        }        else {            return "Table element only";        }    }        public int getXMLFormat() {        return fourthPanel_ex.getSelection();    }        /** <p>Returns the type of multiple table     *  transfer - single or multiple file.     *     *  @return the type of multiple table transfer     */    public int getMutlipleTableTransferType() {        return firstPanel.getMutlipleTableTransferType();    }        /** <p>Indicates whether the process (import only)     *  should be run as a batch process.     *     *  @return whether to run as a batch process     */    public boolean runAsBatchProcess() {        return fifthPanel.runAsBatchProcess();    }        /**     * Returns the selected database connection properties object.     *     * @return the connection properties object     */    public DatabaseConnection getDatabaseConnection() {        return firstPanel.getDatabaseConnection();    }    private boolean doNext() {        JPanel nextPanel = null;        int currentPanel = model.getSelectedIndex();        switch (currentPanel) {                        case 0:                                DatabaseConnection dc = getDatabaseConnection();                if (dc != null) {                    metaData.setDatabaseConnection(dc);                }                if (secondPanel == null) {                    secondPanel = new ImportExportPanel_2(this);                }                nextPanel = secondPanel;                secondPanel.setListData(getTableTransferType());                break;                            case 1:                                if (!secondPanel.hasSelections()) {                    if (getTableTransferType() == ImportExportProcess.MULTIPLE_TABLE) {                        GUIUtilities.displayErrorMessage(                        "You must select at least one table");                    }                    else if (getTableTransferType() == ImportExportProcess.SINGLE_TABLE) {                        GUIUtilities.displayErrorMessage(                        "You must select at least one column");                    }                                        return false;                }                                if (thirdPanel == null) {                    thirdPanel = new ImportExportPanel_3(this);                } else {                    thirdPanel.buildTable();                }                nextPanel = thirdPanel;                break;                            case 2:                                if (!thirdPanel.transferObjectsComplete()) {                    return false;                }                if (transferType == EXPORT) {                                        if (fourthPanel_ex == null) {                        fourthPanel_ex = new ExportXMLPanel_4(this);                    }                    nextPanel = fourthPanel_ex;                    fourthPanel_ex.setSelectedRadios();                                    } else if (transferType == IMPORT) {                                        if (fourthPanel_im == null) {                        fourthPanel_im = new ImportXMLPanel_4(this);                    }                    nextPanel = fourthPanel_im;                }                                break;                            case 3:                                if (transferType == IMPORT &&                    !fourthPanel_im.entriesComplete()) {                    GUIUtilities.displayErrorMessage(                            "Please ensure all required fields been entered correctly.");                    return false;                }                                if (fifthPanel == null) {                    fifthPanel = new ImportExportXMLPanel_5(this);                }                nextPanel = fifthPanel;                break;                            case 4:                                if (sixthPanel == null) {                    sixthPanel = new ImportExportXMLPanel_6(this);                }                nextPanel = sixthPanel;                sixthPanel.setValues();                break;                            case 5:                                if (progressPanel == null) {                    progressPanel = new ImportExportProgressPanel(this);                }                model.addPanel(progressPanel);                processing = true;                if (transferType == EXPORT) {                    doExport();                }                else if (transferType == IMPORT) {                    doImport();                }                setButtonsEnabled(false);                return true;        }        model.addPanel(nextPanel);        return true;    }        /**     * Defines the action for the BACK button.     */    private boolean doPrevious() {        // make sure the cancel button says cancel        setCancelButtonText("Cancel");        return true;    }    /**      * Stops the current process.      */    public void stopTransfer() {        setButtonsEnabled(true);        if (processing) {            worker.cancelTransfer();            setBackButtonEnabled(true);            processCancelled = true;        }    }    /**      * Defines the action for the CANCEL button.     */    public void cancel() {        setButtonsEnabled(true);        if (processing) {            worker.cancelTransfer();            setBackButtonEnabled(true);            processCancelled = true;        }        else {            worker = null;            parent.finished();        }            }        public Dimension getChildDimension() {        return childDim;    }        public MetaDataValues getMetaDataUtility() {        return metaData;    }            private class TransferXMLWizardModel extends DefaultWizardProcessModel {                public TransferXMLWizardModel() {            int type = getTransferType();            String firstTitle = "Database Connection and Export Type";            String lastTitle = "Exporting Data...";            if (type == ImportExportProcess.IMPORT) {                firstTitle = "Database Connection and Import Type";                lastTitle = "Importing Data...";            }            String[] titles = {firstTitle,                               "Table Selection",                               "Data File Selection",                               "XML Element Style",                               "Options",                               "Summary",                               lastTitle};            setTitles(titles);            String[] steps = {"Select database connection and transfer type",                              "Select the tables/columns",                              type == ImportExportProcess.IMPORT ?                                  "Select the XML file(s) to import from" :                                  "Select the XML file(s) to export to",                              "Select the element style",                              "Set any further transfer options",                              "Summary",                              type == ImportExportProcess.IMPORT ?                                  "Import the data" :                                  "Export the data"};            setSteps(steps);        }        public boolean previous() {            if (doPrevious()) {                return super.previous();            }            return false;        }        public boolean next() {            if (doNext()) {                return super.next();            }            return false;        }    }   }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -