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


Java NineSliceMetrics类代码示例

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


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

示例1: paint

import com.apple.laf.AquaImageFactory.NineSliceMetrics; //导入依赖的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: getNineSliceMetricsForState

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

示例3: RecyclableJRSUISlicedImageControl

import com.apple.laf.AquaImageFactory.NineSliceMetrics; //导入依赖的package包/类
RecyclableJRSUISlicedImageControl(final JRSUIControl control, final JRSUIState state, final NineSliceMetrics metrics) {
    super(metrics);
    this.control = control;
    this.state = state;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:6,代码来源:AquaPainter.java

示例4: getNineSliceMetricsForState

import com.apple.laf.AquaImageFactory.NineSliceMetrics; //导入依赖的package包/类
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state); 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:2,代码来源:JRSUIUtils.java


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