本文整理汇总了Java中sun.awt.SunHints.INTKEY_STROKE_CONTROL属性的典型用法代码示例。如果您正苦于以下问题:Java SunHints.INTKEY_STROKE_CONTROL属性的具体用法?Java SunHints.INTKEY_STROKE_CONTROL怎么用?Java SunHints.INTKEY_STROKE_CONTROL使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类sun.awt.SunHints
的用法示例。
在下文中一共展示了SunHints.INTKEY_STROKE_CONTROL属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRenderingHint
/**
* Returns the preferences for the rendering algorithms.
* @param hintCategory The category of hint to be set. The strings
* are defined in the RenderingHints class.
* @return The preferences for rendering algorithms. The strings
* are defined in the RenderingHints class.
* @see RenderingHints
*/
public Object getRenderingHint(Key hintKey) {
if (hints != null) {
return hints.get(hintKey);
}
if (!(hintKey instanceof SunHints.Key)) {
return null;
}
int keyindex = ((SunHints.Key)hintKey).getIndex();
switch (keyindex) {
case SunHints.INTKEY_RENDERING:
return SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint);
case SunHints.INTKEY_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint);
case SunHints.INTKEY_TEXT_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint);
case SunHints.INTKEY_FRACTIONALMETRICS:
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return new Integer(lcdTextContrast);
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
return SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
return SunHints.VALUE_INTERPOLATION_BILINEAR;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
return SunHints.VALUE_INTERPOLATION_BICUBIC;
}
return null;
case SunHints.INTKEY_STROKE_CONTROL:
return SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint);
}
return null;
}
示例2: getRenderingHint
/**
* Returns the preferences for the rendering algorithms.
* @param hintCategory The category of hint to be set. The strings
* are defined in the RenderingHints class.
* @return The preferences for rendering algorithms. The strings
* are defined in the RenderingHints class.
* @see RenderingHints
*/
public Object getRenderingHint(Key hintKey) {
if (hints != null) {
return hints.get(hintKey);
}
if (!(hintKey instanceof SunHints.Key)) {
return null;
}
int keyindex = ((SunHints.Key)hintKey).getIndex();
switch (keyindex) {
case SunHints.INTKEY_RENDERING:
return SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint);
case SunHints.INTKEY_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint);
case SunHints.INTKEY_TEXT_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint);
case SunHints.INTKEY_FRACTIONALMETRICS:
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return new Integer(lcdTextContrast);
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
return SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
return SunHints.VALUE_INTERPOLATION_BILINEAR;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
return SunHints.VALUE_INTERPOLATION_BICUBIC;
}
return null;
case SunHints.INTKEY_STROKE_CONTROL:
return SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint);
case SunHints.INTKEY_RESOLUTION_VARIANT:
return SunHints.Value.get(SunHints.INTKEY_RESOLUTION_VARIANT,
resolutionVariantHint);
}
return null;
}
示例3: getRenderingHint
/**
* Returns the preferences for the rendering algorithms.
* @param hintKey The category of hint to be set. The strings
* are defined in the RenderingHints class.
* @return The preferences for rendering algorithms. The strings
* are defined in the RenderingHints class.
* @see RenderingHints
*/
public Object getRenderingHint(Key hintKey) {
if (hints != null) {
return hints.get(hintKey);
}
if (!(hintKey instanceof SunHints.Key)) {
return null;
}
int keyindex = ((SunHints.Key)hintKey).getIndex();
switch (keyindex) {
case SunHints.INTKEY_RENDERING:
return SunHints.Value.get(SunHints.INTKEY_RENDERING,
renderHint);
case SunHints.INTKEY_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_ANTIALIASING,
antialiasHint);
case SunHints.INTKEY_TEXT_ANTIALIASING:
return SunHints.Value.get(SunHints.INTKEY_TEXT_ANTIALIASING,
textAntialiasHint);
case SunHints.INTKEY_FRACTIONALMETRICS:
return SunHints.Value.get(SunHints.INTKEY_FRACTIONALMETRICS,
fractionalMetricsHint);
case SunHints.INTKEY_AATEXT_LCD_CONTRAST:
return lcdTextContrast;
case SunHints.INTKEY_INTERPOLATION:
switch (interpolationHint) {
case SunHints.INTVAL_INTERPOLATION_NEAREST_NEIGHBOR:
return SunHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR;
case SunHints.INTVAL_INTERPOLATION_BILINEAR:
return SunHints.VALUE_INTERPOLATION_BILINEAR;
case SunHints.INTVAL_INTERPOLATION_BICUBIC:
return SunHints.VALUE_INTERPOLATION_BICUBIC;
}
return null;
case SunHints.INTKEY_STROKE_CONTROL:
return SunHints.Value.get(SunHints.INTKEY_STROKE_CONTROL,
strokeHint);
case SunHints.INTKEY_RESOLUTION_VARIANT:
return SunHints.Value.get(SunHints.INTKEY_RESOLUTION_VARIANT,
resolutionVariantHint);
}
return null;
}