/** * @since Available in iOS 3.2 and later. */ public CTFont getFont() { if (has(CTAttributedStringAttribute.Font)) { CTFont val = get(CTAttributedStringAttribute.Font, CTFont.class); return val; } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CTParagraphStyle getParagraphStyle() { if (has(CTAttributedStringAttribute.ParagraphStyle)) { CTParagraphStyle val = get(CTAttributedStringAttribute.ParagraphStyle, CTParagraphStyle.class); return val; } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CGColor getUnderlineColor() { if (has(CTAttributedStringAttribute.UnderlineColor)) { CGColor val = get(CTAttributedStringAttribute.UnderlineColor, CGColor.class); return val; } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CTGlyphInfo getGlyphInfo() { if (has(CTAttributedStringAttribute.GlyphInfo)) { CTGlyphInfo val = get(CTAttributedStringAttribute.GlyphInfo, CTGlyphInfo.class); return val; } return null; } /**
/** * @since Available in iOS 8.0 and later. */ public CTRubyAnnotation getRubyAnnotation() { if (has(CTAttributedStringAttribute.RubyAnnotation)) { CTRubyAnnotation val = get(CTAttributedStringAttribute.RubyAnnotation, CTRubyAnnotation.class); return val; } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CGColor getForegroundColor() { if (has(CTAttributedStringAttribute.ForegroundColor)) { CGColor val = get(CTAttributedStringAttribute.ForegroundColor, CGColor.class); return val; } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CGColor getStrokeColor() { if (has(CTAttributedStringAttribute.StrokeColor)) { CGColor val = get(CTAttributedStringAttribute.StrokeColor, CGColor.class); return val; } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public boolean usesForegroundColorFromContext() { if (has(CTAttributedStringAttribute.ForegroundColorFromContext)) { CFBoolean val = get(CTAttributedStringAttribute.ForegroundColorFromContext, CFBoolean.class); return val.booleanValue(); } return false; } /**
/** * @since Available in iOS 4.3 and later. */ public boolean usesVerticalForms() { if (has(CTAttributedStringAttribute.VerticalForms)) { CFBoolean val = get(CTAttributedStringAttribute.VerticalForms, CFBoolean.class); return val.booleanValue(); } return false; } /**
/** * @since Available in iOS 7.0 and later. */ public String getLanguage() { if (has(CTAttributedStringAttribute.Language)) { CFString val = get(CTAttributedStringAttribute.Language, CFString.class); return val.toString(); } return null; } /**
public <T extends NativeObject> T get(CTAttributedStringAttribute key, Class<T> type) { if (has(key)) { return data.get(key.value(), type); } return null; } public CTAttributedStringAttributes set(CTAttributedStringAttribute key, NativeObject value) {
/** * @since Available in iOS 3.2 and later. */ public int getLigature() { if (has(CTAttributedStringAttribute.Ligature)) { CFNumber val = get(CTAttributedStringAttribute.Ligature, CFNumber.class); return val.intValue(); } return 0; } /**
/** * @since Available in iOS 3.2 and later. */ public int getSuperscript() { if (has(CTAttributedStringAttribute.Superscript)) { CFNumber val = get(CTAttributedStringAttribute.Superscript, CFNumber.class); return val.intValue(); } return 0; } /**
/** * @since Available in iOS 3.2 and later. */ public float getKern() { if (has(CTAttributedStringAttribute.Kern)) { CFNumber val = get(CTAttributedStringAttribute.Kern, CFNumber.class); return val.floatValue(); } return 0; } /**
/** * @since Available in iOS 3.2 and later. */ public double getStrokeWidth() { if (has(CTAttributedStringAttribute.StrokeWidth)) { CFNumber val = get(CTAttributedStringAttribute.StrokeWidth, CFNumber.class); return val.doubleValue(); } return 0; } /**
/** * @since Available in iOS 6.0 and later. */ public CTBaselineClass getBaselineClass() { if (has(CTAttributedStringAttribute.BaselineClass)) { CFString val = get(CTAttributedStringAttribute.BaselineClass, CFString.class); return CTBaselineClass.valueOf(val); } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CTUnderlineStyle getUnderlineStyle() { if (has(CTAttributedStringAttribute.UnderlineStyle)) { CFNumber val = get(CTAttributedStringAttribute.UnderlineStyle, CFNumber.class); return new CTUnderlineStyle(val.longValue()); } return null; } /**
/** * @since Available in iOS 3.2 and later. */ public CGColor getStrokeColor() { if (has(CTAttributedStringAttribute.StrokeColor)) { CGColor val = get(CTAttributedStringAttribute.StrokeColor, CGColor.class); return val; } return null; } /**
public <T extends NativeObject> T get(CTAttributedStringAttribute key, Class<T> type) { if (has(key)) { return data.get(key.value(), type); } return null; } public CTAttributedStringAttributes set(CTAttributedStringAttribute key, NativeObject value) {
/** * @since Available in iOS 3.2 and later. */ public boolean usesForegroundColorFromContext() { if (has(CTAttributedStringAttribute.ForegroundColorFromContext)) { CFBoolean val = get(CTAttributedStringAttribute.ForegroundColorFromContext, CFBoolean.class); return val.booleanValue(); } return false; } /**