Hiding Tab Header in JideTabbedPane

This is the forum for JIDE Common Layer which is open sourced at https://github.com/jidesoft/jide-oss. Please note, JIDE technical support doesn't monitor this forum as often as other forums. Please consider subscribe for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Moderator: JIDE Support

Forum rules
Community driven forum for open source JIDE Common Layer. JIDE technical support doesn't monitor this forum as often as other forums. If you only use JIDE Common Layer, please consider subscribing for technical support for JIDE Common Layer so that you can use customer only forum to get a timely response.

Hiding Tab Header in JideTabbedPane

Postby rathinamsm » Tue Apr 03, 2012 4:28 am

Hi Team,

Hi have a query in setting "Hide Tab Header" option.

I have maintained the ArrayList<JideTabbedPane> Collections, in which TabbedPaneCustomiser() class.

Code: Select all
 _panel.getDockingManager().setTabbedPaneCustomizer(new DockingManager.TabbedPaneCustomizer() {

         public void customize( final JideTabbedPane arg0) {
            tab_collection.add(arg0);

==========================================================================================
And iterated to applied the Hide tab option.

Code: Select all
Iterator<JideTabbedPane> jt_it = tab_collection.iterator();         
boolean isHide = _panel.getDockingManager().isHideAllTabs();         
            while (jt_it.hasNext()) {
               JideTabbedPane jideTabbedPane = (JideTabbedPane) jt_it.next();
               if ( isHide ){
                  JButton jb = (JButton) e.getSource();
                  jb.setText("Hide Tab Header");
                  _panel.getDockingManager().setHideAllTabs(false);
                  jideTabbedPane.setHideOneTab(false);
                  
               }else {
                  JButton jb = (JButton) e.getSource();
                  jb.setText("Show Tab Header");
                  _panel.getDockingManager().setHideAllTabs(true);
                  jideTabbedPane.setHideOneTab(true);
               }
            }
            validate();
            repaint();


To achieve "hiding" All Tab header at Once in a button action.

Please Refer the Screen Shot_01. I have toggled the "show/hide tabs". using Show/Hide tab button.
Is there any way to apply this settings in Jide. Let me know please ?

I applied this tab_collection for sample.
Attachments
InitialLayoutDockDemo.java
Sample Demo
(6.82 KiB) Downloaded 1339 times
rathinamsm
 
Posts: 40
Joined: Wed Nov 02, 2011 5:36 am

Re: Hiding Tab Header in JideTabbedPane

Postby JIDE Support » Tue Apr 03, 2012 8:48 am

I'm afraid that those two methods may not meet your expectation. There is no method that could hide one of those tabs while the tab is existing. Please allow me put the javadoc of those two documents here FYI.
Code: Select all
    /**
     * Sets the option of closeAllTabs. If it's true, when user presses close it will close all tabs.
     *
     * @param closeAllTabs true or false.
     */
    public void setHideAllTabs(boolean closeAllTabs);


    /**
     * Sets the value if tab area will be hidden if there is only one tab. PropertyChangeEvent of
     * HIDE_IF_ONE_TAB_PROPERTY will be fired. <br> If the showTabButtons option is true, no matter what option you pass
     * to setHideOneTab, isHideOneTab will always return false.
     *
     * @param hideOne true to hide tab areas if there is only one tab; false otherwise.
     */
    public void setHideOneTab(boolean hideOne);

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: Hiding Tab Header in JideTabbedPane

Postby rathinamsm » Wed Apr 04, 2012 12:14 am

Hi Team,

I need to “Hiding the Tab Header”.


"Please Refer the attached picture "Screen_Shot_01.png". I need to Hide the tab Header Like the Specified Screen_Shot_01.png.

How could I Show / Hide all the tab header after I added to the holder panel??
In a button action(show/hide tab header button).

Could you please able to make a Sample program???
Attachments
InitialLayoutDockDemo.java
(6.84 KiB) Downloaded 1411 times
Screen_Shot_01.PNG
Screen_Shot_01.PNG (37.7 KiB) Viewed 14180 times
rathinamsm
 
Posts: 40
Joined: Wed Nov 02, 2011 5:36 am

Re: Hiding Tab Header in JideTabbedPane

Postby JIDE Support » Wed Apr 04, 2012 8:45 am

It is the setHideOneTab(true) that hides the tab header for those FrameContainers that contain only one tab component. For those FrameContainers that contain no less than 2 tabs, the tab header has to stay there.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to JIDE Common Layer Open Source Project Discussion (Community Driven)

Who is online

Users browsing this forum: No registered users and 12 guests

cron