Examples of JTabbedPaneSmartIcon


Examples of com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon

   
  }
 
  private void installTabIcons(int tab, boolean selected){
    if (tab < getTabCount()){
      JTabbedPaneSmartIcon icon = (JTabbedPaneSmartIcon) getIconAt(tab);
      if (icon != null){
        SmartIconJButton closeIcon = icon.getSmartButton(0);
        if (selected){
          closeIcon.setIcon(UIManager.getIcon("DockTabbedPane.close"));
          closeIcon.setPressedIcon(UIManager.getIcon("DockTabbedPane.close.pressed"));
          closeIcon.setRolloverIcon(UIManager.getIcon("DockTabbedPane.close.rollover"));
        } else {
          closeIcon.setIcon(UIManager.getIcon("DockTabbedPane.unselected_close"));
          closeIcon.setPressedIcon(UIManager.getIcon("DockTabbedPane.unselected_close.pressed"));
          closeIcon.setRolloverIcon(UIManager.getIcon("DockTabbedPane.unselected_close.rollover"));
        }
        icon.setSmartButton(0, closeIcon);
      }
    }
  }
View Full Code Here

Examples of com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon

    closeAction.setEnabled(key.isCloseEnabled());
    // add a tooltip
    closeAction.putValue(AbstractAction.SHORT_DESCRIPTION,
        UIManager.get("DockTabbedPane.closeButtonText"));
   
    final JTabbedPaneSmartIcon smartIcon = new JTabbedPaneSmartIcon(key.getIcon(), key.getName(),
        new SmartIconJButton[]{ closeIcon});
    smartIcon.setTooltipText(key.getTooltip());
    smartIcon.setIconForTabbedPane(this);
   
    if (tab >= getTabCount()){
      //addTab(key.getName(), key.getIcon(), (Component)dc, key.getTooltip());
      addTab("",smartIcon, (Component) dc, key.getTooltip());
      //addTab(key.getName(),smartIcon, (Component) dc, key.getTooltip());
View Full Code Here

Examples of com.vlsolutions.swing.tabbedpane.JTabbedPaneSmartIcon

    // this is an attempt to create the set of icons displayed for this dockable
    // currently, only "close" is managed, but other buttons could be added, as
    // the jTabebdPaneSmartIcon supports(simulates) many sub-buttons.
    if (icons.size()> 0){
      SmartIconJButton [] iconsArray = (SmartIconJButton[]) icons.toArray(new SmartIconJButton[0]);
      smartIcon = new JTabbedPaneSmartIcon(k.getIcon(), k.getName(), iconsArray);
      smartIcon.setIconForTabbedPane(tabHeader);
      tabHeader.addTab("", smartIcon, getDockable().getComponent());
    } else {
      tabHeader.addTab(k.getName(), k.getIcon(), getDockable().getComponent());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.