Package name.abuchen.portfolio.snapshot

Examples of name.abuchen.portfolio.snapshot.ClientSnapshot


    @Override
    protected Control createBody(Composite parent)
    {
        canvas = new PieChart(parent, SWT.NONE);

        ClientSnapshot snapshot = ClientSnapshot.create(getClient(), Dates.today());

        List<PieChart.Slice> slices = new ArrayList<PieChart.Slice>();

        for (AccountSnapshot a : snapshot.getAccounts())
            slices.add(new PieChart.Slice(a.getFunds(), a.getAccount().getName(), null));

        for (SecurityPosition position : snapshot.getJointPortfolio().getPositions())
            slices.add(new PieChart.Slice(position.calculateValue(), position.getSecurity().getName(), null));

        Collections.sort(slices, new Slice.ByValue());

        ColorWheel colors = new ColorWheel(canvas, slices.size());
View Full Code Here


        final long[] totals = new long[dates.size()];

        int index = 0;
        for (DateMidnight current : dates)
        {
            ClientSnapshot snapshot = ClientSnapshot.create(getModel().getClient(), current.toDate());
            totals[index] = snapshot.getAssets();

            Map<InvestmentVehicle, AssetPosition> p = snapshot.getPositionsByVehicle();

            for (Map.Entry<InvestmentVehicle, VehicleBuilder> entry : vehicle2builder.entrySet())
            {
                AssetPosition pos = p.get(entry.getKey());
                if (pos != null)
View Full Code Here

    {
        Model model = (Model) getModel();

        manager.add(new LabelOnly(Messages.DividendsDialogTitleShares));

        ClientSnapshot snapshot = model.getSnapshot();

        if (snapshot != null && model.getSecurity() != null)
        {
            PortfolioSnapshot jointPortfolio = snapshot.getJointPortfolio();
            addAction(manager, jointPortfolio, Messages.ColumnSharesOwned);

            List<PortfolioSnapshot> list = snapshot.getPortfolios();
            if (list.size() > 1)
            {
                for (PortfolioSnapshot ps : list)
                    addAction(manager, ps, ps.getSource().getName());
            }
View Full Code Here

    }

    @Override
    public void notifyModelUpdated()
    {
        ClientSnapshot snapshot = ClientSnapshot.create(getClient(), Dates.today());

        assetViewer.setInput(snapshot);
    }
View Full Code Here

            this.security = security;
            this.type = type;

            if (type == PortfolioTransaction.Type.SELL && security != null)
            {
                ClientSnapshot snapshot = ClientSnapshot.create(client, Dates.today());
                for (PortfolioSnapshot p : snapshot.getPortfolios())
                {
                    SecurityPosition position = p.getPositionsBySecurity().get(security);
                    if (position != null && (portfolio == null || p.getSource().equals(portfolio)))
                    {
                        setShares(position.getShares());
View Full Code Here

TOP

Related Classes of name.abuchen.portfolio.snapshot.ClientSnapshot

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.