Examples of SubstanceButtonShaper


Examples of org.jvnet.substance.shaper.SubstanceButtonShaper

      b.putClientProperty(SubstanceButtonUI.BORDER_ORIGINAL, b
          .getBorder());

    trackGlowingIcon(b);

    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(b);

    if (b.getClientProperty(SubstanceButtonUI.BORDER_COMPUTED) == null) {
      b.setBorder(shaper.getButtonBorder(b));
    } else {
      Border currBorder = b.getBorder();
      if (!(currBorder instanceof SubstanceButtonBorder)) {
        b.setBorder(shaper.getButtonBorder(b));
      } else {
        SubstanceButtonBorder sbCurrBorder = (SubstanceButtonBorder) currBorder;
        if (shaper.getClass() != sbCurrBorder.getButtonShaperClass())
          b.setBorder(shaper.getButtonBorder(b));
      }
    }
    b.putClientProperty(SubstanceButtonUI.OPACITY_ORIGINAL, b.isOpaque());
    b.setOpaque(false);
View Full Code Here

Examples of org.jvnet.substance.shaper.SubstanceButtonShaper

   * javax.swing.plaf.ComponentUI#getPreferredSize(javax.swing.JComponent)
   */
  @Override
  public Dimension getPreferredSize(JComponent c) {
    AbstractButton button = (AbstractButton) c;
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(button);

    // fix for defect 263
    Dimension superPref = super.getPreferredSize(button);
    if (superPref == null)
      return null;

    if (shaper == null)
      return superPref;

    Dimension result = shaper.getPreferredSize(button, superPref);
    return result;
  }
View Full Code Here

Examples of org.jvnet.substance.shaper.SubstanceButtonShaper

      SubstanceColorScheme borderScheme2, boolean paintOnlyBorder) {
    SubstanceGradientPainter gradientPainter = SubstanceCoreUtilities
        .getGradientPainter(tabPane);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(tabPane);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(tabPane);

    int borderDelta = (int) Math.ceil(2.0 * SubstanceSizeUtils
        .getBorderStrokeWidth(SubstanceSizeUtils
            .getComponentFontSize(tabPane)));
 
View Full Code Here

Examples of org.jvnet.substance.shaper.SubstanceButtonShaper

    SubstanceGradientPainter gradientPainter = SubstanceCoreUtilities
        .getGradientPainter(tabPane);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(tabPane);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(tabPane);
    Component tabComponent = tabPane.getComponentAt(tabIndex);
    Color tabColor = (tabComponent != null) ? tabComponent.getBackground()
        : tabPane.getBackground();
    HashMapKey key = SubstanceCoreUtilities.getHashKey(width, height,
        isSelected, cyclePos, tabPlacement, gradientPainter
            .getDisplayName(), borderPainter.getDisplayName(),
        shaper.getDisplayName(), tabPlacement == SwingConstants.BOTTOM,
        side.name(), colorScheme.getDisplayName(), colorScheme2
            .getDisplayName(), borderScheme.getDisplayName(),
        borderScheme2.getDisplayName(), tabColor);

    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(tabPane);
View Full Code Here

Examples of org.jvnet.substance.shaper.SubstanceButtonShaper

   *            Tab index.
   * @return Extra width for the specified tab.
   */
  protected int getTabExtraWidth(int tabPlacement, int tabIndex) {
    int extraWidth = 0;
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(this.tabPane);
    if (shaper instanceof ClassicButtonShaper)
      extraWidth = (int) (2.0 * SubstanceSizeUtils
          .getClassicButtonCornerRadius(SubstanceSizeUtils
              .getComponentFontSize(this.tabPane)));
 
View Full Code Here

Examples of org.jvnet.substance.shaper.SubstanceButtonShaper

    if (isUnbroken) {
      g2d.setColor(this.highlight);
      g2d.drawLine(x, y + h - 1, x + w - 1, y + h - 1);
    } else {
      // Break line to show visual connection to selected tab
      SubstanceButtonShaper shaper = SubstanceCoreUtilities
          .getButtonShaper(this.tabPane);
      int delta = (shaper instanceof ClassicButtonShaper) ? 1 : 0;
      int borderInsets = (int) Math.floor(SubstanceSizeUtils
          .getBorderStrokeWidth(SubstanceSizeUtils
              .getComponentFontSize(tabPane)) / 2.0);
View Full Code Here

Examples of org.pushingpixels.substance.api.shaper.SubstanceButtonShaper

  @Override
  public boolean isInside(MouseEvent me) {
    if (!SubstanceLookAndFeel.isCurrentLookAndFeel()) {
      return false;
    }
    SubstanceButtonShaper shaper = ClassicButtonShaper.INSTANCE;
    if (shaper == null)
      return false;
    Shape contour = SubstanceOutlineUtilities.getBaseOutline(this.comboBox,
        SubstanceSizeUtils
            .getClassicButtonCornerRadius(SubstanceSizeUtils
View Full Code Here

Examples of org.pushingpixels.substance.api.shaper.SubstanceButtonShaper

  @Override
  public boolean isInside(MouseEvent me) {
    if (!SubstanceLookAndFeel.isCurrentLookAndFeel()) {
      return false;
    }
    SubstanceButtonShaper shaper = ClassicButtonShaper.INSTANCE;
    if (shaper == null)
      return false;
    Shape contour = SubstanceOutlineUtilities.getBaseOutline(
        this.passwordField, 2.0f * SubstanceSizeUtils
            .getClassicButtonCornerRadius(SubstanceSizeUtils
 
View Full Code Here

Examples of org.pushingpixels.substance.api.shaper.SubstanceButtonShaper

      SubstanceColorScheme borderScheme2, boolean paintOnlyBorder) {
    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(tabPane);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(tabPane);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(tabPane);

    int borderDelta = (int) Math.ceil(2.0 * SubstanceSizeUtils
        .getBorderStrokeWidth(SubstanceSizeUtils
            .getComponentFontSize(tabPane)));
 
View Full Code Here

Examples of org.pushingpixels.substance.api.shaper.SubstanceButtonShaper

    SubstanceFillPainter fillPainter = SubstanceCoreUtilities
        .getFillPainter(tabPane);
    SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
        .getBorderPainter(tabPane);
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(tabPane);
    Component compForBackground = tabPane.getTabComponentAt(tabIndex);
    if (compForBackground == null)
      compForBackground = tabPane.getComponentAt(tabIndex);
    if (compForBackground == null)
      compForBackground = tabPane;
    Color tabColor = compForBackground.getBackground();
    HashMapKey key = SubstanceCoreUtilities.getHashKey(width, height,
        isSelected, cyclePos, tabPlacement, fillPainter
            .getDisplayName(), borderPainter.getDisplayName(),
        shaper.getDisplayName(), tabPlacement == SwingConstants.BOTTOM,
        side.name(), colorScheme.getDisplayName(), colorScheme2
            .getDisplayName(), borderScheme.getDisplayName(),
        borderScheme2.getDisplayName(), tabColor);

    SubstanceSkin skin = SubstanceCoreUtilities.getSkin(tabPane);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.