JideTabbedPane Set Selected tab to bold.

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.

JideTabbedPane Set Selected tab to bold.

Postby bstoll » Thu Oct 10, 2013 11:07 am

Hi I am trying to use the JideTabbedPane to set the active tab to bold.
When i call setBoldActiveTab() it does not seem to set the active tabs font to bold.
Any Help would be appreciated.


Code: Select all
JPanel summaryView = summaryPanel.getJPanel();
    JPanel propertiesView = propertiesPanel.getJPanel();
    JPanel designationView = designationPanel.getJPanel();
    JPanel pointView = pointEditor.getJPanel();

    // summaryView.setBorder(BorderFactory.)

    panel.setLayout(new BorderLayout());
    JideTabbedPane tabs = new JideTabbedPane(JTabbedPane.BOTTOM,
        JideTabbedPane.SCROLL_TAB_LAYOUT);
    tabs.setColorTheme(JideTabbedPane.COLOR_THEME_DEFAULT);
    tabs.setTabColorProvider(new JideTabbedPane.ColorProvider() {

      @Override
      public Color getBackgroundAt(int arg0) {
        return Color.ORANGE;
      }

      @Override
      public Color getForegroundAt(int arg0) {
        return Color.BLACK;
      }

      @Override
      public float getGradientRatio(int arg0) {
        return 0.86f;
      }

    });

    tabs.setTabShape(JideTabbedPane.SHAPE_FLAT);
    tabs.setTabResizeMode(JideTabbedPane.RESIZE_MODE_FIT);
    tabs.setBoldActiveTab(true);
    tabs.setContentBorderInsets(new Insets(BORDER_SIZE, BORDER_SIZE,
        BORDER_SIZE, BORDER_SIZE));
    tabs.setAutoRequestFocus(true);
    tabs.addTab("Summary", summaryView);
    tabs.addTab("Properties", propertiesView);
    tabs.addTab("Designation", designationView);
    tabs.addTab("Points", pointView);
    panel.add(tabs);
bstoll
 
Posts: 2
Joined: Thu Oct 10, 2013 11:03 am

Re: JideTabbedPane Set Selected tab to bold.

Postby bstoll » Thu Oct 10, 2013 11:11 am

Also any help with how to only change the background color of the tab to when it is selected would be appreciated.
bstoll
 
Posts: 2
Joined: Thu Oct 10, 2013 11:03 am

Re: JideTabbedPane Set Selected tab to bold.

Postby JIDE Support » Thu Oct 10, 2013 4:20 pm

Could you please give JIDE JideTabbedPaneDemo a try? In that demo, there is a check box named "Bold the selected tab" in the option panel. You would be able to use that check box to bold/unbold selected tab.

Please invoke JideTabbedPane#setBackgroundAt(int, Color) to set the background color of one specific tab.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 36468
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: Google [Bot] and 4 guests

cron