Package javax.swing

Examples of javax.swing.Icon.paintIcon()


        paintTitleBackground(g);

        if (menuBar == null) {
            Icon frameIcon = internals.getFrameIcon();
            if (frameIcon != null) {
                frameIcon.paintIcon(this, g, menuBarBounds.x, menuBarBounds.y);
            }
        }

        g.setColor(internals.isSelected()
                   ? selectedTextColor
View Full Code Here


            check.paintIcon(c, g, checkX, checkY);
        }

        icon = ButtonCommons.getCurrentIcon(item);
        if (icon != null) {
            icon.paintIcon(c, g, iconR.x, iconR.y);
        }
        paintText(g, item, textR, item.getText());
        paintAccelerator(g, viewR, iconR, textR, textIconGap, isLTR);
        g.setColor(oldColor);
    }
View Full Code Here

            icon = getDefaultIcon();
        }

        String clippedText = ButtonCommons.getPaintingParameters(button, viewR, iconR, textR, icon);
        if (icon != null) {
            icon.paintIcon(button, g, iconR.x, iconR.y);
        }
        textR.x += getTextShiftOffset();
        textR.y += getTextShiftOffset();
        paintText(g, button, textR, clippedText, getDisabledTextColor());
        if (button.isEnabled() && button.isFocusPainted() && button.isFocusOwner()) {
View Full Code Here

        if (icon == null) {
            icon = getDefaultIcon();
        }
        if (icon != null) {
            icon.paintIcon(button, g, iconRect.x, iconRect.y);
        }
    }

}
View Full Code Here

                                      viewRect, iconRect, textRect);

        int textY = Utilities.getTextY(fm, textRect);

        if (icon != null) {
            icon.paintIcon(label, g, iconRect.x, iconRect.y);
        }
        if (label.isEnabled()) {
            paintEnabledText(label, g, clippedText, textRect.x, textY);
        } else {
            paintDisabledText(label, g, clippedText, textRect.x, textY);
View Full Code Here

        paintTextR, label.getIconTextGap());

    Graphics2D g2d = (Graphics2D) g.create();
    BackgroundPaintingUtils.updateIfOpaque(g2d, c);
    if (icon != null) {
      icon.paintIcon(c, g2d, paintIconR.x, paintIconR.y);
    }
    ComponentState labelState = label.isEnabled() ? ComponentState.ENABLED
        : ComponentState.DISABLED_UNSELECTED;
    float labelAlpha = SubstanceColorSchemeUtilities.getAlpha(label,
        labelState);
View Full Code Here

          && this.substanceVisualStateTracker
              .getStateTransitionTracker().getIconGlowTracker()
              .isPlaying()) {
        this.glowingIcon.paintIcon(b, graphics, iconRect.x, iconRect.y);
      } else {
        themedIcon.paintIcon(b, graphics, iconRect.x, iconRect.y);
        graphics.setComposite(LafWidgetUtilities.getAlphaComposite(b,
            activeAmount, g));
        originalIcon.paintIcon(b, graphics, iconRect.x, iconRect.y);
      }
    } else {
View Full Code Here

        BufferedImage baseImage = SubstanceCoreUtilities.getBlankImage(
            baseFullOpacity.getIconWidth(), baseFullOpacity
                .getIconHeight());
        Graphics2D g2base = baseImage.createGraphics();
        g2base.setComposite(AlphaComposite.SrcOver.derive(baseAlpha));
        baseFullOpacity.paintIcon(this.component, g2base, 0, 0);
        g2base.dispose();
        layerBase = new ImageIcon(baseImage);
        iconMap.put(keyBase, layerBase);
      }
    }
View Full Code Here

                .getBlankImage(fullOpacity.getIconWidth(),
                    fullOpacity.getIconHeight());
            Graphics2D g2layer = image.createGraphics();
            g2layer.setComposite(AlphaComposite.SrcOver
                .derive(alpha));
            fullOpacity.paintIcon(this.component, g2layer, 0, 0);
            g2layer.dispose();
            layer = new ImageIcon(image);
            iconMap.put(key, layer);
          }
        }
View Full Code Here

        return baseLayer;

      BufferedImage result = SubstanceCoreUtilities.getBlankImage(
          baseLayer.getIconWidth(), baseLayer.getIconHeight());
      Graphics2D g2d = result.createGraphics();
      baseLayer.paintIcon(slider, g2d, 0, 0);

      for (Map.Entry<ComponentState, StateTransitionTracker.StateContributionInfo> activeEntry : activeStates
          .entrySet()) {
        ComponentState activeState = activeEntry.getKey();
        if (activeState == currState)
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.