亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? joutlookbar.java

?? 精美開源Swing組件
?? JAVA
字號:
/**
 * L2FProd.com Common Components 7.3 License.
 *
 * Copyright 2005-2007 L2FProd.com
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.l2fprod.common.swing;

import com.l2fprod.common.swing.plaf.JOutlookBarAddon;
import com.l2fprod.common.swing.plaf.LookAndFeelAddons;
import com.l2fprod.common.swing.plaf.OutlookBarUI;

import java.awt.Color;
import java.awt.Component;
import java.util.Iterator;
import java.util.Map;
import java.util.WeakHashMap;

import javax.swing.Icon;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import javax.swing.UIManager;
import javax.swing.plaf.TabbedPaneUI;

/**
 * <code>JOutlookBar</code> brings the famous Outlook component to
 * Swing. The component shows stacks of components where only one
 * stack is visible at a time. <br>
 * 
 * The tab orientation of the {@link javax.swing.JTabbedPane}is
 * mapped to the JOutlookBar orientation as follow:
 * <ul>
 * <li>with JTabbedPane.TOP or JTabbedPane.BOTTOM, JOutlookBar will
 * layout the components horizontally
 * <li>with JTabbedPane.LEFT or JTabbedPane.RIGHT, JOutlookBar will
 * layout the components vertically (default)
 * </ul>
 * 
 * @javabean.class
 *          name="JOutlookBar"
 *          shortDescription="JOutlookBar brings the famous Outlook component to Swing"
 *          stopClass="javax.swing.JTabbedPane"
 * 
 * @javabean.icons
 *          mono16="JOutlookBar16-mono.gif"
 *          color16="JOutlookBar16.gif"
 *          mono32="JOutlookBar32-mono.gif"
 *          color32="JOutlookBar32.gif"
 */
public class JOutlookBar extends JTabbedPane {

  public static final String UI_CLASS_ID = "OutlookBarUI";
  
  static {
    LookAndFeelAddons.contribute(new JOutlookBarAddon());
  }

  /**
   * Used when generating PropertyChangeEvents for the "animated" property
   */
  public static final String ANIMATED_CHANGED_KEY = "animated";

  protected Map extendedPages;
  private boolean animated = true;
  
  /**
   *  
   */
  public JOutlookBar() {
    this(LEFT);
  }

  /**
   * @param tabPlacement
   */
  public JOutlookBar(int tabPlacement) {
    super(tabPlacement, WRAP_TAB_LAYOUT);
    extendedPages = new WeakHashMap();
    updateUI();
  }

  /**
   * Notification from the <code>UIManager</code> that the L&F has
   * changed. Replaces the current UI object with the latest version
   * from the <code>UIManager</code>.
   * 
   * @see javax.swing.JComponent#updateUI
   */
  public void updateUI() {
    setUI((OutlookBarUI)LookAndFeelAddons.getUI(this, OutlookBarUI.class));
  }

  /**
   * Sets the L&F object that renders this component.
   * 
   * @param ui the <code>OutlookBarUI</code> L&F object
   * @see javax.swing.UIDefaults#getUI
   * 
   * @beaninfo bound: true hidden: true description: The UI object
   *           that implements the buttonbar's LookAndFeel.
   */
  public void setUI(OutlookBarUI ui) {
    super.setUI((TabbedPaneUI)ui);
  }

  /**
   * Returns the name of the L&F class that renders this component.
   * 
   * @return the string {@link #UI_CLASS_ID}
   * @see javax.swing.JComponent#getUIClassID
   * @see javax.swing.UIDefaults#getUI
   */
  public String getUIClassID() {
    return UI_CLASS_ID;
  }

  /**
   * Enables or disables animation during tab transition.
   * 
   * @param animated
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setAnimated(boolean animated) {
    if (this.animated != animated) {
      this.animated = animated;
      firePropertyChange(ANIMATED_CHANGED_KEY, !animated, animated);
    }
  }
  
  /**
   * @return true if this taskpane is animated during expand/collapse
   *         transition.
   */
  public boolean isAnimated() {
    return animated;
  }

  /**
   * Builds a JScrollPane to hold the component. By default tabs are
   * not scrollable. They can be made scrollable by putting them in a
   * JScrollPane and adding the JScrollPane instead of the tab to the
   * JOutlookBar. It is recommended to use this method to create the
   * scrollbar as the UI may choose to return a JScrollPane specially
   * configured for the JOutlookBar component (ex. with different
   * scrollbars)
   * 
   * @param component
   * @return a JScrollPane with <code>component</code> as view
   */
  public JScrollPane makeScrollPane(Component component) {
    return ((OutlookBarUI)getUI()).makeScrollPane(component);
  }

  public void removeTabAt(int index) {
    checkIndex(index);
    removeExtendedPage(index);
    super.removeTabAt(index);
  }
  
  /**
   * Sets the title alignment for all tabs
   * 
   * @param alignment
   *          one of {@link javax.swing.SwingConstants#LEFT},
   *          {@link javax.swing.SwingConstants#CENTER},
   *          {@link javax.swing.SwingConstants#RIGHT}.
   */
  public void setAllTabsAlignment(int alignment) {
    for (Iterator iter = extendedPages.values().iterator(); iter.hasNext();) {
      ExtendedPage page = (ExtendedPage)iter.next();
      page.setTabAlignment(alignment);
    }
  }
  
  /**
   * Sets the title alignment of the tab at <code>index</code>
   * 
   * @param index
   * @param alignment
   *          one of {@link javax.swing.SwingConstants#LEFT},
   *          {@link javax.swing.SwingConstants#CENTER},
   *          {@link javax.swing.SwingConstants#RIGHT}.
   */
  public void setAlignmentAt(int index, int alignment) {
    getExtendedPage(index).setTabAlignment(alignment);
  }
  
  /**
   * @param index
   * @return the title alignment of the tab at <code>index</code>
   */
  public int getAlignmentAt(int index) {
    return getExtendedPage(index).getTabAlignment();   
  }

  /**
   * Overriden to notify the UI about the change
   */
  public void setTitleAt(int index, String title) {
    super.setTitleAt(index, title);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }

  /**
   * Overriden to notify the UI about the change
   */
  public void setIconAt(int index, Icon icon) {
    super.setIconAt(index, icon);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }

  public Color getBackgroundAt(int index) {
    return getExtendedPage(index).getBackground();
  }
  
  /**
   * Overriden to notify the UI about the change
   */
  public void setBackgroundAt(int index, Color background) {
    getExtendedPage(index).setBackground(background);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }

  public Color getForegroundAt(int index) {
    return getExtendedPage(index).getForeground();
  }
  
  /**
   * Overriden to notify the UI about the change
   */
  public void setForegroundAt(int index, Color foreground) {
    getExtendedPage(index).setForeground(foreground);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }

  /**
   * Overriden to notify the UI about the change
   */
  public void setToolTipTextAt(int index, String toolTipText) {
    super.setToolTipTextAt(index, toolTipText);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }

  /**
   * Overriden to notify the UI about the change
   */
  public void setDisplayedMnemonicIndexAt(int tabIndex, int mnemonicIndex) {
    super.setDisplayedMnemonicIndexAt(tabIndex, mnemonicIndex);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(tabIndex));
  }

  /**
   * Overriden to notify the UI about the change
   */
  public void setMnemonicAt(int index, int mnemonic) {
    super.setMnemonicAt(index, mnemonic);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }

  /**
   * Overriden to notify the UI about the change
   */
  public void setDisabledIconAt(int index, Icon disabledIcon) {
    super.setDisabledIconAt(index, disabledIcon);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }
  
  /**
   * Overriden to notify the UI about the change
   */
  public void setEnabledAt(int index, boolean enabled) {
    super.setEnabledAt(index, enabled);
    firePropertyChange("tabPropertyChangedAtIndex", null, new Integer(index));
  }
    
  protected void addImpl(Component comp, Object constraints, int index) {
    if (index != -1) {
      super.addImpl(comp, constraints, index);
    } else {
      // insertTab always add component at the end of the components array
      // however the look and feel classes of JOutlookBar expect the component
      // to be in the right order when it calls getComponents().
      // We must make sure the component gets inserted in the right place
      int pageIndex = indexOfComponent(comp);
      if (pageIndex == -1) {
        super.addImpl(comp, constraints, index);
      } else {
        // this is one of our component, attempt to insert it in the right
        // position
        super.addImpl(comp, constraints, pageIndex * 2);
      }
    }
  }
  
  protected void removeExtendedPage(int index) {
    Component component = getComponentAt(index);
    extendedPages.remove(component);
  }
  
  protected ExtendedPage getExtendedPage(int index) {
    checkIndex(index);

    Component component = getComponentAt(index);
    ExtendedPage page = (ExtendedPage)extendedPages.get(component);
    if (page == null) {
      page = new ExtendedPage();
      page.component = component;
      extendedPages.put(component, page);
    }
    return page;
  }

  private void checkIndex(int index) {
    if (index < 0 || index >= getTabCount()) {
      throw new IndexOutOfBoundsException(
      "Index: " + index + ", Tab count: " + getTabCount());
    }
  }

  private class ExtendedPage {
    Component component;

    int alignment = UIManager.getInt("OutlookBar.tabAlignment");
    Color background = null;
    Color foreground = null;
    
    public void setTabAlignment(int alignment) {
      if (this.alignment != alignment) {
        this.alignment = alignment;
        JOutlookBar.this.firePropertyChange("tabPropertyChangedAtIndex", null,
          new Integer(getIndex()));
      }
    }
    
    public int getIndex() {
      return indexOfComponent(component);
    }
    
    public int getTabAlignment() {
      return alignment;
    }

    public Color getBackground() {
      return background;
    }

    public void setBackground(Color background) {
      this.background = background;
    }

    public Color getForeground() {
      return foreground;
    }

    public void setForeground(Color foreground) {
      this.foreground = foreground;
    }
        
  }
  
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲日本在线看| 精品久久久久香蕉网| 亚洲日韩欧美一区二区在线| 99精品热视频| 亚洲美女屁股眼交| 欧美区一区二区三区| 美女任你摸久久| 国产蜜臀97一区二区三区| 99国内精品久久| 亚洲国产视频a| 日韩一区二区在线免费观看| 九九久久精品视频| 中文字幕一区二区三区色视频| 91免费视频观看| 日本午夜精品视频在线观看| 国产视频一区在线播放| 在线视频国内自拍亚洲视频| 麻豆成人久久精品二区三区红| 国产欧美日韩视频在线观看| 欧美色综合天天久久综合精品| 男女性色大片免费观看一区二区| 久久丝袜美腿综合| 日本国产一区二区| 国产一区啦啦啦在线观看| 亚洲一级不卡视频| 久久综合999| 欧美图区在线视频| 国产91清纯白嫩初高中在线观看| 亚洲一区二区三区自拍| 337p日本欧洲亚洲大胆色噜噜| 99精品热视频| 精品亚洲成av人在线观看| 亚洲精品网站在线观看| 欧美mv日韩mv国产网站| 91视频观看视频| 国产主播一区二区三区| 亚洲福利电影网| 国产精品国产精品国产专区不片| 日韩亚洲欧美一区| 欧美午夜精品一区| 成人动漫在线一区| 久久66热偷产精品| 午夜电影网亚洲视频| 亚洲免费看黄网站| 国产三级欧美三级日产三级99 | 亚洲欧洲日产国码二区| 欧美一卡二卡三卡四卡| 91国偷自产一区二区开放时间| 国产成人自拍网| 日韩国产在线观看| 一区二区三区在线观看视频| 国产精品久久午夜| 久久这里只有精品首页| 日韩美女主播在线视频一区二区三区| 色噜噜夜夜夜综合网| 成人国产精品视频| 国产精品一区2区| 国精产品一区一区三区mba视频 | 精品一区精品二区高清| 亚洲综合一二三区| 亚洲精品国产a久久久久久 | 一本大道av伊人久久综合| 高清不卡一区二区在线| 国产乱码精品一区二区三区忘忧草| 日韩不卡一区二区三区| 爽好多水快深点欧美视频| 亚洲一区二区三区影院| 亚洲精选在线视频| 亚洲女性喷水在线观看一区| 一区在线观看免费| 国产精品麻豆视频| 中文字幕一区二区三区在线不卡 | 欧美美女直播网站| 欧美色综合影院| 欧美视频在线不卡| 九九在线精品视频| 国产精品综合一区二区三区| 国产精品自拍毛片| 成人激情免费网站| 91女厕偷拍女厕偷拍高清| 日韩精品一区二区三区在线| 欧美日韩一区二区电影| 欧美日韩国产高清一区| 欧美欧美欧美欧美首页| 欧美不卡一区二区三区| 久久久久99精品一区| 国产日韩影视精品| 国产欧美一二三区| 18欧美亚洲精品| 亚洲一区免费视频| 水蜜桃久久夜色精品一区的特点| 日韩高清在线观看| 国产伦理精品不卡| 不卡一卡二卡三乱码免费网站| 97se亚洲国产综合自在线| 色域天天综合网| 91精品国产综合久久精品性色 | 国产精品一区二区无线| 国产成人精品免费在线| 不卡的电影网站| 欧美性大战xxxxx久久久| 日韩女优av电影在线观看| 欧美国产一区二区| 亚洲一区二区三区中文字幕在线| 麻豆国产欧美日韩综合精品二区| 国产精品1区二区.| 欧美日韩中字一区| 久久男人中文字幕资源站| 亚洲精品欧美二区三区中文字幕| 日韩精品久久理论片| 懂色av一区二区三区蜜臀| 欧美三级韩国三级日本三斤| 欧美va亚洲va| 一区二区三区日韩欧美| 久久99国产精品久久99| 在线看国产日韩| 欧美精品一区二区三区在线播放| 亚洲视频免费在线观看| 久久国产综合精品| 欧美亚日韩国产aⅴ精品中极品| 精品少妇一区二区| 一区二区三区电影在线播| 久久99九九99精品| 欧美午夜在线一二页| 国产精品美女一区二区| 日本美女一区二区| 色香蕉成人二区免费| 久久久久综合网| 奇米色777欧美一区二区| 一本一道久久a久久精品| 久久夜色精品一区| 天天爽夜夜爽夜夜爽精品视频| 波多野洁衣一区| 久久亚洲综合色| 日本在线播放一区二区三区| 91成人网在线| 国产精品二三区| 国产精品夜夜嗨| 精品国产乱码久久久久久夜甘婷婷 | 日日欢夜夜爽一区| 色偷偷久久人人79超碰人人澡| 久久亚区不卡日本| 蜜桃精品在线观看| 在线不卡一区二区| 亚洲香蕉伊在人在线观| 99精品欧美一区二区蜜桃免费| 久久久久久久久久久久久女国产乱 | 一区二区三区.www| 99热这里都是精品| 国产精品盗摄一区二区三区| 国产一区二区免费看| 精品嫩草影院久久| 青草国产精品久久久久久| 欧美精品自拍偷拍| 国产一区二区三区免费| 在线播放亚洲一区| 午夜精品福利视频网站| 欧洲亚洲国产日韩| 亚洲综合在线免费观看| 日本道免费精品一区二区三区| 国产精品二三区| 91久久一区二区| 一级日本不卡的影视| 欧美又粗又大又爽| 亚洲午夜三级在线| 欧美人狂配大交3d怪物一区| 婷婷国产v国产偷v亚洲高清| 91 com成人网| 日本三级韩国三级欧美三级| 日韩精品中午字幕| 国产美女娇喘av呻吟久久| 国产视频亚洲色图| 99国产精品国产精品毛片| 综合av第一页| 欧美色老头old∨ideo| 亚洲sss视频在线视频| 日韩一区国产二区欧美三区| 久久99精品久久久久| 国产亚洲成aⅴ人片在线观看 | jiyouzz国产精品久久| 中文字幕一区二区三区不卡在线| 91麻豆精品在线观看| 一区二区三区国产豹纹内裤在线| 欧美久久久久久久久久| 麻豆高清免费国产一区| 欧美激情一区二区三区| 色呦呦国产精品| 日韩国产精品大片| 久久久久久久久伊人| 色综合久久精品| 欧美a级一区二区| 亚洲国产精品ⅴa在线观看| 色婷婷精品久久二区二区蜜臂av | 欧美精品在线观看播放| 久久99九九99精品| 国产精品毛片a∨一区二区三区| 欧美熟乱第一页| 国产成人在线免费观看| 亚洲综合免费观看高清完整版在线| 8x8x8国产精品|