当前位置: 首页>>代码示例>>Java>>正文


Java Formats类代码示例

本文整理汇总了Java中com.ib.controller.Formats的典型用法代码示例。如果您正苦于以下问题:Java Formats类的具体用法?Java Formats怎么用?Java Formats使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Formats类属于com.ib.controller包,在下文中一共展示了Formats类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: connected

import com.ib.controller.Formats; //导入依赖的package包/类
@Override public void connected() {
	show( "connected");
	m_connectionPanel.m_status.setText( "connected");
	
	controller().reqCurrentTime( new ITimeHandler() {
		@Override public void currentTime(long time) {
			show( "Server date/time is " + Formats.fmtDate(time * 1000) );
		}
	});
	
	controller().reqBulletins( true, new IBulletinHandler() {
		@Override public void bulletin(int msgId, NewsType newsType, String message, String exchange) {
			String str = String.format( "Received bulletin:  type=%s  exchange=%s", newsType, exchange);
			show( str);
			show( message);
		}
	});
}
 
开发者ID:qerio,项目名称:goib,代码行数:19,代码来源:ApiDemo.java

示例2: connected

import com.ib.controller.Formats; //导入依赖的package包/类
@Override public void connected() {
	show( "connected");
	m_connectionPanel.m_status.setText( "connected");
	
	m_controller.reqCurrentTime( new ITimeHandler() {
		@Override public void currentTime(long time) {
			show( "Server date/time is " + Formats.fmtDate(time * 1000) );
		}
	});
	
	m_controller.reqBulletins( true, new IBulletinHandler() {
		@Override public void bulletin(int msgId, NewsType newsType, String message, String exchange) {
			String str = String.format( "Received bulletin:  type=%s  exchange=%s", newsType, exchange);
			show( str);
			show( message);
		}
	});
}
 
开发者ID:softwarespartan,项目名称:TWS,代码行数:19,代码来源:ApiDemo.java

示例3: getValueAt

import com.ib.controller.Formats; //导入依赖的package包/类
@Override public Object getValueAt(int rowIn, int col) {
	PositionRow row = m_list.get( rowIn);
	
	switch( col) {
		case 0: return row.m_account;
		case 1: return row.m_modelCode;
		case 2: return row.m_contract.description();
		case 3: return row.m_position;
		case 4: return Formats.fmt( row.m_avgCost);
		default: return null;
	}
}
 
开发者ID:qerio,项目名称:goib,代码行数:13,代码来源:AccountPositionsMultiPanel.java

示例4: getValueAt

import com.ib.controller.Formats; //导入依赖的package包/类
@Override public Object getValueAt(int rowIn, int col) {
	PositionRow row = m_list.get( rowIn);
	
	switch( col) {
		case 0: return row.m_account;
		case 1: return row.m_contract.description();
		case 2: return row.m_position;
		case 3: return Formats.fmt( row.m_avgCost);
		default: return null;
	}
}
 
开发者ID:qerio,项目名称:goib,代码行数:12,代码来源:PositionsPanel.java

示例5: getValueAt

import com.ib.controller.Formats; //导入依赖的package包/类
@Override public Object getValueAt(int rowIn, int col) {
	TopRow row = m_rows.get( rowIn);
	switch( col) {
		case 0: return row.m_description;
		case 1: return row.m_bidSize;
		case 2: return fmt( row.m_bid);
		case 3: return fmt( row.m_ask);
		case 4: return row.m_askSize;
		case 5: return fmt( row.m_last);
		case 6: return fmtTime( row.m_lastTime);
		case 7: return row.change();
		case 8: return Formats.fmt0( row.m_volume);
		default: return null;
	}
}
 
开发者ID:qerio,项目名称:goib,代码行数:16,代码来源:TopModel.java

示例6: fmtPct

import com.ib.controller.Formats; //导入依赖的package包/类
public String fmtPct(String val) {
	return val == null || val.length() == 0 ? null : Formats.fmtPct( Double.parseDouble( val) );
}
 
开发者ID:qerio,项目名称:goib,代码行数:4,代码来源:AccountSummaryPanel.java

示例7: fmtTime

import com.ib.controller.Formats; //导入依赖的package包/类
public String fmtTime(String val) {
	return val == null || val.length() == 0 || val.equals( "0") ? null : Formats.fmtDate( Long.parseLong( val) * 1000);
}
 
开发者ID:qerio,项目名称:goib,代码行数:4,代码来源:AccountSummaryPanel.java


注:本文中的com.ib.controller.Formats类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。