progressBar.isEnabled() ? ComponentState.DEFAULT
: ComponentState.DISABLED_UNSELECTED);
g2d.setComposite(TransitionLayout.getAlphaComposite(progressBar,
stateAlpha, g));
SubstanceColorScheme scheme = SubstanceColorSchemeUtilities
.getColorScheme(progressBar,
progressBar.isEnabled() ? ComponentState.DEFAULT
: ComponentState.DISABLED_UNSELECTED);
SubstanceGradientPainter gp = SubstanceCoreUtilities
.getGradientPainter(progressBar);
if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
BufferedImage back = getDeterminateBackground(progressBar,
barRectWidth + 1, barRectHeight + 1, scheme, gp,
progressBar.getOrientation(), this.progressBar
.getComponentOrientation());
g2d.drawImage(back, margin, margin, null);
} else {
BufferedImage back = getDeterminateBackground(progressBar,
barRectHeight + 1, barRectWidth + 1, scheme, gp,
progressBar.getOrientation(), this.progressBar
.getComponentOrientation());
g2d.drawImage(back, margin, margin, null);
}
if (amountFull > 0) {
// float borderStrokeWidth = SubstanceSizeUtils
// .getBorderStrokeWidth(SubstanceSizeUtils
// .getComponentFontSize(progressBar));
// SubstanceBorderPainter borderPainter = SubstanceCoreUtilities
// .getBorderPainter(null);
int borderDelta = 0;
// (borderPainter instanceof InnerDelegateBorderPainter) ? (int)
// (Math
// .ceil(2.0 * borderStrokeWidth)) / 2
// : (int) (Math.ceil(borderStrokeWidth / 2.0));// : 0;
// if (borderDelta == 0)
SubstanceColorScheme fillColorScheme = SubstanceColorSchemeUtilities
.getColorScheme(progressBar,
progressBar.isEnabled() ? ComponentState.SELECTED
: ComponentState.DISABLED_UNSELECTED);
if (progressBar.getOrientation() == SwingConstants.HORIZONTAL) {
int barWidth = amountFull - 2 * borderDelta;