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

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


    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) {
            // System.out.println(spinner.getFont().getSize());
            int fontSize = SubstanceSizeUtils
                .getComponentFontSize(prevButton);
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

      @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

  }

  @Override
  protected void buildChooser() {
    initComponents();
    pickerButton.setIcon(new TransitionAwareIcon(pickerButton,
        new TransitionAwareIcon.Delegate() {
          @Override
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return new IconUIResource(SubstanceImageCreator
                .getSearchIcon(15, scheme, pickerButton
View Full Code Here

  }

  @Override
  protected void buildChooser() {
    initComponents();
    pickerButton.setIcon(new TransitionAwareIcon(pickerButton,
        new TransitionAwareIcon.Delegate() {
          @Override
          public Icon getColorSchemeIcon(SubstanceColorScheme scheme) {
            return new IconUIResource(SubstanceImageCreator
                .getSearchIcon(15, scheme, pickerButton
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

TOP

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

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.