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


Java NewTabbedPanel类代码示例

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


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

示例1: ComboPanel

import apidemo.util.NewTabbedPanel; //导入依赖的package包/类
ComboPanel() {
	NewTabbedPanel tabs = new NewTabbedPanel();
	tabs.addTab( "Spreads", new SpreadsPanel() );
	tabs.addTab( "EFP's", new EfpPanel() );
	
	final JTable ordersTable = new JTable( m_ordersModel);
	JScrollPane ordersScroll = new JScrollPane( ordersTable);
	ordersScroll.setBorder( new TitledBorder( "Live Combo Orders"));
	
	ordersTable.addMouseListener( new MouseAdapter() {
		public void mouseClicked(MouseEvent e) {
			if (e.getClickCount() == 2) {
				onDoubleClick( ordersTable.getSelectedRow() );
			}
		}
	});

	setLayout( new BoxLayout( this, BoxLayout.Y_AXIS) );
	add( tabs);
	add( ordersScroll);
}
 
开发者ID:qerio,项目名称:goib,代码行数:22,代码来源:ComboPanel.java

示例2: TicketDlg

import apidemo.util.NewTabbedPanel; //导入依赖的package包/类
public TicketDlg(NewContract contract, NewOrder order) {
	super( ApiDemo.INSTANCE.frame());
	
	if (contract == null) {
		contract = new NewContract();
		m_editContract = true;
	}

	if (order == null) {
		order = new NewOrder();
		order.totalQuantity( 100);
		order.lmtPrice( 1);
	}
	
	m_contract = contract;
	m_order = order;
	
	m_contractPanel = new ContractPanel( m_contract);
	m_orderPanel = new OrderPanel();
	m_advisorPanel = new AdvisorTicketPanel();
	m_attribTicketPanel = new MiscTicketPanel();
	m_volPanel = new VolatilityTicketPanel();
	m_comboPanel = new ComboTicketPanel();
	m_algoPanel = new AlgoPanel();
	m_scalePanel = new ScalePanel();
	
	HtmlButton transmitOrder = new HtmlButton( "Transmit Order") {
		@Override public void actionPerformed() {
			onTransmitOrder();
		}
	};
	
	HtmlButton checkMargin = new HtmlButton( "Check Margin") {
		@Override public void actionPerformed() {
			onCheckMargin();
		}
	};
	
	HtmlButton close = new HtmlButton( "Close") {
		@Override public void actionPerformed() {
			dispose();
		}
	};
	
	NewTabbedPanel tabbedPanel = new NewTabbedPanel(true);
	if (m_editContract) {
		tabbedPanel.addTab( "Contract", m_contractPanel);
	}
	tabbedPanel.addTab( "Order", m_orderPanel);
	tabbedPanel.addTab( "Misc", m_attribTicketPanel);
	tabbedPanel.addTab( "Advisor", m_advisorPanel);
	tabbedPanel.addTab( "Volatility", m_volPanel);
	if (m_contract.isCombo() ) {
		tabbedPanel.addTab( "Combo", m_comboPanel);
	}
	tabbedPanel.addTab( "Scale", m_scalePanel);
	tabbedPanel.addTab( "IB Algo", m_algoPanel);
	
	JPanel buts = new JPanel( new FlowLayout( FlowLayout.CENTER, 15, 5));
	buts.add( transmitOrder);		
	buts.add( checkMargin);
	buts.add( close);
	
	// check-margin is for new orders only
	if (m_order.orderId() != 0) {
		checkMargin.setVisible( false);
	}

	add( tabbedPanel);
	add( buts, BorderLayout.SOUTH);

	setLocation(200, 200);
	pack();
	Util.closeOnEsc( this);
}
 
开发者ID:softwarespartan,项目名称:TWS,代码行数:76,代码来源:TicketDlg.java

示例3: AccountInfoPanel

import apidemo.util.NewTabbedPanel; //导入依赖的package包/类
AccountInfoPanel() {
	m_lastUpdated.setHorizontalAlignment( SwingConstants.RIGHT);
	
	m_accounts.setPreferredSize( new Dimension( 10000, 100) );
	JScrollPane acctScroll = new JScrollPane( m_accounts);
	acctScroll.setBorder( new TitledBorder( "Select Account"));

	JScrollPane marginScroll = new JScrollPane( m_marginTable);
	JScrollPane mvScroll = new JScrollPane( m_mktValTable);
	JScrollPane portScroll = new JScrollPane( m_portfolioTable);
	
	NewTabbedPanel tabbedPanel = new NewTabbedPanel();
	tabbedPanel.addTab( "Balances and Margin", marginScroll);
	tabbedPanel.addTab( "Market Value", mvScroll);
	tabbedPanel.addTab( "Portfolio", portScroll);
	tabbedPanel.addTab( "Account Summary", new AccountSummaryPanel() );
	tabbedPanel.addTab( "Market Value Summary", new MarketValueSummaryPanel() );
	tabbedPanel.addTab( "Positions (all accounts)", new PositionsPanel() );
	
	setLayout( new BorderLayout() );
	add( acctScroll, BorderLayout.NORTH);
	add( tabbedPanel);
	add( m_lastUpdated, BorderLayout.SOUTH);
	
	m_accounts.addListSelectionListener( new ListSelectionListener() {
		@Override public void valueChanged(ListSelectionEvent e) {
			onChanged();
		}
	});
}
 
开发者ID:qerio,项目名称:goib,代码行数:31,代码来源:AccountInfoPanel.java

示例4: run

import apidemo.util.NewTabbedPanel; //导入依赖的package包/类
private void run() {
m_tabbedPanel.addTab( "Connection", m_connectionPanel);
m_tabbedPanel.addTab( "Market Data", m_mktDataPanel);
m_tabbedPanel.addTab( "Trading", m_tradingPanel);
m_tabbedPanel.addTab( "Account Info", m_acctInfoPanel);
m_tabbedPanel.addTab( "Acct/Pos Multi", m_acctPosMultiPanel);
m_tabbedPanel.addTab( "Options", m_optionsPanel);
m_tabbedPanel.addTab( "Combos", m_comboPanel);
m_tabbedPanel.addTab( "Contract Info", m_contractInfoPanel);
m_tabbedPanel.addTab( "Advisor", m_advisorPanel);
// m_tabbedPanel.addTab( "Strategy", m_stratPanel); in progress
	
m_msg.setEditable( false);
m_msg.setLineWrap( true);
JScrollPane msgScroll = new JScrollPane( m_msg);
msgScroll.setPreferredSize( new Dimension( 10000, 120) );

JScrollPane outLogScroll = new JScrollPane( m_outLog);
outLogScroll.setPreferredSize( new Dimension( 10000, 120) );

JScrollPane inLogScroll = new JScrollPane( m_inLog);
inLogScroll.setPreferredSize( new Dimension( 10000, 120) );

NewTabbedPanel bot = new NewTabbedPanel();
bot.addTab( "Messages", msgScroll);
bot.addTab( "Log (out)", outLogScroll);
bot.addTab( "Log (in)", inLogScroll);

      m_frame.add( m_tabbedPanel);
      m_frame.add( bot, BorderLayout.SOUTH);
      m_frame.setSize( 1024, 768);
      m_frame.setVisible( true);
      m_frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
      
      // make initial connection to local host, port 7496, client id 0, no connection options
controller().connect( "127.0.0.1", 7496, 0, m_connectionConfiguration.getDefaultConnectOptions() != null ? "" : null );
  }
 
开发者ID:qerio,项目名称:goib,代码行数:38,代码来源:ApiDemo.java

示例5: run

import apidemo.util.NewTabbedPanel; //导入依赖的package包/类
private void run() {
m_tabbedPanel.addTab( "Connection", m_connectionPanel);
m_tabbedPanel.addTab( "Market Data", m_mktDataPanel);
m_tabbedPanel.addTab( "Trading", m_tradingPanel);
m_tabbedPanel.addTab( "Account Info", m_acctInfoPanel);
m_tabbedPanel.addTab( "Options", m_optionsPanel);
m_tabbedPanel.addTab( "Combos", m_comboPanel);
m_tabbedPanel.addTab( "Contract Info", m_contractInfoPanel);
m_tabbedPanel.addTab( "Advisor", m_advisorPanel);
// m_tabbedPanel.addTab( "Strategy", m_stratPanel); in progress
	
m_msg.setEditable( false);
m_msg.setLineWrap( true);
JScrollPane msgScroll = new JScrollPane( m_msg);
msgScroll.setPreferredSize( new Dimension( 10000, 120) );

JScrollPane outLogScroll = new JScrollPane( m_outLog);
outLogScroll.setPreferredSize( new Dimension( 10000, 120) );

JScrollPane inLogScroll = new JScrollPane( m_inLog);
inLogScroll.setPreferredSize( new Dimension( 10000, 120) );

NewTabbedPanel bot = new NewTabbedPanel();
bot.addTab( "Messages", msgScroll);
bot.addTab( "Log (out)", outLogScroll);
bot.addTab( "Log (in)", inLogScroll);

      m_frame.add( m_tabbedPanel);
      m_frame.add( bot, BorderLayout.SOUTH);
      m_frame.setSize( 1024, 768);
      m_frame.setVisible( true);
      m_frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
      
      // make initial connection to local host, port 7496, client id 0
m_controller.connect( "127.0.0.1", 7496, 0);
  }
 
开发者ID:softwarespartan,项目名称:TWS,代码行数:37,代码来源:ApiDemo.java

示例6: OptionsPanel

import apidemo.util.NewTabbedPanel; //导入依赖的package包/类
OptionsPanel() {
	NewTabbedPanel tabs = this;
	tabs.addTab( "Option Chains", m_optionChains);
	tabs.addTab( "Option Exercise", m_exercisePanel);
}
 
开发者ID:qerio,项目名称:goib,代码行数:6,代码来源:OptionsPanel.java


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