Package org.pushingpixels.substance.internal.utils.icon

Examples of org.pushingpixels.substance.internal.utils.icon.TransitionAwareIcon$ColorSchemeAssociationKindDelegate


            this.rootPaneUI.installBorder(rootPane);
          }
        }
        if (frame.isResizable()) {
          if ((state & Frame.MAXIMIZED_BOTH) != 0) {
            Icon restoreIcon = new TransitionAwareIcon(
                this.toggleButton,
                new TransitionAwareIcon.Delegate() {
                  public Icon getColorSchemeIcon(
                      SubstanceColorScheme scheme) {
                    return SubstanceIconFactory
                        .getTitlePaneIcon(
                            SubstanceIconFactory.IconKind.RESTORE,
                            scheme,
                            SubstanceCoreUtilities
                                .getSkin(
                                    rootPane)
                                .getBackgroundColorScheme(
                                    DecorationAreaType.PRIMARY_TITLE_PANE));
                  }
                }, "substance.titlePane.restoreIcon");
            this
                .updateToggleButton(this.restoreAction,
                    restoreIcon);
            this.toggleButton.setToolTipText(SubstanceCoreUtilities
                .getResourceBundle(rootPane).getString(
                    "SystemMenu.restore"));
            this.maximizeAction.setEnabled(false);
            this.restoreAction.setEnabled(true);
          } else {
            Icon maxIcon = new TransitionAwareIcon(
                this.toggleButton,
                new TransitionAwareIcon.Delegate() {
                  public Icon getColorSchemeIcon(
                      SubstanceColorScheme scheme) {
                    return SubstanceIconFactory
View Full Code Here


   * @see javax.swing.plaf.basic.BasicTabbedPaneUI#createScrollButton(int)
   */
  @Override
  protected JButton createScrollButton(final int direction) {
    SubstanceScrollButton ssb = new SubstanceScrollButton(direction);
    Icon icon = new TransitionAwareIcon(ssb,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            // fix for defect 279 - tab pane might not yet have the
            // font installed.
            int fontSize = SubstanceSizeUtils
View Full Code Here

  protected void setButtonIcons() {
    super.setButtonIcons();
    if (!SubstanceLookAndFeel.isCurrentLookAndFeel())
      return;

    Icon restoreIcon = new TransitionAwareIcon(this.maxButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return SubstanceIconFactory
                .getTitlePaneIcon(
                    SubstanceIconFactory.IconKind.RESTORE,
                    scheme,
                    SubstanceCoreUtilities
                        .getSkin(
                            SubstanceInternalFrameTitlePane.this)
                        .getBackgroundColorScheme(
                            DecorationAreaType.SECONDARY_TITLE_PANE));
          }
        }, "substance.internalFrame.restoreIcon");
    Icon maximizeIcon = new TransitionAwareIcon(this.maxButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return SubstanceIconFactory
                .getTitlePaneIcon(
                    SubstanceIconFactory.IconKind.MAXIMIZE,
                    scheme,
                    SubstanceCoreUtilities
                        .getSkin(
                            SubstanceInternalFrameTitlePane.this)
                        .getBackgroundColorScheme(
                            DecorationAreaType.SECONDARY_TITLE_PANE));
          }
        }, "substance.internalFrame.maxIcon");
    Icon minimizeIcon = new TransitionAwareIcon(this.iconButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return SubstanceIconFactory
                .getTitlePaneIcon(
                    SubstanceIconFactory.IconKind.MINIMIZE,
                    scheme,
                    SubstanceCoreUtilities
                        .getSkin(
                            SubstanceInternalFrameTitlePane.this)
                        .getBackgroundColorScheme(
                            DecorationAreaType.SECONDARY_TITLE_PANE));
          }
        }, "substance.internalFrame.minIcon");
    Icon closeIcon = new TransitionAwareIcon(this.closeButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return SubstanceIconFactory
                .getTitlePaneIcon(
                    SubstanceIconFactory.IconKind.CLOSE,
View Full Code Here

    this.nextButton = new SubstanceSpinnerButton(this.spinner,
        SwingConstants.NORTH);
    this.nextButton.setFont(this.spinner.getFont());
    this.nextButton.setName("Spinner.nextButton");

    Icon icon = new TransitionAwareIcon(this.nextButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(nextButton);
            return SubstanceImageCreator.getArrowIcon(
View Full Code Here

    this.prevButton = new SubstanceSpinnerButton(this.spinner,
        SwingConstants.SOUTH);
    this.prevButton.setFont(this.spinner.getFont());
    this.prevButton.setName("Spinner.previousButton");

    Icon icon = new TransitionAwareIcon(this.prevButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(prevButton);
            float spinnerArrowIconHeight = SubstanceSizeUtils
View Full Code Here

    this.closeButton.setBorder(null);
    // this.closeButton.setToolTipText(SubstanceLookAndFeel
    // .getLabelBundle().getString(
    // "SystemMenu.close"));

    Icon closeIcon = new TransitionAwareIcon(closeButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return SubstanceIconFactory
                .getTitlePaneIcon(
                    SubstanceIconFactory.IconKind.CLOSE,
                    scheme,
                    SubstanceCoreUtilities
                        .getSkin(rootPane)
                        .getBackgroundColorScheme(
                            DecorationAreaType.PRIMARY_TITLE_PANE));
          }
        }, "substance.titlePane.closeIcon");
    this.closeButton.setIcon(closeIcon);

    this.closeButton.setFocusable(false);
    this.closeButton.putClientProperty(SubstanceLookAndFeel.FLAT_PROPERTY,
        Boolean.TRUE);

    this.closeButton.putClientProperty(
        SubstanceButtonUI.IS_TITLE_CLOSE_BUTTON, Boolean.TRUE);

    if (this.getWindowDecorationStyle() == JRootPane.FRAME) {
      this.minimizeButton = this.createTitleButton();
      this.minimizeButton.setAction(this.iconifyAction);
      this.minimizeButton.setText(null);
      this.minimizeButton.setBorder(null);

      Icon minIcon = new TransitionAwareIcon(this.minimizeButton,
          new TransitionAwareIcon.Delegate() {
            public Icon getColorSchemeIcon(
                SubstanceColorScheme scheme) {
              return SubstanceIconFactory
                  .getTitlePaneIcon(
                      SubstanceIconFactory.IconKind.MINIMIZE,
                      scheme,
                      SubstanceCoreUtilities
                          .getSkin(rootPane)
                          .getBackgroundColorScheme(
                              DecorationAreaType.PRIMARY_TITLE_PANE));
            }
          }, "substance.titlePane.minIcon");
      this.minimizeButton.setIcon(minIcon);

      this.minimizeButton.setFocusable(false);
      this.minimizeButton.putClientProperty(
          SubstanceLookAndFeel.FLAT_PROPERTY, Boolean.TRUE);
      this.minimizeButton.setToolTipText(SubstanceCoreUtilities
          .getResourceBundle(rootPane)
          .getString("SystemMenu.iconify"));

      this.toggleButton = this.createTitleButton();
      this.toggleButton.setAction(this.restoreAction);
      this.toggleButton.setBorder(null);
      this.toggleButton.setText(null);

      Icon maxIcon = new TransitionAwareIcon(this.toggleButton,
          new TransitionAwareIcon.Delegate() {
            public Icon getColorSchemeIcon(
                SubstanceColorScheme scheme) {
              return SubstanceIconFactory
                  .getTitlePaneIcon(
View Full Code Here

            this.rootPaneUI.installBorder(rootPane);
          }
        }
        if (frame.isResizable()) {
          if ((state & Frame.MAXIMIZED_BOTH) != 0) {
            Icon restoreIcon = new TransitionAwareIcon(
                this.toggleButton,
                new TransitionAwareIcon.Delegate() {
                  public Icon getColorSchemeIcon(
                      SubstanceColorScheme scheme) {
                    return SubstanceIconFactory
                        .getTitlePaneIcon(
                            SubstanceIconFactory.IconKind.RESTORE,
                            scheme,
                            SubstanceCoreUtilities
                                .getSkin(
                                    rootPane)
                                .getBackgroundColorScheme(
                                    DecorationAreaType.PRIMARY_TITLE_PANE));
                  }
                }, "substance.titlePane.restoreIcon");
            this
                .updateToggleButton(this.restoreAction,
                    restoreIcon);
            this.toggleButton.setToolTipText(SubstanceCoreUtilities
                .getResourceBundle(rootPane).getString(
                    "SystemMenu.restore"));
            this.maximizeAction.setEnabled(false);
            this.restoreAction.setEnabled(true);
          } else {
            Icon maxIcon = new TransitionAwareIcon(
                this.toggleButton,
                new TransitionAwareIcon.Delegate() {
                  public Icon getColorSchemeIcon(
                      SubstanceColorScheme scheme) {
                    return SubstanceIconFactory
View Full Code Here

      @Override
      public boolean isFocusable() {
        return false;
      }
    };
    Icon verticalSplit = new TransitionAwareIcon(oneTouchButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(splitPane);
            return SubstanceImageCreator.getArrowIcon(
                SubstanceSizeUtils
                    .getSplitPaneArrowIconWidth(fontSize),
                SubstanceSizeUtils
                    .getSplitPaneArrowIconHeight(fontSize),
                SubstanceSizeUtils
                    .getArrowStrokeWidth(fontSize),
                SwingConstants.NORTH, scheme);
          }
        }, "substance.splitPane.left.vertical");
    Icon horizontalSplit = new TransitionAwareIcon(oneTouchButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(splitPane);
            return SubstanceImageCreator.getArrowIcon(
View Full Code Here

      @Override
      public boolean isFocusable() {
        return false;
      }
    };
    Icon verticalSplit = new TransitionAwareIcon(oneTouchButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(splitPane);
            return SubstanceImageCreator.getArrowIcon(
                SubstanceSizeUtils
                    .getSplitPaneArrowIconWidth(fontSize),
                SubstanceSizeUtils
                    .getSplitPaneArrowIconHeight(fontSize),
                SubstanceSizeUtils
                    .getArrowStrokeWidth(fontSize),
                SwingConstants.SOUTH, scheme);
          }
        }, "substance.splitPane.right.vertical");
    Icon horizontalSplit = new TransitionAwareIcon(oneTouchButton,
        new TransitionAwareIcon.Delegate() {
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(splitPane);
            return SubstanceImageCreator.getArrowIcon(
View Full Code Here

   *            Split pane orientation.
   */
  public void updateOneTouchButtons(int orientation) {
    if (orientation == JSplitPane.VERTICAL_SPLIT) {
      if (this.leftButton != null) {
        this.leftButton.setIcon(new TransitionAwareIcon(
            this.leftButton, new TransitionAwareIcon.Delegate() {
              public Icon getColorSchemeIcon(
                  SubstanceColorScheme scheme) {
                int fontSize = SubstanceSizeUtils
                    .getComponentFontSize(splitPane);
                return SubstanceImageCreator
                    .getArrowIcon(
                        SubstanceSizeUtils
                            .getSplitPaneArrowIconWidth(fontSize),
                        SubstanceSizeUtils
                            .getSplitPaneArrowIconHeight(fontSize),
                        SubstanceSizeUtils
                            .getArrowStrokeWidth(fontSize),
                        SwingConstants.NORTH, scheme);
              }
            }, "substance.splitPane.left.vertical"));
      }
      if (this.rightButton != null) {
        this.rightButton.setIcon(new TransitionAwareIcon(
            this.rightButton, new TransitionAwareIcon.Delegate() {
              public Icon getColorSchemeIcon(
                  SubstanceColorScheme scheme) {
                int fontSize = SubstanceSizeUtils
                    .getComponentFontSize(splitPane);
                return SubstanceImageCreator
                    .getArrowIcon(
                        SubstanceSizeUtils
                            .getSplitPaneArrowIconWidth(fontSize),
                        SubstanceSizeUtils
                            .getSplitPaneArrowIconHeight(fontSize),
                        SubstanceSizeUtils
                            .getArrowStrokeWidth(fontSize),
                        SwingConstants.SOUTH, scheme);
              }
            }, "substance.splitPane.right.vertical"));
      }
    } else {
      if (this.leftButton != null) {
        this.leftButton.setIcon(new TransitionAwareIcon(
            this.leftButton, new TransitionAwareIcon.Delegate() {
              public Icon getColorSchemeIcon(
                  SubstanceColorScheme scheme) {
                int fontSize = SubstanceSizeUtils
                    .getComponentFontSize(splitPane);
                return SubstanceImageCreator
                    .getArrowIcon(
                        SubstanceSizeUtils
                            .getSplitPaneArrowIconWidth(fontSize),
                        SubstanceSizeUtils
                            .getSplitPaneArrowIconHeight(fontSize),
                        SubstanceSizeUtils
                            .getArrowStrokeWidth(fontSize),
                        SwingConstants.WEST, scheme);
              }
            }, "substance.splitPane.left.horizontal"));
      }
      if (this.rightButton != null) {
        this.rightButton.setIcon(new TransitionAwareIcon(
            this.rightButton, new TransitionAwareIcon.Delegate() {
              public Icon getColorSchemeIcon(
                  SubstanceColorScheme scheme) {
                int fontSize = SubstanceSizeUtils
                    .getComponentFontSize(splitPane);
View Full Code Here

TOP

Related Classes of org.pushingpixels.substance.internal.utils.icon.TransitionAwareIcon$ColorSchemeAssociationKindDelegate

Copyright © 2018 www.massapicom. 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.