manager.add(new Action(Messages.SecurityMenuDividends)
{
@Override
public void run()
{
DividendsDialog dialog = new DividendsDialog(owner.getActiveShell(), owner.getClient(), null, security);
if (dialog.open() == DividendsDialog.OK)
{
owner.markDirty();
owner.notifyModelUpdated();
}
}
});
manager.add(new Action(Messages.SecurityMenuStockSplit)
{
@Override
public void run()
{
StockSplitWizard wizard = new StockSplitWizard(owner.getClient(), security);
WizardDialog dialog = new WizardDialog(owner.getActiveShell(), wizard);
if (dialog.open() == DividendsDialog.OK)
{
owner.markDirty();
owner.notifyModelUpdated();
}
}
});
if (portfolio != null && owner.getClient().getActivePortfolios().size() > 1)
{
manager.add(new Separator());
manager.add(new Action(Messages.SecurityMenuTransfer)
{
@Override
public void run()
{
SecurityTransferDialog dialog = new SecurityTransferDialog(owner.getActiveShell(), owner
.getClient(), portfolio);
if (dialog.open() == DividendsDialog.OK)
{
owner.markDirty();
owner.notifyModelUpdated();
}
}
});
}
if (portfolio != null)
{
manager.add(new Separator());
manager.add(new Action(PortfolioTransaction.Type.DELIVERY_INBOUND.toString() + "...") //$NON-NLS-1$
{
@Override
public void run()
{
SecurityDeliveryDialog dialog = new SecurityDeliveryDialog(owner.getActiveShell(), owner
.getClient(), portfolio, PortfolioTransaction.Type.DELIVERY_INBOUND);
if (dialog.open() == SecurityDeliveryDialog.OK)
{
owner.markDirty();
owner.notifyModelUpdated();
}
}
});
manager.add(new Action(PortfolioTransaction.Type.DELIVERY_OUTBOUND.toString() + "...") //$NON-NLS-1$
{
@Override
public void run()
{
SecurityDeliveryDialog dialog = new SecurityDeliveryDialog(owner.getActiveShell(), owner
.getClient(), portfolio, PortfolioTransaction.Type.DELIVERY_OUTBOUND);
if (dialog.open() == SecurityDeliveryDialog.OK)
{
owner.markDirty();
owner.notifyModelUpdated();
}
}