Package name.abuchen.portfolio.model

Examples of name.abuchen.portfolio.model.Exchange


    private Exchange createExchange(String symbol)
    {
        int e = symbol.indexOf('.');
        String exchange = e >= 0 ? symbol.substring(e) : ".default"; //$NON-NLS-1$
        String label = ExchangeLabels.getString("yahoo" + exchange); //$NON-NLS-1$
        return new Exchange(symbol, String.format("%s (%s)", label, symbol)); //$NON-NLS-1$
    }
View Full Code Here


        QuoteFeed feed = (QuoteFeed) ((IStructuredSelection) comboProvider.getSelection()).getFirstElement();
        model.setFeed(feed.getId());

        if (comboExchange != null && feed.getId().startsWith(YAHOO))
        {
            Exchange exchange = (Exchange) ((IStructuredSelection) comboExchange.getSelection()).getFirstElement();
            if (exchange != null)
            {
                model.setTickerSymbol(exchange.getId());
                tickerSymbol = exchange.getId();
            }
        }
        else if (textFeedURL != null)
        {
            model.setFeedURL(textFeedURL.getText());
View Full Code Here

            createDetailDataWidgets(feed);

            if (model.getTickerSymbol() != null && feed.getId().startsWith("YAHOO")) //$NON-NLS-1$
            {
                Exchange exchange = new Exchange(model.getTickerSymbol(), model.getTickerSymbol());
                ArrayList<Exchange> input = new ArrayList<Exchange>();
                input.add(exchange);
                comboExchange.setInput(input);
                comboExchange.setSelection(new StructuredSelection(exchange));
            }
View Full Code Here

    private void onFeedProviderChanged(SelectionChangedEvent event)
    {
        String previousExchangeId = null;
        if (comboExchange != null)
        {
            Exchange exchange = (Exchange) ((IStructuredSelection) comboExchange.getSelection()).getFirstElement();
            if (exchange != null)
                previousExchangeId = exchange.getId();
        }

        QuoteFeed feed = (QuoteFeed) ((IStructuredSelection) event.getSelection()).getFirstElement();

        createDetailDataWidgets(feed);
View Full Code Here

        }
    }

    private void onExchangeChanged(SelectionChangedEvent event)
    {
        Exchange exchange = (Exchange) ((IStructuredSelection) event.getSelection()).getFirstElement();
        model.setStatusQuoteProvider(null);

        if (exchange == null)
        {
            clearSampleQuotes();
View Full Code Here

                    {
                        List<Exchange> exchanges = cacheExchanges.get(feed);
                        comboExchange.setInput(exchanges);

                        // run only after exchanges have been re-loaded
                        Exchange selectedExchange = null;
                        if (exchanges != null && comboExchange != null)
                        {
                            for (Exchange e : exchanges)
                            {
                                if (e.getId().equals(model.getTickerSymbol()))
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.model.Exchange

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.