NTBalloonPopupButtonStyleBuilder
@interface NTBalloonPopupButtonStyleBuilder : NTStyleBuilder
A builder class for BalloonPopupButtonStyle.
-
Constructs a BalloonPopupButtonStyleBuilder object with all parameters set to defaults.
Declaration
Objective-C
- (id)init; -
Returns the width of the button. If this value is -1, then button width is calculated automatically based on button text.
Declaration
Objective-C
- (int)getButtonWidth;Return Value
The width of the button in dp.
-
Sets the width of the button. The default is -1, which means that button width is calculated automatically based on button text.
Declaration
Objective-C
- (void)setButtonWidth:(int)buttonWidth;Parameters
buttonWidthThe button width in dp, or -1.
-
Returns the corner radius of the button.
Declaration
Objective-C
- (int)getCornerRadius;Return Value
The corner radius of the button in dp.
-
Sets the corner radius of the button. Bigger values mean rounder corners, 0 creates a rectangular button. The default is 3.
Declaration
Objective-C
- (void)setCornerRadius:(int)cornerRadius;Parameters
cornerRadiusThe new corner radius in dp.
-
Returns the color of the text.
Declaration
Objective-C
- (NTColor *)getTextColor;Return Value
The color of the text.
-
Sets the color of the text. The default is 0xFF000000.
Declaration
Objective-C
- (void)setTextColor:(NTColor *)textColor;Parameters
textColorThe new color for the text.
-
Returns the name of the text font.
Declaration
Objective-C
- (NSString *)getTextFontName;Return Value
The name of the text font.
-
Sets the name of the text font. It must be one of the fonts bundled with the platform. The default is HelveticaNeue-Light.
Declaration
Objective-C
- (void)setTextFontName:(NSString *)textFontName;Parameters
textFontNameThe new name for the text font.
-
Returns the size of the text font.
Declaration
Objective-C
- (int)getTextFontSize;Return Value
The size of the text font.
-
Sets the size of the text font. The default is 16.
Declaration
Objective-C
- (void)setTextFontSize:(int)textFontSize;Parameters
textFontSizeThe new size for the text font in pts.
-
Returns the margins of the text.
Declaration
Objective-C
- (NTBalloonPopupMargins *)getTextMargins;Return Value
The margins of the text.
-
Sets the margins for the text. The margins will determine how much empty space should surround the text. The default is BalloonPopupMargins(8, 4, 8, 8).
Declaration
Objective-C
- (void)setTextMargins:(NTBalloonPopupMargins *)textMargins;Parameters
textMarginsThe new margins for the text in dp.
-
Returns the color of the stroke surrounding the button.
Declaration
Objective-C
- (NTColor *)getStrokeColor;Return Value
The color of the stroke surrounding the button.
-
Sets the color of the stroke surrounding the button. The default is 0xFF000000.
Declaration
Objective-C
- (void)setStrokeColor:(NTColor *)strokeColor;Parameters
strokeColorThe new color of the stroke surrounding the button.
-
Returns the width of the stroke surrounding the button.
Declaration
Objective-C
- (int)getStrokeWidth;Return Value
The width of the stroke surrounding the button in dp.
-
Sets the width of the stroke surrounding the button. The default is 1.
Declaration
Objective-C
- (void)setStrokeWidth:(int)strokeWidth;Parameters
strokeWidthThe new width of the stroke surrounding the button.
-
Builds a new instance of the BalloonPopupButtonStyle object using previously set parameters.
Declaration
Objective-C
- (NTBalloonPopupButtonStyle *)buildStyle;Return Value
A new BalloonPopupButtonStyle object.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;
View on GitHub
NTBalloonPopupButtonStyleBuilder Class Reference