@Override public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return new Dimension(Math.max(iSize, size.width), Math.max( size.height, iSize)); } }
/** * Returns <code>close</code> icon. * * @param scheme * Color scheme for the icon. * @return <code>Close</code> icon. */ public static Icon getCloseIcon(SubstanceColorScheme scheme, SubstanceColorScheme backgroundScheme) { return SubstanceImageCreator.getCloseIcon(SubstanceSizeUtils .getTitlePaneIconSize(), scheme, backgroundScheme); }
/** * Returns <code>maximize</code> icon. * * @param scheme * Color scheme for the icon. * @return <code>Maximize</code> icon. */ public static Icon getMaximizeIcon(SubstanceColorScheme scheme, SubstanceColorScheme backgroundScheme) { int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return getMaximizeIcon(iSize, scheme, backgroundScheme); }
/** * Returns <code>minimize</code> icon. * * @param scheme * Color scheme for the icon. * @return <code>Minimize</code> icon. */ public static Icon getMinimizeIcon(SubstanceColorScheme scheme, SubstanceColorScheme backgroundScheme) { int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return getMinimizeIcon(iSize, scheme, backgroundScheme); }
@Override public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return new Dimension(Math.max(iSize, size.width), Math.max( size.height, iSize)); } }
/** * Returns <code>maximize</code> icon. * * @param scheme * Color scheme for the icon. * @return <code>Maximize</code> icon. */ public static Icon getMaximizeIcon(SubstanceColorScheme scheme, SubstanceColorScheme backgroundScheme) { int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return getMaximizeIcon(iSize, scheme, backgroundScheme); }
@Override public Dimension getPreferredSize() { Dimension size = super.getPreferredSize(); int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return new Dimension(Math.max(iSize, size.width), Math.max( size.height, iSize)); } }
/** * Returns <code>minimize</code> icon. * * @param scheme * Color scheme for the icon. * @return <code>Minimize</code> icon. */ public static Icon getMinimizeIcon(SubstanceColorScheme scheme, SubstanceColorScheme backgroundScheme) { int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); return getMinimizeIcon(iSize, scheme, backgroundScheme); }
/** * Returns <code>close</code> icon. * * @param scheme * Color scheme for the icon. * @return <code>Close</code> icon. */ public static Icon getCloseIcon(SubstanceColorScheme scheme, SubstanceColorScheme backgroundScheme) { return SubstanceImageCreator.getCloseIcon( SubstanceSizeUtils.getTitlePaneIconSize(), scheme, backgroundScheme); }
/** * Computes title pane height. * * @return Title pane height. */ private int computeHeight() { FontMetrics fm = SubstanceTitlePane.this.rootPane .getFontMetrics(SubstanceTitlePane.this.getFont()); int fontHeight = fm.getHeight(); fontHeight += 7; int iconHeight = SubstanceSizeUtils.getTitlePaneIconSize(); return Math.max(fontHeight, iconHeight); }
/** * Returns an icon that matches the specified watermark. * * @param watermark * Watermark instance. * @return Icon that matches the specified watermark. */ public static Icon getWatermarkIcon(SubstanceWatermark watermark) { int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); BufferedImage result = SubstanceCoreUtilities.getBlankImage(iSize, iSize); Graphics2D graphics = (Graphics2D) result.getGraphics().create(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); watermark .previewWatermark(graphics, SubstanceColorSchemeUtilities.METALLIC_SKIN, 0, 0, iSize, iSize); graphics.dispose(); return new ImageIcon(result); }
/** * Returns an icon that matches the specified watermark. * * @param watermark * Watermark instance. * @return Icon that matches the specified watermark. */ public static Icon getWatermarkIcon(SubstanceWatermark watermark) { int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); BufferedImage result = SubstanceCoreUtilities.getBlankImage(iSize, iSize); Graphics2D graphics = (Graphics2D) result.getGraphics().create(); graphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); watermark .previewWatermark(graphics, SubstanceColorSchemeUtilities.METALLIC_SKIN, 0, 0, iSize, iSize); graphics.dispose(); return new ImageIcon(result); }
/** * Computes title pane height. * * @return Title pane height. */ private int computeHeight() { FontMetrics fm = SubstanceTitlePane.this.rootPane .getFontMetrics(SubstanceTitlePane.this.getFont()); int fontHeight = fm.getHeight(); fontHeight += 7; int iconHeight = 0; if (SubstanceTitlePane.this.getWindowDecorationStyle() == JRootPane.FRAME) { iconHeight = SubstanceSizeUtils.getTitlePaneIconSize(); } int finalHeight = Math.max(fontHeight, iconHeight); return finalHeight; }
/** * Updates the application icon. */ private void updateAppIcon() { Window window = getWindow(); if (window == null) { this.appIcon = null; return; } java.util.List<Image> icons = window.getIconImages(); if (icons.size() == 0) { this.appIcon = null; } else { int prefSize = SubstanceSizeUtils.getTitlePaneIconSize(); this.appIcon = SubstanceCoreUtilities.getScaledIconImage(icons, prefSize, prefSize); } }
int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); BufferedImage image = SubstanceCoreUtilities .getBlankImage(iSize, iSize);
/** * Updates the application icon. */ private void updateAppIcon() { Window window = getWindow(); if (window == null) { this.appIcon = null; return; } this.appIcon = null; while (window != null && appIcon == null) { java.util.List<Image> icons = window.getIconImages(); if (icons.size() == 0) { window = window.getOwner(); } else { int prefSize = SubstanceSizeUtils.getTitlePaneIconSize(); this.appIcon = SubstanceCoreUtilities.getScaledIconImage(icons, prefSize, prefSize); } } }
int iSize = SubstanceSizeUtils.getTitlePaneIconSize(); BufferedImage image = SubstanceCoreUtilities .getBlankImage(iSize, iSize);
.getIconWidth(); } else { buttonHeight = SubstanceSizeUtils.getTitlePaneIconSize(); buttonWidth = SubstanceSizeUtils.getTitlePaneIconSize();
.getIconWidth(); } else { buttonHeight = SubstanceSizeUtils.getTitlePaneIconSize(); buttonWidth = SubstanceSizeUtils.getTitlePaneIconSize();