Examples of QuoteServer


Examples of org.aiotrade.lib.securities.dataserver.QuoteServer

                : quoteContract;
        if (quoteContractTemplate == null) {
            /** no currentPreferredQuoteContract */
            quoteContractTemplate = quoteContract;
        }
        QuoteServer quoteServerTemplate = quoteContractTemplate.lookupServiceTemplate(QuoteServer.class, "DataServers").get();

        dataSourceComboBox.setSelectedItem(quoteServerTemplate);

        timeUnitField.setModel(new DefaultComboBoxModel(TUnit.values()));
        timeUnitField.setSelectedItem(quoteContractTemplate.freq().unit());
View Full Code Here

Examples of org.aiotrade.lib.securities.dataserver.QuoteServer

        return retValue;
    }

    private void applyChanges() {
        QuoteServer selectedServer = (QuoteServer) dataSourceComboBox.getSelectedItem();
        quoteContract.active_$eq(true);
        quoteContract.serviceClassName_$eq(selectedServer.getClass().getName());
        quoteContract.srcSymbol_$eq(stockSymbolsField.getText().trim().toUpperCase());
        Calendar cal = Calendar.getInstance();
        cal.setTime((Date) fromDateField.getValue());
        quoteContract.fromTime_$eq(cal.getTimeInMillis());
        cal.setTime((Date) toDateField.getValue());
View Full Code Here

Examples of org.aiotrade.lib.securities.dataserver.QuoteServer

         */
        if (evt.getStateChange() != ItemEvent.SELECTED) {
            return;
        }

        QuoteServer selectedServer = (QuoteServer) evt.getItem();
        Image icon = (Image) selectedServer.icon().get();
        if (icon != null) {
            iconLabel.setIcon(new ImageIcon(icon));
        }

        if (selectedServer.displayName().toUpperCase().contains("INTERNET") == false) {
            chooseButton.setEnabled(true);
            pathField.setEnabled(true);
            formatStringField.setEnabled(true);
        } else {
            chooseButton.setEnabled(false);
            pathField.setEnabled(false);
            formatStringField.setEnabled(false);
        }
        String selectedDfStr = selectedServer.defaultDatePattern();
        SimpleDateFormat sdf = new SimpleDateFormat(selectedDfStr, Locale.US);
        Calendar cal = Calendar.getInstance();
        cal.setTimeInMillis(quoteContract.fromTime());
        dateFormatSample.setText(sdf.format(cal.getTime()));
        formatStringField.setText(selectedDfStr);
View Full Code Here

Examples of org.aiotrade.lib.securities.dataserver.QuoteServer

    public void initPreviewPanel() {
        String symbol = "Preview";

        QuoteContract quoteContract = new QuoteContract();
        QuoteServer previewQuoteServer = null;
        scala.collection.Iterator<QuoteServer> quoteServers = PersistenceManager$.MODULE$.apply().lookupAllRegisteredServices(QuoteServer.class, "QuoteServices").iterator();
        while (quoteServers.hasNext()) {
            QuoteServer quoteServer = quoteServers.next();
            if (quoteServer.displayName().toUpperCase().contains("CSV ASCII FILE")) {
                previewQuoteServer = quoteServer;
                break;
            }
        }
        if (previewQuoteServer == null) {
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.