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

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

?? jtaskpanegroup.java

?? java swing控件
?? JAVA
字號:
/**
 * L2FProd.com Common Components 6.9.1 License.
 *
 * Copyright 2005-2006 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.JTaskPaneGroupAddon;
import com.l2fprod.common.swing.plaf.LookAndFeelAddons;
import com.l2fprod.common.swing.plaf.TaskPaneGroupUI;

import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.LayoutManager;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;

import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.UIManager;

/**
 * <code>JTaskPaneGroup</code> is a container for tasks and other
 * arbitrary components.
 * 
 * <p>
 * Several <code>JTaskPaneGroup</code>s are usually grouped together within a
 * {@link JTaskPane}. However it is not mandatory
 * to use a JTaskPane as the parent for JTaskPaneGroup. The JTaskPaneGroup can
 * be added to any other container. See
 * {@link JTaskPane} to understand the benefits of
 * using it as the parent container.
 * 
 * <p>
 * <code>JTaskPaneGroup</code> provides control to expand and
 * collapse the content area in order to show or hide the task list. It can have an
 * <code>icon</code>, a <code>title</code> and can be marked as
 * <code>special</code>. Marking a <code>JTaskPaneGroup</code> as
 * <code>special</code> is only a hint for the pluggable UI which
 * will usually paint it differently (by example by using another
 * color for the border of the pane).
 * 
 * <p> 
 * When the JTaskPaneGroup is expanded or collapsed, it will be
 * animated with a fade effect. The animated can be disabled on a per
 * component basis through {@link #setAnimated(boolean)}.
 * 
 * To disable the animation for all newly created <code>JTaskPaneGroup</code>,
 * use the UIManager property:
 * <code>UIManager.put("TaskPaneGroup.animate", Boolean.FALSE);</code>.
 * 
 * <p>
 * Example:
 * <pre>
 * <code>
 * JXFrame frame = new JXFrame();
 * 
 * // a container to put all JTaskPaneGroup together
 * JTaskPane taskPaneContainer = new JTaskPane();
 * 
 * // create a first taskPane with common actions
 * JTaskPaneGroup actionPane = new JTaskPaneGroup();
 * actionPane.setTitle("Files and Folders");
 * actionPane.setSpecial(true);
 * 
 * // actions can be added, an hyperlink will be created
 * Action renameSelectedFile = createRenameFileAction();
 * actionPane.add(renameSelectedFile);
 * actionPane.add(createDeleteFileAction());
 * 
 * // add this taskPane to the taskPaneContainer
 * taskPaneContainer.add(actionPane);
 * 
 * // create another taskPane, it will show details of the selected file
 * JTaskPaneGroup details = new JTaskPaneGroup();
 * details.setTitle("Details");
 *  
 * // add standard components to the details taskPane
 * JLabel searchLabel = new JLabel("Search:");
 * JTextField searchField = new JTextField("");
 * details.add(searchLabel);
 * details.add(searchField);
 * 
 * taskPaneContainer.add(details);
 * 
 * // put the action list on the left 
 * frame.add(taskPaneContainer, BorderLayout.EAST);
 * 
 * // and a file browser in the middle
 * frame.add(fileBrowser, BorderLayout.CENTER);
 * 
 * frame.pack().
 * frame.setVisible(true);
 * </code>
 * </pre>
 * 
 * @see JTaskPane
 * @see JCollapsiblePane
 * @author <a href="mailto:fred@L2FProd.com">Frederic Lavigne</a>
 * 
 * @javabean.attribute
 *          name="isContainer"
 *          value="Boolean.TRUE"
 *          rtexpr="true"
 *          
 * @javabean.attribute
 *          name="containerDelegate"
 *          value="getContentPane"
 *          
 * @javabean.class
 *          name="JTaskPaneGroup"
 *          shortDescription="JTaskPaneGroup is a container for tasks and other arbitrary components."
 *          stopClass="java.awt.Component"
 * 
 * @javabean.icons
 *          mono16="JTaskPaneGroup16-mono.gif"
 *          color16="JTaskPaneGroup16.gif"
 *          mono32="JTaskPaneGroup32-mono.gif"
 *          color32="JTaskPaneGroup32.gif"
 */
public class JTaskPaneGroup extends JPanel implements
  JCollapsiblePane.JCollapsiblePaneContainer {

  public final static String UI_CLASS_ID = "TaskPaneGroupUI";
  
  // ensure at least the default ui is registered
  static {
    LookAndFeelAddons.contribute(new JTaskPaneGroupAddon());
  }

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

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

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

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

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

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

  private String title;
  private Icon icon;
  private boolean special;
  private boolean expanded = true;
  private boolean scrollOnExpand;

  private JCollapsiblePane collapsePane;
  
  /**
   * Creates a new empty <code>JTaskPaneGroup</code>.
   */
  public JTaskPaneGroup() {
    collapsePane = new JCollapsiblePane();
    super.setLayout(new BorderLayout(0, 0));
    super.addImpl(collapsePane, BorderLayout.CENTER, -1);
    
    updateUI();
    setFocusable(true);
    setOpaque(false);

    // disable animation if specified in UIManager
    setAnimated(!Boolean.FALSE.equals(UIManager.get("TaskPaneGroup.animate")));
    
    // listen for animation events and forward them to registered listeners
    collapsePane.addPropertyChangeListener(
      JCollapsiblePane.ANIMATION_STATE_KEY, new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent evt) {
          JTaskPaneGroup.this.firePropertyChange(evt.getPropertyName(), evt
            .getOldValue(), evt.getNewValue());
        }
      });
  }

  /**
   * Returns the contentPane object for this JTaskPaneGroup.
   * @return the contentPane property
   */
  public Container getContentPane() {
    return collapsePane.getContentPane();
  }
  
  /**
   * 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() {
    // collapsePane is null when updateUI() is called by the "super()"
    // constructor
    if (collapsePane == null) {
      return;
    }
    setUI((TaskPaneGroupUI)LookAndFeelAddons.getUI(this, TaskPaneGroupUI.class));
  }
  
  /**
   * Sets the L&F object that renders this component.
   * 
   * @param ui the <code>TaskPaneGroupUI</code> L&F object
   * @see javax.swing.UIDefaults#getUI
   * 
   * @beaninfo bound: true hidden: true description: The UI object that
   * implements the taskpane group's LookAndFeel.
   */
  public void setUI(TaskPaneGroupUI ui) {
    super.setUI(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;
  }

  /**
   * Returns the title currently displayed in the border of this pane.
   * 
   * @since 0.2
   * @return the title currently displayed in the border of this pane
   */
  public String getTitle() {
    return title;
  }

  /**
   * Sets the title to be displayed in the border of this pane.
   * 
   * @since 0.2
   * @param title the title to be displayed in the border of this pane
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setTitle(String title) {
    String old = title;
    this.title = title;
    firePropertyChange(TITLE_CHANGED_KEY, old, title);
  }

  /**
   * @param text
   * @deprecated
   * @see #setTitle(String)
   */
  public void setText(String text) {
    setTitle(text);
  }
  
  /**
   * @deprecated
   * @see #getTitle()
   */
  public String getText() {
    return getTitle();
  }
  
  /**
   * Returns the icon currently displayed in the border of this pane.
   * 
   * @return the icon currently displayed in the border of this pane
   */
  public Icon getIcon() {
    return icon;
  }

  /**
   * Sets the icon to be displayed in the border of this pane. Some pluggable
   * UIs may impose size constraints for the icon. A size of 16x16 pixels is
   * the recommended icon size.
   * 
   * @param icon the icon to be displayed in the border of this pane
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setIcon(Icon icon) {
    Icon old = icon;
    this.icon = icon;
    firePropertyChange(ICON_CHANGED_KEY, old, icon);
  }

  /**
   * Returns true if this pane is "special".
   * 
   * @return true if this pane is "special"
   */
  public boolean isSpecial() {
    return special;
  }

  /**
   * Sets this pane to be "special" or not.
   * 
   * @param special true if this pane is "special", false otherwise
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setSpecial(boolean special) {
    if (this.special != special) {
      this.special = special;
      firePropertyChange(SPECIAL_CHANGED_KEY, !special, special);
    }
  }

  /**
   * Should this group be scrolled to be visible on expand.
   * 
   * 
   * @param scrollOnExpand true to scroll this group to be
   * visible if this group is expanded.
   * 
   * @see #setExpanded(boolean)
   * 
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setScrollOnExpand(boolean scrollOnExpand) {
    if (this.scrollOnExpand != scrollOnExpand) {
      this.scrollOnExpand = scrollOnExpand;
      firePropertyChange(SCROLL_ON_EXPAND_CHANGED_KEY,
        !scrollOnExpand, scrollOnExpand);
    }
  }
  
  /**
   * Should this group scroll to be visible after
   * this group was expanded.
   * 
   * @return true if we should scroll false if nothing
   * should be done.
   */
  public boolean isScrollOnExpand() {
    return scrollOnExpand;
  }
  
  /**
   * Expands or collapses this group.
   * 
   * @param expanded true to expand the group, false to collapse it
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setExpanded(boolean expanded) {
    if (this.expanded != expanded) {
      this.expanded = expanded;
      collapsePane.setCollapsed(!expanded);
      firePropertyChange(EXPANDED_CHANGED_KEY, !expanded, expanded);
    }
  }

  /**
   * Returns true if this taskpane is expanded, false if it is collapsed.
   * 
   * @return true if this taskpane is expanded, false if it is collapsed.
   */
  public boolean isExpanded() {
    return expanded;
  }

  /**
   * Enables or disables animation during expand/collapse transition.
   * 
   * @param animated
   * @javabean.property
   *          bound="true"
   *          preferred="true"
   */
  public void setAnimated(boolean animated) {
    if (isAnimated() != animated) {
      collapsePane.setAnimated(animated);
      firePropertyChange(ANIMATED_CHANGED_KEY, !isAnimated(), isAnimated());
    }
  }
  
  /**
   * Returns true if this taskpane is animated during expand/collapse
   * transition.
   * 
   * @return true if this taskpane is animated during expand/collapse
   *         transition.
   */
  public boolean isAnimated() {
    return collapsePane.isAnimated();
  }
  
  /**
   * Adds an action to this <code>JTaskPaneGroup</code>. Returns a
   * component built from the action. The returned component has been
   * added to the <code>JTaskPaneGroup</code>.
   * 
   * @param action
   * @return a component built from the action
   */
  public Component add(Action action) {
    Component c = ((TaskPaneGroupUI)ui).createAction(action);
    add(c);
    return c;
  }

  public Container getValidatingContainer() {
    return getParent();
  }
  
  /**
   * Overriden to redirect call to the content pane.
   */
  protected void addImpl(Component comp, Object constraints, int index) {
    getContentPane().add(comp, constraints, index);
  }

  /**
   * Overriden to redirect call to the content pane.
   */
  public void setLayout(LayoutManager mgr) {
    if (collapsePane != null) {
      getContentPane().setLayout(mgr);
    }
  }
  
  /**
   * Overriden to redirect call to the content pane
   */
  public void remove(Component comp) {
    getContentPane().remove(comp);
  }

  /**
   * Overriden to redirect call to the content pane.
   */
  public void remove(int index) {
    getContentPane().remove(index);
  }
  
  /**
   * Overriden to redirect call to the content pane.
   */
  public void removeAll() {
    getContentPane().removeAll();
  }
  
  /**
   * @see JComponent#paramString()
   */
  protected String paramString() {
    return super.paramString()
      + ",title="
      + getTitle()
      + ",icon="
      + getIcon()
      + ",expanded="
      + String.valueOf(isExpanded())
      + ",special="
      + String.valueOf(isSpecial())
      + ",scrollOnExpand=" 
      + String.valueOf(isScrollOnExpand())
      + ",ui=" + getUI();
  }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产一区| 欧美国产成人精品| 亚洲最大成人综合| 在线视频欧美精品| 亚洲日本在线观看| 91同城在线观看| 亚洲欧美另类小说视频| 色视频成人在线观看免| 亚洲国产精品人人做人人爽| 欧美日韩久久不卡| 日本在线播放一区二区三区| 91精品中文字幕一区二区三区| 国产精品1区2区3区在线观看| 7777精品久久久大香线蕉 | 91精品在线麻豆| 免费的成人av| 国产精品卡一卡二卡三| 91激情五月电影| 美女视频黄a大片欧美| 欧美精品一区二区三区视频| 成人精品在线视频观看| 一区二区久久久久| 精品久久久久久久久久久院品网| 国产成人免费视频| 亚洲第一电影网| 国产亚洲欧美在线| 97se亚洲国产综合自在线不卡 | 蜜桃视频在线一区| 久久久久国产精品麻豆| 91小视频在线观看| 日韩精品一区二| 国产蜜臀97一区二区三区| 成人动漫一区二区| 丝袜美腿亚洲综合| 久久精品亚洲麻豆av一区二区| av亚洲精华国产精华| 日韩va欧美va亚洲va久久| 国产欧美日本一区视频| 9191久久久久久久久久久| 成人国产免费视频| 91超碰这里只有精品国产| 亚洲一区二区中文在线| 国产成人亚洲综合a∨猫咪| 亚洲综合区在线| 久久毛片高清国产| 在线播放中文一区| 色哟哟国产精品| 成人成人成人在线视频| 亚洲va欧美va天堂v国产综合| 欧美乱熟臀69xxxxxx| 福利电影一区二区| 久久成人久久爱| 婷婷丁香久久五月婷婷| 亚洲婷婷国产精品电影人久久| 欧美成人性战久久| 91精品国产91久久久久久最新毛片| 99国产欧美另类久久久精品 | 777a∨成人精品桃花网| 色播五月激情综合网| 福利一区二区在线| 国产中文字幕一区| 国产最新精品精品你懂的| 日本aⅴ精品一区二区三区| 亚洲综合一区二区| 亚洲精品成人悠悠色影视| 国产精品白丝在线| 最新中文字幕一区二区三区| 国产日韩精品一区二区三区在线| 激情成人综合网| 亚洲欧美一区二区三区国产精品| 久久精品久久精品| 亚洲成人中文在线| 伊人婷婷欧美激情| 亚洲一线二线三线视频| 亚洲免费观看高清完整版在线| 国产精品少妇自拍| 久久久亚洲精品石原莉奈| 精品国产免费一区二区三区四区 | 成人av先锋影音| 国产成人av网站| 国产91富婆露脸刺激对白| 国产乱人伦偷精品视频不卡| 久久99久久精品| 国产白丝网站精品污在线入口| 国产精品一二一区| 成人精品一区二区三区四区 | 成人高清视频在线观看| 精品国产免费一区二区三区香蕉| 欧美日精品一区视频| 久久99国产精品久久| 美女视频黄a大片欧美| 麻豆专区一区二区三区四区五区| 美国毛片一区二区三区| 国产在线精品免费| 国产99久久久国产精品| 丁香婷婷综合网| 99久久综合狠狠综合久久| 不卡高清视频专区| 欧美在线|欧美| 日韩欧美精品在线视频| 久久久亚洲综合| 亚洲精品第一国产综合野| 五月天亚洲婷婷| 国产伦精品一区二区三区免费迷| 国产成人小视频| 91豆麻精品91久久久久久| 欧美一区二区三区男人的天堂| 欧美不卡123| 日本高清视频一区二区| 欧美男男青年gay1069videost| 日韩视频一区二区三区在线播放| 国产日韩在线不卡| 亚洲一区自拍偷拍| 国产黄色成人av| 欧美电影影音先锋| 国产精品久久久久久久久快鸭 | 日韩欧美国产成人一区二区| 久久久精品蜜桃| 亚洲成在人线在线播放| 国产精品资源网| 欧美日韩精品系列| 国产精品免费久久久久| 日韩成人av影视| 色一区在线观看| 精品成人a区在线观看| 亚洲精品老司机| 国产在线国偷精品免费看| 91在线你懂得| 欧美岛国在线观看| 亚洲综合色成人| 成人黄色777网| 精品欧美一区二区久久| 夜色激情一区二区| 成人精品国产一区二区4080| 欧美日韩精品一区视频| 久久精品夜夜夜夜久久| 日精品一区二区三区| eeuss鲁片一区二区三区| 日韩欧美国产电影| 日韩中文字幕一区二区三区| 大白屁股一区二区视频| 91精品国产品国语在线不卡| 一区二区不卡在线播放| 成人av在线一区二区三区| 久久影视一区二区| 蜜桃在线一区二区三区| 欧美亚洲另类激情小说| 国产精品网站导航| 国产成人精品免费网站| 日韩免费在线观看| 亚洲一区在线观看网站| 国产成人免费视频网站| 久久青草国产手机看片福利盒子| 日韩国产在线一| 欧美日韩视频在线第一区 | 日韩欧美一二三| 亚洲福利视频一区| 色综合久久88色综合天天| 亚洲欧洲av在线| 国产精品综合一区二区三区| 日韩视频免费观看高清完整版| 国产精品福利一区二区三区| 国产成人免费视频网站| 久久久不卡网国产精品二区| 精品一区二区成人精品| 欧美一区二区三区在线看| 亚洲va中文字幕| 欧美性xxxxx极品少妇| 一区二区三区四区高清精品免费观看| av不卡在线播放| 一区二区三区日韩| 欧美日韩亚洲综合一区二区三区| 亚洲午夜视频在线| 在线播放中文一区| 狠狠色丁香久久婷婷综合_中| 日韩视频中午一区| 黑人巨大精品欧美一区| 久久久天堂av| a4yy欧美一区二区三区| 亚洲一区影音先锋| 欧美日韩精品系列| 精品一区二区三区在线视频| 久久众筹精品私拍模特| 成人高清伦理免费影院在线观看| 中文字幕乱码日本亚洲一区二区| 成人激情动漫在线观看| 亚洲欧美另类小说| 欧美久久一二三四区| 美女一区二区视频| 国产精品午夜电影| 欧美性色综合网| 精品一区二区三区在线观看国产 | 99视频在线精品| 亚洲午夜激情av| 91麻豆精品国产91久久久久| 国产一区在线观看视频| 亚洲欧洲另类国产综合| 欧美日韩亚洲综合一区| 久久精品国产成人一区二区三区| 欧美国产精品劲爆|