Package name.abuchen.portfolio.online.SecuritySearchProvider

Examples of name.abuchen.portfolio.online.SecuritySearchProvider.ResultItem


        List<ResultItem> items = new YahooSearchProvider().extractFrom(document);

        assertThat(items.size(), equalTo(20));

        ResultItem p = items.get(0);
        assertThat(p.getSymbol(), equalTo("D979C.LS"));
        assertThat(p.getName(), equalTo("BASF AG/CITI WT 14"));
        assertThat(p.getIsin(), equalTo("DE000CF79JW9"));
        assertThat(p.getLastTrade(), equalTo(11L));
        assertThat(p.getType(), equalTo("Zertifikate & OS"));
        assertThat(p.getExchange(), equalTo("LIS"));
    }
View Full Code Here


        }

        @Override
        public String getColumnText(Object element, int columnIndex)
        {
            ResultItem item = (ResultItem) element;
            switch (columnIndex)
            {
                case 0:
                    return item.getSymbol();
                case 1:
                    return item.getName();
                case 2:
                    return item.getIsin();
                case 3:
                    if (item.getLastTrade() != 0)
                        return Values.Quote.format(item.getLastTrade());
                    else
                        return null;
                case 4:
                    return item.getType();
                case 5:
                    return item.getExchange();
            }
            return null;
        }
View Full Code Here

        }

        @Override
        public Color getForeground(Object element, int columnIndex)
        {
            ResultItem item = (ResultItem) element;

            if (item.getSymbol() == null)
                return Display.getCurrent().getSystemColor(SWT.COLOR_DARK_GRAY);
            else if (symbols.contains(item.getSymbol()))
                return Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
            else
                return null;
        }
View Full Code Here

        addPage(page = new SearchSecurityWizardPage(client));
    }

    public Security getSecurity()
    {
        ResultItem item = page.getResult();

        if (item == null)
            return null;

        Security security = new Security();
        security.setName(item.getName());
        security.setTickerSymbol(item.getSymbol());
        security.setIsin(item.getIsin());
        security.setFeed(YahooFinanceQuoteFeed.ID);

        return security;
    }
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.online.SecuritySearchProvider.ResultItem

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.