/** * Returns the value of the {@code font} property. Either a {@link CTFont}, * {@link CGFont} or {@link String}. */ public Object getFont() { long ptr = getFontPtr(); if (ptr == 0) { return null; } org.robovm.apple.corefoundation.CFType cfObj = org.robovm.apple.corefoundation.CFType.Marshaler.toObject( org.robovm.apple.corefoundation.CFType.class, ptr, 0); if (cfObj instanceof org.robovm.apple.corefoundation.CFString) { return cfObj.toString(); } return cfObj; } @WeaklyLinked
public Object getString() { long ptr = getStringPtr(); if (ptr == 0) { return null; } NSObject obj = NSObject.Marshaler.toObject(NSObject.class, ptr, 0); if (obj instanceof NSString) { return obj.toString(); } return obj; } public void setString(String string) {
public void setFont(CGFont font) { setFontPtr(font.getHandle()); } public void setFont(String font) {
public void setString(NSAttributedString string) { setStringPtr(string.getHandle()); } // Font is either a CTFontRef, a CGFontRef, an instance of NSFont (OS X only), or an NSString naming the font.
public void setString(String string) { setStringPtr(new NSString(string).getHandle()); } public void setString(NSAttributedString string) {
@WeaklyLinked public void setFont(CTFont font) { setFontPtr(font.getHandle()); } public void setFont(CGFont font) {
public void setString(NSAttributedString string) { setStringPtr(string.getHandle()); } // Font is either a CTFontRef, a CGFontRef, an instance of NSFont (OS X only), or an NSString naming the font.
public Object getString() { long ptr = getStringPtr(); if (ptr == 0) { return null; } NSObject obj = NSObject.Marshaler.toObject(NSObject.class, ptr, 0); if (obj instanceof NSString) { return obj.toString(); } return obj; } public void setString(String string) {
/** * Returns the value of the {@code font} property. Either a {@link CTFont}, * {@link CGFont} or {@link String}. */ public Object getFont() { long ptr = getFontPtr(); if (ptr == 0) { return null; } org.robovm.apple.corefoundation.CFType cfObj = org.robovm.apple.corefoundation.CFType.Marshaler.toObject( org.robovm.apple.corefoundation.CFType.class, ptr, 0); if (cfObj instanceof org.robovm.apple.corefoundation.CFString) { return cfObj.toString(); } return cfObj; } @WeaklyLinked
public void setFont(String font) { setFontPtr(new NSString(font).getHandle()); }
public void setString(NSAttributedString string) { setStringPtr(string.getHandle()); } // Font is either a CTFontRef, a CGFontRef, an instance of NSFont (OS X only), or an NSString naming the font.
public Object getString() { long ptr = getStringPtr(); if (ptr == 0) { return null; } NSObject obj = NSObject.Marshaler.toObject(NSObject.class, ptr, 0); if (obj instanceof NSString) { return obj.toString(); } return obj; } public void setString(String string) {
/** * Returns the value of the {@code font} property. Either a {@link CTFont}, * {@link CGFont} or {@link String}. */ public Object getFont() { long ptr = getFontPtr(); if (ptr == 0) { return null; } org.robovm.apple.corefoundation.CFType cfObj = org.robovm.apple.corefoundation.CFType.Marshaler.toObject( org.robovm.apple.corefoundation.CFType.class, ptr, 0); if (cfObj instanceof org.robovm.apple.corefoundation.CFString) { return cfObj.toString(); } return cfObj; } @WeaklyLinked
public void setFont(CGFont font) { setFontPtr(font.getHandle()); } public void setFont(String font) {
public void setString(String string) { setStringPtr(new NSString(string).getHandle()); } public void setString(NSAttributedString string) {
public void setFont(CGFont font) { setFontPtr(font.getHandle()); } public void setFont(String font) {
public void setString(String string) { setStringPtr(new NSString(string).getHandle()); } public void setString(NSAttributedString string) {
@WeaklyLinked public void setFont(CTFont font) { setFontPtr(font.getHandle()); } public void setFont(CGFont font) {
@WeaklyLinked public void setFont(CTFont font) { setFontPtr(font.getHandle()); } public void setFont(CGFont font) {
public void setFont(String font) { setFontPtr(new NSString(font).getHandle()); }