当前位置: 首页>>代码示例>>Java>>正文


Java SlicedImageControl类代码示例

本文整理汇总了Java中com.apple.laf.AquaImageFactory.SlicedImageControl的典型用法代码示例。如果您正苦于以下问题:Java SlicedImageControl类的具体用法?Java SlicedImageControl怎么用?Java SlicedImageControl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SlicedImageControl类属于com.apple.laf.AquaImageFactory包,在下文中一共展示了SlicedImageControl类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: paint

import com.apple.laf.AquaImageFactory.SlicedImageControl; //导入依赖的package包/类
@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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:AquaPainter.java

示例2: SlicedShadowBorder

import com.apple.laf.AquaImageFactory.SlicedImageControl; //导入依赖的package包/类
SlicedShadowBorder(final Painter prePainter, final Painter postPainter, final int offsetX, final int offsetY, final float distance, final float intensity, final int blur, final int templateWidth, final int templateHeight, final int leftCut, final int topCut, final int rightCut, final int bottomCut) {
            super(prePainter, postPainter, offsetX, offsetY, distance, intensity, blur);

            final BufferedImage i = new BufferedImage(templateWidth, templateHeight, BufferedImage.TYPE_INT_ARGB_PRE);
            super.paintBorder(null, i.getGraphics(), 0, 0, templateWidth, templateHeight);
//            debugFrame("slices", i);
            slices = new SlicedImageControl(i, leftCut, topCut, rightCut, bottomCut, false);
        }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:AquaUtils.java


注:本文中的com.apple.laf.AquaImageFactory.SlicedImageControl类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。