com.apple.laf.AquaImageFactory.NineSliceMetrics Java Examples

The following examples show how to use com.apple.laf.AquaImageFactory.NineSliceMetrics. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AquaPainter.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #2
Source File: AquaPainter.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #3
Source File: AquaPainter.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #4
Source File: AquaPainter.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #5
Source File: AquaPainter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #6
Source File: AquaPainter.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #7
Source File: AquaPainter.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #8
Source File: AquaPainter.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #9
Source File: AquaPainter.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #10
Source File: AquaPainter.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #11
Source File: AquaPainter.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #12
Source File: AquaPainter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #13
Source File: AquaPainter.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
@Override
void paint(final Graphics2D g, final T stateToPaint) {
    if (metricsProvider == null) {
        AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
        return;
    }

    RecyclableJRSUISlicedImageControl slicesRef = slicedControlImages.get(stateToPaint);
    if (slicesRef == null) {
        final NineSliceMetrics metrics = metricsProvider.getNineSliceMetricsForState(stateToPaint);
        if (metrics == null) {
            AquaSingleImagePainter.paintFromSingleCachedImage(g, control, stateToPaint, boundsRect);
            return;
        }
        slicesRef = new RecyclableJRSUISlicedImageControl(control, stateToPaint, metrics);
        slicedControlImages.put(stateToPaint, slicesRef);
    }
    final SlicedImageControl slices = slicesRef.get();
    slices.paint(g, boundsRect.x, boundsRect.y, boundsRect.width, boundsRect.height);
}
 
Example #14
Source File: AquaSliderUI.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #15
Source File: AquaSliderUI.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #16
Source File: AquaSliderUI.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #17
Source File: AquaSliderUI.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #18
Source File: AquaSliderUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #19
Source File: AquaSliderUI.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #20
Source File: AquaSliderUI.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #21
Source File: AquaSliderUI.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #22
Source File: AquaSliderUI.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #23
Source File: AquaSliderUI.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #24
Source File: AquaSliderUI.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #25
Source File: AquaSliderUI.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #26
Source File: AquaSliderUI.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state) {
    if (state.is(Orientation.VERTICAL)) {
        return new NineSliceMetrics(5, 7, 0, 0, 3, 3, true, false, true);
    }
    return new NineSliceMetrics(7, 5, 3, 3, 0, 0, true, true, false);
}
 
Example #27
Source File: AquaPainter.java    From jdk8u-dev-jdk with GNU General Public License v2.0 4 votes vote down vote up
RecyclableJRSUISlicedImageControl(final JRSUIControl control, final JRSUIState state, final NineSliceMetrics metrics) {
    super(metrics);
    this.control = control;
    this.state = state;
}
 
Example #28
Source File: AquaPainter.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
RecyclableJRSUISlicedImageControl(final JRSUIControl control, final JRSUIState state, final NineSliceMetrics metrics) {
    super(metrics);
    this.control = control;
    this.state = state;
}
 
Example #29
Source File: AquaPainter.java    From jdk8u_jdk with GNU General Public License v2.0 4 votes vote down vote up
RecyclableJRSUISlicedImageControl(final JRSUIControl control, final JRSUIState state, final NineSliceMetrics metrics) {
    super(metrics);
    this.control = control;
    this.state = state;
}
 
Example #30
Source File: AquaPainter.java    From dragonwell8_jdk with GNU General Public License v2.0 4 votes vote down vote up
RecyclableJRSUISlicedImageControl(final JRSUIControl control, final JRSUIState state, final NineSliceMetrics metrics) {
    super(metrics);
    this.control = control;
    this.state = state;
}