Examples of SubstanceButtonShaper


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

      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();
    if (isSelected && (tabColor instanceof UIResource)) {
      // special handling of tabs placed in decoration areas
      tabColor = SubstanceColorUtilities
          .getBackgroundFillColor(compForBackground);
    }
    HashMapKey key = SubstanceCoreUtilities.getHashKey(width, height,
        isSelected, tabPlacement, fillPainter.getDisplayName(),
        borderPainter.getDisplayName(), shaper.getDisplayName(),
        tabPlacement == SwingConstants.BOTTOM, side.name(), colorScheme
            .getDisplayName(), borderScheme.getDisplayName(),
        tabColor);

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

Examples of org.pushingpixels.substance.api.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.pushingpixels.substance.api.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

    if (isUnbroken) {
      g2d.setColor(this.highlight);
      g2d.drawLine(x, y, x, y + h);
    } 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
View Full Code Here

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

    if (isUnbroken) {
      g2d.setColor(this.highlight);
      g2d.drawLine(x + w - 1, y, x + w - 1, y + h);
    } 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
View Full Code Here

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

    if (isUnbroken) {
      g2d.setColor(this.highlight);
      g2d.drawLine(x, y, x + w - 1, y);
    } 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

   *            Composite to apply before painting the track.
   * @return Horizontal track image.
   */
  private static BufferedImage getTrackHorizontal(JScrollBar scrollBar,
      int width, int height) {
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(scrollBar);
    SubstanceColorScheme mainScheme = SubstanceColorSchemeUtilities
        .getColorScheme(scrollBar,
            scrollBar.isEnabled() ? ComponentState.ENABLED
                : ComponentState.DISABLED_UNSELECTED);
    SubstanceColorScheme mainBorderScheme = SubstanceColorSchemeUtilities
        .getColorScheme(scrollBar, ColorSchemeAssociationKind.BORDER,
            scrollBar.isEnabled() ? ComponentState.ENABLED
                : ComponentState.DISABLED_UNSELECTED);
    HashMapKey key = SubstanceCoreUtilities.getHashKey(mainScheme
        .getDisplayName(), mainBorderScheme.getDisplayName(), width,
        height, shaper.getDisplayName());
    float radius = height / 2;
    if (shaper instanceof ClassicButtonShaper)
      radius = SubstanceSizeUtils
          .getClassicButtonCornerRadius(SubstanceSizeUtils
              .getComponentFontSize(scrollBar));
View Full Code Here

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

   * @return Horizontal track image.
   */
  private static void paintTrackBackHorizontal(Graphics g,
      JScrollBar scrollBar, AbstractButton leftActiveButton,
      AbstractButton rightActiveButton, int width, int height) {
    SubstanceButtonShaper shaper = SubstanceCoreUtilities
        .getButtonShaper(scrollBar);
    int radius = height / 2;
    if (shaper instanceof ClassicButtonShaper)
      radius = 2;
    SubstanceImageCreator.paintCompositeRoundedBackground(scrollBar, g,
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.