Added GlobalizedMessage, some documentation and formatting
git-svn-id: https://svn.libreccm.org/ccm/trunk@2118 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
3fd45cbb63
commit
f49990cf32
|
|
@ -18,6 +18,8 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.bebop;
|
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
|
* @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) {
|
public ActionLink(String label) {
|
||||||
this(new Label(label));
|
this(new Label(label));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -219,6 +219,8 @@ public class Label extends BlockStylable implements Cloneable {
|
||||||
* current ResourceBundle if possible, or displayed literally.
|
* current ResourceBundle if possible, or displayed literally.
|
||||||
* @param state the page state
|
* @param state the page state
|
||||||
* @pre state == null implies !isLocked()
|
* @pre state == null implies !isLocked()
|
||||||
|
* @deprecated refactor to use @see setLabel(GlobalizedMessage, PageState)
|
||||||
|
* instead!
|
||||||
*/
|
*/
|
||||||
public void setLabel(String label, PageState state) {
|
public void setLabel(String label, PageState state) {
|
||||||
if (label == null || label.length() == 0) {
|
if (label == null || label.length() == 0) {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ public class Option extends BlockStylable {
|
||||||
/**
|
/**
|
||||||
* If the component is a Label (which most of the time it is)
|
* If the component is a Label (which most of the time it is)
|
||||||
* then this returns the value of the label. This assumes
|
* 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
|
* @exception ClassCastException is thrown if the component is not
|
||||||
* a label
|
* a label
|
||||||
|
|
@ -208,6 +208,7 @@ public class Option extends BlockStylable {
|
||||||
/**
|
/**
|
||||||
* Generate XML depending on what OptionGroup we belong to.
|
* Generate XML depending on what OptionGroup we belong to.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void generateXML(PageState s, Element e) {
|
public void generateXML(PageState s, Element e) {
|
||||||
Element option = e.newChildElement(m_group.m_xmlElement, BEBOP_XML_NS);
|
Element option = e.newChildElement(m_group.m_xmlElement, BEBOP_XML_NS);
|
||||||
if ( ! m_isSelectOption ) {
|
if ( ! m_isSelectOption ) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue