From f49990cf32eaf628136252997dd30c6b94e6f979 Mon Sep 17 00:00:00 2001 From: pb Date: Sun, 7 Apr 2013 14:36:14 +0000 Subject: [PATCH] Added GlobalizedMessage, some documentation and formatting git-svn-id: https://svn.libreccm.org/ccm/trunk@2118 8810af33-2d31-482b-a856-94f89814c4df --- ccm-core/src/com/arsdigita/bebop/ActionLink.java | 12 ++++++++++++ ccm-core/src/com/arsdigita/bebop/Label.java | 2 ++ ccm-core/src/com/arsdigita/bebop/form/Option.java | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/ccm-core/src/com/arsdigita/bebop/ActionLink.java b/ccm-core/src/com/arsdigita/bebop/ActionLink.java index b456fded0..db24042d0 100755 --- a/ccm-core/src/com/arsdigita/bebop/ActionLink.java +++ b/ccm-core/src/com/arsdigita/bebop/ActionLink.java @@ -18,6 +18,8 @@ */ package com.arsdigita.bebop; +import com.arsdigita.globalization.GlobalizedMessage; + /** @@ -63,6 +65,16 @@ public class ActionLink extends ControlLink { * * @param label the string label for the link */ + public ActionLink(GlobalizedMessage label) { + this(new Label(label)); + } + + /** + * Constructs a new ActionLink with the given string label. + * + * @param label the string label for the link + * @deprecated refactor to use @see ActionLink(GlobalizedMessage label) + */ public ActionLink(String label) { this(new Label(label)); } diff --git a/ccm-core/src/com/arsdigita/bebop/Label.java b/ccm-core/src/com/arsdigita/bebop/Label.java index e5ca0bf85..c7cae0a83 100755 --- a/ccm-core/src/com/arsdigita/bebop/Label.java +++ b/ccm-core/src/com/arsdigita/bebop/Label.java @@ -219,6 +219,8 @@ public class Label extends BlockStylable implements Cloneable { * current ResourceBundle if possible, or displayed literally. * @param state the page state * @pre state == null implies !isLocked() + * @deprecated refactor to use @see setLabel(GlobalizedMessage, PageState) + * instead! */ public void setLabel(String label, PageState state) { if (label == null || label.length() == 0) { diff --git a/ccm-core/src/com/arsdigita/bebop/form/Option.java b/ccm-core/src/com/arsdigita/bebop/form/Option.java index 55e588aa6..fd3b0a9a2 100755 --- a/ccm-core/src/com/arsdigita/bebop/form/Option.java +++ b/ccm-core/src/com/arsdigita/bebop/form/Option.java @@ -70,7 +70,7 @@ public class Option extends BlockStylable { /** * If the component is a Label (which most of the time it is) * then this returns the value of the label. This assumes - * that the Component is a lable + * that the Component is a label * * @exception ClassCastException is thrown if the component is not * a label @@ -208,6 +208,7 @@ public class Option extends BlockStylable { /** * Generate XML depending on what OptionGroup we belong to. */ + @Override public void generateXML(PageState s, Element e) { Element option = e.newChildElement(m_group.m_xmlElement, BEBOP_XML_NS); if ( ! m_isSelectOption ) {