本文整理汇总了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);
}
示例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);
}
示例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;
}
示例4: getNineSliceMetricsForState
import com.apple.laf.AquaImageFactory.NineSliceMetrics; //导入依赖的package包/类
public NineSliceMetrics getNineSliceMetricsForState(JRSUIState state);