⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 compoundskin.java

📁 JAVA皮肤设计,很不错的!!现与大家共同学习
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
   * Description of the Class   *   * @author    fred   * @created   27 avril 2002   */  private class CompoundSlider extends CompoundComponent implements SkinSlider {    /**     * Gets the PreferredSize attribute of the CompoundSlider object     *     * @param slider  Description of Parameter     * @return        The PreferredSize value     */    public Dimension getPreferredSize(JSlider slider,                                      java.awt.Dimension uiPreferredSize) {      Dimension dimension = null;      if (skina.getSlider() != null) {        dimension = skina.getSlider().getPreferredSize(slider, uiPreferredSize);      }      if ((dimension == null) && (skinb.getSlider() != null)) {        dimension = skinb.getSlider().getPreferredSize(slider, uiPreferredSize);      }      return dimension;    }    /**     * Gets the PreferredSize attribute of the CompoundSlider object     *     * @param slider  Description of Parameter     * @return        The PreferredSize value     */    public Dimension getThumbSize(JSlider slider) {      Dimension dimension = null;      if (skina.getSlider() != null) {        dimension = skina.getSlider().getThumbSize(slider);      }      if ((dimension == null) && (skinb.getSlider() != null)) {        dimension = skinb.getSlider().getThumbSize(slider);      }      return dimension;    }    /**     * Description of the Method     *     * @return   Description of the Returned Value     */    public boolean status() {      boolean result = false;      if (skina.getSlider() != null) {        result = skina.getSlider().status();      }      if (!result && (skinb.getSlider() != null)) {        result = skinb.getSlider().status();      }      return result;    }    /**     * Description of the Method     *     * @param c  Description of Parameter     * @return   Description of the Returned Value     */    public boolean installSkin(JComponent c) {      boolean result = false;      if (skina.getSlider() != null) {        result = skina.getSlider().installSkin(c);      }      if (!result && (skinb.getSlider() != null)) {        result = skinb.getSlider().installSkin(c);      }      return result;    }    /**     * Description of the Method     *     * @param g            Description of Parameter     * @param slider       Description of Parameter     * @param trackBounds  Description of Parameter     * @return             Description of the Returned Value     */    public boolean paintTrack(Graphics g, JSlider slider, Rectangle trackBounds) {      boolean result = false;      if (skina.getSlider() != null) {        result = skina.getSlider().paintTrack(g, slider, trackBounds);      }      if (!result && (skinb.getSlider() != null)) {        result = skinb.getSlider().paintTrack(g, slider, trackBounds);      }      return result;    }    /**     * Description of the Method     *     * @param g            Description of Parameter     * @param slider       Description of Parameter     * @param thumbBounds  Description of Parameter     * @return             Description of the Returned Value     */    public boolean paintThumb(Graphics g, JSlider slider, Rectangle thumbBounds) {      boolean result = false;      if (skina.getSlider() != null) {        result = skina.getSlider().paintThumb(g, slider, thumbBounds);      }      if (!result && (skinb.getSlider() != null)) {        result = skinb.getSlider().paintThumb(g, slider, thumbBounds);      }      return result;    }  }  /**   * Description of the Class   *   * @author    fred   * @created   27 avril 2002   */  private class CompoundSeparator extends CompoundComponent implements SkinSeparator {    public boolean paint(java.awt.Graphics g, javax.swing.JSeparator separator) {      boolean result = false;      if (skina.getSeparator() != null) {        result = skina.getSeparator().paint(g, separator);      }      if (!result && (skinb.getSeparator() != null)) {        result = skinb.getSeparator().paint(g, separator);      }      return result;    }    public java.awt.Dimension getPreferredSize(javax.swing.JSeparator separator,                                               java.awt.Dimension uiPreferredSize) {      Dimension dimension = null;      if (skina.getSeparator() != null) {        dimension = skina.getSeparator().getPreferredSize(separator,                                                          uiPreferredSize);      }      if ((dimension == null) && (skinb.getSlider() != null)) {        dimension = skinb.getSeparator().getPreferredSize(separator,                                                          uiPreferredSize);      }      return dimension;    }    /**     * Description of the Method     *     * @return   Description of the Returned Value     */    public boolean status() {      boolean result = false;      if (skina.getSeparator() != null) {        result = skina.getSeparator().status();      }      if (!result && (skinb.getSeparator() != null)) {        result = skinb.getSeparator().status();      }      return result;    }    /**     * Description of the Method     *     * @param c  Description of Parameter     * @return   Description of the Returned Value     */    public boolean installSkin(JComponent c) {      boolean result = false;      if (skina.getSeparator() != null) {        result = skina.getSeparator().installSkin(c);      }      if (!result && (skinb.getSeparator() != null)) {        result = skinb.getSeparator().installSkin(c);      }      return result;    }  }  /**   * Description of the Class   *   * @author    fred   * @created   27 avril 2002   */  private class CompoundSplitPane extends CompoundComponent implements SkinSplitPane {    /**     * Gets the ArrowPreferredSize attribute of the CompoundSplitPane object     *     * @param direction  Description of Parameter     * @return           The ArrowPreferredSize value     */    public Dimension getArrowPreferredSize(int direction) {      Dimension dimension = null;      if (skina.getSplitPane() != null) {        dimension = skina.getSplitPane().getArrowPreferredSize(direction);      }      if ((dimension == null) && (skinb.getSplitPane() != null)) {        dimension = skinb.getSplitPane().getArrowPreferredSize(direction);      }      return dimension;    }    /**     * Gets the PreferredSize attribute of the CompoundSplitPane object     *     * @param splitpane  Description of Parameter     * @return           The PreferredSize value     */    public Dimension getPreferredSize(JSplitPane splitpane) {      Dimension dimension = null;      if (skina.getSplitPane() != null) {        dimension = skina.getSplitPane().getPreferredSize(splitpane);      }      if ((dimension == null) && (skinb.getSplitPane() != null)) {        dimension = skinb.getSplitPane().getPreferredSize(splitpane);      }      return dimension;    }    /**     * Description of the Method     *     * @return   Description of the Returned Value     */    public boolean status() {      boolean result = false;      if (skina.getSplitPane() != null) {        result = skina.getSplitPane().status();      }      if (!result && (skinb.getSplitPane() != null)) {        result = skinb.getSplitPane().status();      }      return result;    }    /**     * Description of the Method     *     * @param c  Description of Parameter     * @return   Description of the Returned Value     */    public boolean installSkin(JComponent c) {      boolean result = false;      if (skina.getSplitPane() != null) {        result = skina.getSplitPane().installSkin(c);      }      if (!result && (skinb.getSplitPane() != null)) {        result = skinb.getSplitPane().installSkin(c);      }      return result;    }    /**     * Description of the Method     *     * @param g          Description of Parameter     * @param b          Description of Parameter     * @param direction  Description of Parameter     * @return           Description of the Returned Value     */    public boolean paintArrow(Graphics g, AbstractButton b, int direction) {      boolean result = false;      if (skina.getSplitPane() != null) {        result = skina.getSplitPane().paintArrow(g, b, direction);      }      if (!result && (skinb.getSplitPane() != null)) {        result = skinb.getSplitPane().paintArrow(g, b, direction);      }      return result;    }    /**     * Description of the Method     *     * @param g          Description of Parameter     * @param splitpane  Description of Parameter     * @param d          Description of Parameter     * @return           Description of the Returned Value     */    public boolean paintGutter(Graphics g, JSplitPane splitpane, Dimension d) {      boolean result = false;      if (skina.getSplitPane() != null) {        result = skina.getSplitPane().paintGutter(g, splitpane, d);      }      if (!result && (skinb.getSplitPane() != null)) {        result = skinb.getSplitPane().paintGutter(g, splitpane, d);      }      return result;    }    /**     * Description of the Method     *     * @param g          Description of Parameter     * @param splitpane  Description of Parameter     * @param d          Description of Parameter     * @return           Description of the Returned Value     */    public boolean paintThumb(Graphics g, JSplitPane splitpane, Dimension d) {      boolean result = false;      if (skina.getSplitPane() != null) {        result = skina.getSplitPane().paintThumb(g, splitpane, d);      }      if (!result && (skinb.getSplitPane() != null)) {        result = skinb.getSplitPane().paintThumb(g, splitpane, d);      }      return result;    }  }  /**   * Description of the Class   *   * @author    fred   * @created   27 avril 2002   */  private class CompoundTab extends CompoundComponent implements SkinTab {    /**     * Description of the Method     *     * @return   Description of the Returned Value     */    public boolean status() {      boolean result = false;      if (skina.getTab() != null) {        result = skina.getTab().status();      }      if (!result && (skinb.getTab() != null)) {        result = skinb.getTab().status();      }      return result;    }    /**     * Description of the Method     *     * @param c  Description of Parameter     * @return   Description of the Returned Value     */    public boolean installSkin(JComponent c) {      boolean result = false;      if (skina.getTab() != null) {        result = skina.getTab().installSkin(c);      }      if (!result && (skinb.getTab() != null)) {        result = skinb.getTab().installSkin(c);      }      return result;    }    /**     * Description of the Method     *     * @param g             Description of Parameter     * @param tabPlacement  Description of Parameter     * @param isSelected    Description of Parameter     * @param x             Description of Parameter     * @param y             Description of Parameter     * @param w             Description of Parameter     * @param h             Description of Parameter     * @return              Description of the Returned Value     */    public boolean paintTab(Graphics g, int tabPlacement,        boolean isSelected, int x, int y, int w, int h) {      boolean result = false;      if (skina.getTab() != null) {        result = skina.getTab().paintTab(g, tabPlacement, isSelected, x, y, w, h);      }      if (!result && (skinb.getTab() != null)) {        result = skinb.getTab().paintTab(g, tabPlacement, isSelected, x, y, w, h);      }      return result;    }    /**     * Description of the Method     *     * @param g              Description of Parameter     * @param tabPlacement   Description of Parameter     * @param selectedIndex  Description of Parameter     * @param x              Description of Parameter     * @param y              Description of Parameter     * @param w              Description of Parameter     * @param h              Description of Parameter     * @return               Description of the Returned Value     */    public boolean paintContent(java.awt.Graphics g, int tabPlacement, int selectedIndex,        int x, int y, int w, int h) {      boolean result = false;      if (skina.getTab() != null) {        result = skina.getTab().paintContent(g, tabPlacement, selectedIndex, x, y, w, h);      }      if (!result && (skinb.getTab() != null)) {        result = skinb.getTab().paintContent(g, tabPlacement, selectedIndex, x, y, w, h);      }      return result;    }    public boolean paintGap(java.awt.Graphics g, int tabPlacement, int selectedIndex, int x, int y, int w, int h) {      boolean result = false;      if (skina.getTab() != null) {        result = skina.getTab().paintGap(g, tabPlacement, selectedIndex, x, y, w, h);      }      if (!result && (skinb.getTab() != null)) {        result = skinb.getTab().paintGap(g, tabPlacement, selectedIndex, x, y, w, h);      }      return result;    }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -