Resize tabs only when double click on tab name

I have this code which resizes tab when it's clicked twice no matter where I click on the tab.
VBox stackedTitledPanes = createStackedTitledPanes();
   ScrollPane scroll = makeScrollable(stackedTitledPanes);
   final TabPane tabPane = new TabPane();
   final BorderPane mainPane = new BorderPane();
   final Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
  tabPane.setStyle("-fx-font-size: 12pt;"); // Set global size for the font
   // Create Tabs
   Tab tabA = new Tab();
  tabPane.setOnMouseClicked(new EventHandler<MouseEvent>()
   private double sizeX, sizeY;
   private boolean first = true;
   @Override
   public void handle(MouseEvent me)
   if (first)
  sizeX = mainPane.getWidth();
  sizeY = mainPane.getHeight();
  first = false;
   if (me.getButton().equals(MouseButton.PRIMARY) && me.getClickCount() % 2 == 0)
   if (sizeX != mainPane.getWidth() || sizeY != mainPane.getHeight())
  mainPane.setPrefSize(sizeX, sizeY);
   else
  mainPane.setPrefSize(primaryScreenBounds.getWidth(), primaryScreenBounds.getHeight());
  tabA.setText("Main Component");
  tabA.setContextMenu(makeTabContextMenu(tabA, tabPane));  // Set right mouse click menu
   // Add something in Tab
   StackPane tabA_stack = new StackPane();
  tabA_stack.setAlignment(Pos.CENTER);
  tabA_stack.getChildren().add(scroll);
  tabA.setContent(tabA_stack);
  tabPane.getTabs().add(tabA);
   Tab tabB = new Tab();
  tabB.setText("Second Component");
  tabB.setContextMenu(makeTabContextMenu(tabB, tabPane));  // Set right mouse click menu
   // Add something in Tab
   StackPane tabB_stack = new StackPane();
  tabB_stack.setAlignment(Pos.CENTER);
  tabB_stack.getChildren().add(new Label("Label@Tab B"));
  tabB.setContent(tabB_stack);
  tabPane.getTabs().add(tabB);
   Tab tabC = new Tab();
  tabC.setText("Last Component");
  tabC.setContextMenu(makeTabContextMenu(tabC, tabPane));  // Set right mouse click menu
   // Add something in Tab
   StackPane tabC_vBox = new StackPane();
  tabC_vBox.setAlignment(Pos.CENTER);
  tabC_vBox.getChildren().add(new Label("Label@Tab C"));
  tabC.setContent(tabC_vBox);
  tabPane.getTabs().add(tabC);
  mainPane.setCenter(tabPane);
  mainPane.setPrefSize(300, 500);
   //mainPane.setLayoutX(5); // Horizontal Position
  mainPane.setLayoutY(32);   // Vertical Position
  scroll.setPrefSize(395, 580);
  scroll.setLayoutX(5);
  scroll.setLayoutY(32);
Can you tell me how I can modify the code in a way that I can size the tab only when I double click on a tab name?

See:
*https://support.mozilla.com/kb/Firefox+keeps+opening+many+tabs+or+windows

Similar Messages

  • How can i change the tab bar from opening a new tab when single clicked to open one only when double clicked?

    Out of habbit, i double click the tab bar and it opens 1 tab. however in the new beta, it opens 2.
    Is there anyway to change this so single clicks dont open new tabs on the tab bar?

    I don't have multiple tab bars and haven't installed anything to try and get them.
    I re-read what I wrote earlier and realised it's not worded clearly when I said: If I have more than a single tab bar of tabs open
    I meant: When I have so many tabs open that they won't all fit into the tab bar at once

  • When I double-click the tab bar, FF4 just resizes the window but does not open a new tab

    When I double-click the Tab Bar, FF 4.0 just resizes the window but does not open a new tab. It happens when Menu Bar is disabled (not ticked).

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).<br />
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]<br />
    <br />
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.<br />
    You can use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.<br />
    You have to close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")<br />
    Your plugins list shows outdated plugin(s) with known security and stability risks.
    * Shockwave Flash 10.0 r32
    * Java Plug-in 1.6.0_03 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)
    Update the [[Flash]] plugin to the latest version.
    *http://www.adobe.com/software/flash/about/

  • Feature Request: Double Click in Tab Field to Create New Tab.

    Right now the only way to add a new tab is to *right click* then select new tab.
    Also instead of a grey (close) x it should be colorful, less grey.

    Hello,
    Try using the template code given below.  Let me know if you have any questions.
    data : GT_EVENTS TYPE SLIS_T_EVENT.
    get event
    PERFORM BUILD_EVENT_TOPOFPAGE USING GT_EVENTS[].
    display alv data
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = W_xxxxx
    IT_FIELDCAT = GT_xxxx
    IT_EVENTS = GT_EVENTS[]
    TABLES
    T_OUTTAB = T_xxxx
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    get event perform
    FORM BUILD_EVENT_TOPOFPAGE USING LT_EVENTS TYPE SLIS_T_EVENT.
    DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
    CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
    EXPORTING
    I_LIST_TYPE = 0
    IMPORTING
    ET_EVENTS = LT_EVENTS.
    Read double click event using the below statement
    READ TABLE LT_EVENTS WITH KEY NAME = SLIS_EV_USER_COMMAND
    INTO LS_EVENT.
    IF SY-SUBRC = 0.
    ENDIF.
    ENDFORM. " BUILD_EVENT_TOPOFPAGE
    FORM USER_COMMAND USING L_UCOMM LIKE SY-UCOMM
    LS_SELFIELD TYPE SLIS_SELFIELD.
    CASE L_UCOMM.
    WHEN <double click>
        Perform do_something.
    ENDCASE.
    ENDFORM. " USER_COMMAND
    Best Regards,
    Krishna

  • There is a problem when i click the "+" tab to "open a new tab" nothing happens. It use to open new tabs and now it does nothing.

    There is a problem when i click the "+" tab to "open a new tab" nothing happens. It use to open new tabs and now it does nothing. Even when i go to "File" and "New Tab" it still does nothing. The only time i can get a new tab to open is if i go to "Help" and click "Firefox Help" then a new tab with firefox help opens.

    Hi, were you able to resolve your problem? If so, please mark this question as '''Solved'''. Thanks !

  • Double Click on Tabe area does not open new tab any moee, why?

    I just updated (bad word because it is a serious DOWN grade) to 29.0. What a terrible mistake. If I wanted to use Chrome I would use Chrome. This version of FF is total shit.
    1) How do I get rid of that horrid big orange FF button?
    2) How do I re-enable double click on tab bar to open a new tab?
    3) How do I fix the navigation buttons (forward is ½ hidden under back)?
    4) How do I restore the colors (theme?) to my previous settings?
    5) Why is FF trying to be chrome anyway?

    To clarify, the list of previously or later visited pages does still show up when I right click on the navigation arrows in the Developer Version, but I cannot open any of the links in the list in a new tab with the mouse wheel or "Ctrl + Left Mouse Click".

  • MY FIREFOX NEW TAB NOT WORKING NIETHER WITH + NOR WITH RIGHT CLICKING ON TAB OR DOUBLE CLICK ON TAB

    MY FIREFOX NEW TAB NOT WORKING NIETHER WITH + NOR WITH RIGHT CLICKING ON TAB OR DOUBLE CLICKING ON TAB

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • I used to be able to open a second tab to get to another web site without closing the first one....now I can see the second tab but when I click on it nothing happens...

    I used to be able to open a second tab to get to another web site without closing the first one...now I can see the second tab but when I click on it, nothing happens..

    This issue can be caused by the Ask<i></i>.com toolbar (Tools > Add-ons > Extensions)
    Your system details show that toolbar in the user agent as AskTbARCD/3.13.1.18107
    *https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • Movies with iTunes Extras show only HTML code and not title screen when double clicked.

    I only noticed this after some iTunes updates.  Any movies that have iTunes Extras donot show the "Title Screen" when double clicked.  They only show HTML script.  I can still watch the movies, and can access the extras by going to the folder they are in, but thats a pain.  I have purchased other movies with extras since encountering the problem and have the same issue.  I run windows Vista on a 32-bit system. I have all updated drivers.  I have searched the web for an answer but couldnt find anything.  It is prob something insanely easy.  Any help would be appriciated.
    Example of text that appears when double clicking:
    <!doctype html>
    <html>
    <head>
         <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
         <meta name="hdtv-fullscreen" content="true" />     
         <meta name="hdtv-cursor-off" content="true" />          
         <title>Paul (Unrated) [2011]</title>          
         <!--      TuneKit      -->   
      <script type="text/javascript" src="TuneKit/src/TuneKit.js" charset="utf-8"></script>          
         <!--      Styles      -->     
         <link rel="stylesheet" href="css/shared.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/home.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/chapters.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/features.css" type="text/css" media="screen" />     
         <link rel="stylesheet" href="css/more.css" type="text/css" media="screen" />          
         <!--      Controllers      -->     
         <script type="text/javascript" src="controllers/data.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/home.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/chapters.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/features.js" charset="utf-8"></script>     
         <script type="text/javascript" src="controllers/more.js" charset="utf-8"></script>
    </head>
    <body>
         <div id="bleed">          
              <div id="navigation">             
                   <img id="pic0" class="picBLANK" src="images/home/Paul_mm_background_01.jpg"/>            
              <img id="pic1" class="picBLANK" src="images/home/Paul_mm_background_01.jpg"/>             
                   <img id="pic2" class="picBLANK" src="images/home/Paul_mm_background_02.jpg"/>            
              <img id="pic3" class="picBLANK" src="images/home/Paul_mm_background_03.jpg" />            
              <img id="pic4" class="picBLANK" src="images/home/Paul_mm_background_04.jpg" />            
              <img id="pic5" class="picBLANK" src="images/home/Paul_mm_background_05.jpg" />            
              <img id="pic6" class="picBLANK" src="images/home/Paul_mm_background_06.jpg" />            
              <img id="pic7" class="picBLANK" src="images/home/Paul_mm_background_07.jpg" />            
              <img id="pic8" class="picBLANK" src="images/home/Paul_mm_background_08.jpg" />            
              <img id="pic9" class="picBLANK" src="images/home/Paul_mm_background_09.jpg" />            
              <img id="pic10" class="picBLANK" src="images/home/Paul_mm_background_01.jpg" />             
                   <div id="vid" class="vid_bg">               
                        </div>          
              </div>     
         </div>
    </body>
    </html>

    The fix from this other post worked for me.
    https://discussions.apple.com/message/17691332#17691332
    FIX:
    Go into "Get Info" and set the Album name to the name of the movie for both the movie and the "Extra".  This will fix it.

  • Why do my tabs become tiled windows without input from me? I have to double-click the tab to make the windows disappear, sometimes more than once. This is annoy

    This happens when I have several tabs. I'll click another tab and a tiled window appears with one window being the page of the tab and the other one the tab beside it. It's become quite annoying.

    Hello,
    In order to better assist you with your issue please provide us with a screenshot. If you need help to create a screenshot, please see [[How do I create a screenshot of my problem?]]
    Once you've done this, attach the saved screenshot file to your forum post by clicking the '''Browse...''' button below the ''Post your reply'' box. This will help us to visualize the problem.
    Thanks!
    Curtis

  • I cannot open files attached to an excel spreadsheet. I am using office for mac 2011. when double clicking object I only get the picture modifier windows.

    I cannot open files attached to an excel spreadsheet. I am using office for mac 2011. when double clicking object I only get the picture modifier windows.

    Preventing Microsoft Office to open recent documents at startup in Mac OS, Please see:
    http://www.frenchguys.com/wordpress/preventing-microsoft-office-open-documents-startup-mac-os-lion/
    It seems that the solution works for most people.
    In a terminal, enter the following:
     defaults write com.microsoft.Excel NSQuitAlwaysKeepsWindows -bool false

  • In my iPhoto library, only some images appear as thumbnails.  The rest are blank but appear briefly when scrolling through or properly when double clicked.  Any ideas?

    In my iPhoto library, only some images appear as thumbnails.  The rest are blank but appear briefly when scrolling through or properly when double clicked.  Any ideas?

    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • How to achieve SUBMIT for the current page when I click other tab?

    Problem: How to achieve SUBMIT for the current page when I click other tab?
    Description: I have a two-page application and each page associates with a tab. Say page1 associates tab1 and page2 associates tab2. In each page, I have a submit button, a after submit process associated to the submit button, and a tabular form. For page1, I fill out the fields and hit the button. The page1 will appear again and I can see the data I have insert. However, If I fill out the fields and click the tab2 (page 2) instead. when I come back to page1, the data I filled out are all gone. Is there any way in HTML DB to force the submit in the current page after you click other page. If use JavaScript, what is code looks like.
    Appreciate your time and your answer.
    Mike

    Scott,
    just for clarity, if I understood correctly what you said there are two possibilities:
    1) keep the standard tab branch and give up the possibility of validating page items. Below you can find an example of such cases.
    2) Replace the template substitution string and perform a "custom" button-like submit also adding a branch to the main page associated with the tab. Page items will be validated if the branch firing point is set after the validations.
    I couldn't find an example of the latter, but I found easily an example of the former:
    it's the "Report attributes", page 420 of app 4000.
    If you enter 'aaa' in the "Number of rows" form field and then you press "apply changes", htmldb correctly displays an inline error message saying that the value must be numeric. On the contrary, if you click on the "Region Definition" tab, htmldb takes you to a page showing an oracle exception:
    ORA-20001: Error in DML: p_rowid=4785927011172906402, p_alt_rowid=ID, p_rowid2=, p_alt_rowid2=. ORA-20001: Invalid numeric value aaa for column PLUG_QUERY_NUM_ROWS
    Bye,
    Flavio

  • Geting javascript error when i click personalization tab

    Hi EP Guru's,
    I installed EP 6.0 successfully. When i click personalization tab on the first page giving javascript error. Please help me how to solve and work on personalization.
    With Regards,
    Lolla Murali.
    [email protected]
    Message was edited by:
            Lolla Venkata Murali Krishna

    Hi Murali,
    Pls check this:
    Personalization link not working
    Regards,
    Shyam.

  • Audio and video don't open together in viewer when double clicked

    Hello everyone!
    I'm having an annoying problem... it isn't something terribly important, but has decreased my work flow speed. Recently, I've had some trouble opening clips from the timeline in the viewer with the double click.
    If I double click the video portion of the clip, even if both the video and two audio tracks are highlighted (and are still linked) only the video portion of the clip will appear (along with "filters" and "motion" tabs) in the viewer, and similarly when double clicking the audio tracks, though both video and audio are highlighted, only the audio tracks and "Filters" tab show up in the viewer. Additionally, once the item is double clicked at the left with the jigsaw pieces that can be used to set video and audio destinations, if I've clicked on an audio portion so only audio shows up in the viewer, only the jigsaw pieces for the two audio tracks (a1, a2) are visible, video track (v1) is no longer present, and vice versa.
    I'd appreciate any advice that you all have! It's really driving me batty, in addition to not knowing what I did to make it that way, I can't figure out how to change it back!
    Heather

    Thanks for the advice.
    The clips already appeared to be linked, and the selection "link" was checked, however when I unlinked and then relinked I found that the audio and video would open up at the same time in the viewer... problem apparently solved! However, the clips I had been working with I had to nudge audio and video a few frames apart (out of sync) to get the audio and video to line up. (gives the little red box with a +or- number in it on the clip).
    When I unlinked and then relinked, the clip lost those red boxes and went back to being synced (as far as FCP is concerned) with the audio and video unaligned.
    So, the problem appears to be coming from when I move the audio and video of a clip out of sync... why is this? Is this something I'm just going to have to deal with?
    Thanks
    H

Maybe you are looking for