/** * @since Available in iOS 6.0 and later. */ public UIFont getFont() { if (has(NSAttributedStringAttribute.Font)) { UIFont val = (UIFont) get(NSAttributedStringAttribute.Font); return val; } return null; } /**
/** * @since Available in iOS 6.0 and later. */ public NSShadow getShadow() { if (has(NSAttributedStringAttribute.Shadow)) { NSShadow val = (NSShadow) get(NSAttributedStringAttribute.Shadow); return val; } return null; } /**
/** * @since Available in iOS 7.0 and later. */ public UIColor getUnderlineColor() { if (has(NSAttributedStringAttribute.UnderlineColor)) { UIColor val = (UIColor) get(NSAttributedStringAttribute.UnderlineColor); return val; } return null; } /**
/** * @since Available in iOS 6.0 and later. */ public UIColor getStrokeColor() { if (has(NSAttributedStringAttribute.StrokeColor)) { UIColor val = (UIColor) get(NSAttributedStringAttribute.StrokeColor); return val; } return null; } /**
/** * @since Available in iOS 7.0 and later. */ public NSURL getLink() { if (has(NSAttributedStringAttribute.Link)) { NSURL val = (NSURL) get(NSAttributedStringAttribute.Link); return val; } return null; } /**
/** * @since Available in iOS 7.0 and later. */ public UIColor getStrikethroughColor() { if (has(NSAttributedStringAttribute.StrikethroughColor)) { UIColor val = (UIColor) get(NSAttributedStringAttribute.StrikethroughColor); return val; } return null; } /**
/** * @since Available in iOS 6.0 and later. */ public UIColor getForegroundColor() { if (has(NSAttributedStringAttribute.ForegroundColor)) { UIColor val = (UIColor) get(NSAttributedStringAttribute.ForegroundColor); return val; } return null; } /**
/** * @since Available in iOS 6.0 and later. */ public UIColor getBackgroundColor() { if (has(NSAttributedStringAttribute.BackgroundColor)) { UIColor val = (UIColor) get(NSAttributedStringAttribute.BackgroundColor); return val; } return null; } /**
/** * @since Available in iOS 7.0 and later. */ public String getSpeechLanguage() { if (has(NSAttributedStringAttribute.SpeechLanguage)) { NSString val = (NSString) get(NSAttributedStringAttribute.SpeechLanguage); return val.toString(); } return null; } /**
/** * @since Available in iOS 7.0 and later. */ public double getSpeechPitch() { if (has(NSAttributedStringAttribute.SpeechPitch)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.SpeechPitch); return val.doubleValue(); } return 0; } /**
/** * @since Available in iOS 7.0 and later. */ public double getObliqueness() { if (has(NSAttributedStringAttribute.Obliqueness)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.Obliqueness); return val.doubleValue(); } return 0; } /**
public NSObject get(String key) { if (has(key)) { return data.get(new NSString(key)); } return null; } public NSAttributedStringAttributes set(String key, NSObject value) {
/** * @since Available in iOS 6.0 and later. */ public double getKerning() { if (has(NSAttributedStringAttribute.Kern)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.Kern); return val.doubleValue(); } return 0; } /**
/** * @since Available in iOS 7.0 and later. */ public NSTextEffect getTextEffect() { if (has(NSAttributedStringAttribute.TextEffect)) { NSString val = (NSString) get(NSAttributedStringAttribute.TextEffect); return NSTextEffect.valueOf(val); } return null; } /**
/** * @since Available in iOS 7.0 and later. */ public double getExpansion() { if (has(NSAttributedStringAttribute.Expansion)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.Expansion); return val.doubleValue(); } return 0; } /**
/** * @since Available in iOS 6.0 and later. */ public boolean isVerticalText() { if (has(NSAttributedStringAttribute.VerticalGlyphForm)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.VerticalGlyphForm); return val.booleanValue(); } return false; } /**
@SuppressWarnings("unchecked") public List<NSTextDirection> getWritingDirections() { List<NSTextDirection> list = new ArrayList<>(); if (has(NSAttributedStringAttribute.WritingDirection)) { NSArray<NSNumber> val = (NSArray<NSNumber>)get(NSAttributedStringAttribute.WritingDirection); for (NSNumber n : val) { list.add(NSTextDirection.values()[n.intValue()]); } } return list; } /**
public NSObject get(NSAttributedStringAttribute key) { if (has(key)) { return data.get(key.value()); } return null; } public NSAttributedStringAttributes set(NSAttributedStringAttribute key, NSObject value) {
/** * @since Available in iOS 6.0 and later. */ public NSLigature getLigature() { if (has(NSAttributedStringAttribute.Ligature)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.Ligature); return NSLigature.values()[val.intValue()]; } return null; } /**
/** * @since Available in iOS 6.0 and later. */ public NSUnderlineStyle getStrikethroughStyle() { if (has(NSAttributedStringAttribute.StrikethroughStyle)) { NSNumber val = (NSNumber) get(NSAttributedStringAttribute.StrikethroughStyle); return NSUnderlineStyle.valueOf(val.longValue()); } return null; } /**