本文整理汇总了Java中apidemo.util.NewTabbedPanel.addTab方法的典型用法代码示例。如果您正苦于以下问题:Java NewTabbedPanel.addTab方法的具体用法?Java NewTabbedPanel.addTab怎么用?Java NewTabbedPanel.addTab使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类apidemo.util.NewTabbedPanel
的用法示例。
在下文中一共展示了NewTabbedPanel.addTab方法的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);
}
示例2: 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();
}
});
}
示例3: 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 );
}
示例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( "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);
}
示例5: OptionsPanel
import apidemo.util.NewTabbedPanel; //导入方法依赖的package包/类
OptionsPanel() {
NewTabbedPanel tabs = this;
tabs.addTab( "Option Chains", m_optionChains);
tabs.addTab( "Option Exercise", m_exercisePanel);
}
示例6: 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);
}