Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Non closable tab in BottomTab Pane
 Post subject: Non closable tab in BottomTab Pane Post rating: 0   New post Posted: Mon 22 Feb, 2010, 20:29 

User rating: 0
Joined: Mon 25 Jan, 2010, 20:52
Posts: 13
Hi,

I need to create a tab under BottomTabPane such that it should not closeable.
Yes, we can make it floatable but not closeable.

This tab will be closed only when if I stop strategy.

Is there any way ?


 
 Post subject: Re: Non closable tab in BottomTab Pane Post rating: 0   New post Posted: Thu 04 Mar, 2010, 10:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
This is not possible.


 
 Post subject: Re: Non closable tab in BottomTab Pane Post rating: 0   New post Posted: Mon 08 Mar, 2010, 19:11 

User rating: 0
Joined: Mon 25 Jan, 2010, 20:52
Posts: 13
My client, who uses JForex and that's why your customer, is not satisfied with answer.


 
 Post subject: Re: Non closable tab in BottomTab Pane Post rating: 0   New post Posted: Tue 09 Mar, 2010, 19:29 

User rating: 0
Joined: Mon 25 Jan, 2010, 20:52
Posts: 13
K, do we have any way by which I can know that tab is closing ? Any tab close listener ?


 
 Post subject: Re: Non closable tab in BottomTab Pane Post rating: 0   New post Posted: Wed 24 Mar, 2010, 17:40 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
you could add your own listener to this object.
Consider this sample:
                   . . .               
import javax.swing.JPanel;
import java.awt.event.*;
                   . . .
   public void onStart(IContext context) throws JFException {
      this.userInterface = context.getUserInterface();
       
                JPanel myTab = context.getUserInterface().getBottomTab("My new tab");
                myTab.addHierarchyListener(new HierarchyListener(){

                @Override
                public void hierarchyChanged(HierarchyEvent e) {
                      if (e.getChangeFlags() == HierarchyEvent.DISPLAYABILITY_CHANGED)               
                         console.getOut().println(" Close My tab ");
            }           
        });
   }


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com