diff --git a/src/as/com/threerings/flex/FlexUtil.as b/src/as/com/threerings/flex/FlexUtil.as index 88cc45ba..4af5cffd 100644 --- a/src/as/com/threerings/flex/FlexUtil.as +++ b/src/as/com/threerings/flex/FlexUtil.as @@ -34,31 +34,19 @@ import mx.core.UIComponent; public class FlexUtil { /** - * Creates a label with the supplied text and tooltip, and optionally applies a style class to - * it. + * Creates a label with the supplied text, and optionally applies a style class and tooltip + * to it. */ - public static function createTipLabel ( - text :String, toolTip :String, style :String = null) :Label + public static function createLabel ( + text :String, style :String = null, toolTip :String = null) :Label { var label :Label = new Label(); label.text = text; - if (toolTip != null) { - label.toolTip = toolTip; - } - if (style != null) { - label.styleName = style; - } + label.styleName = style; + label.toolTip = toolTip; return label; } - /** - * Creates a label with the supplied text, and optionally applies a style class to it. - */ - public static function createLabel (text :String, style :String = null) :Label - { - return createTipLabel(text, null, style); - } - /** * Create an uneditable/unselectable multiline Text widget with the specified text and width. */