package com.strategyquant.extend.TradeListColumns;

import com.strategyquant.lib.databank.TradeListColumn;
import com.strategyquant.lib.language.L;
import com.strategyquant.lib.results.SQOrder;
import com.strategyquant.lib.settings.SQConst;

public class CommSwap extends TradeListColumn {
    
	public CommSwap() {
		super();
		
		setName(L.t("Comm/Swap"));		
		setWidth(80);
	}

	@Override
	public Object getValue(SQOrder order, String plType) {
		return order.CommSwap;
	}
	
	@Override
	public String displayString(SQOrder order, String plType) {
		double commSwap = (Double)getValue(order, plType);
		
		return this.twoDecimalFormatWithPlType(commSwap, SQConst.PL_IN_MONEY);
	}
	
	@Override
	public String exportString(SQOrder order, String plType) {
		double commSwap = (Double)getValue(order, plType);
		
		return this.twoDecimalFormat(commSwap);
	}
}