com.google.wave.api
Class Line

java.lang.Object
  extended by com.google.wave.api.BlipContent
      extended by com.google.wave.api.Element
          extended by com.google.wave.api.Line
All Implemented Interfaces:
java.io.Serializable

public class Line
extends Element

Represents a line within a Wave.

See Also:
Serialized Form

Field Summary
static java.lang.String ALIGNMENT
           
static java.lang.String DIRECTION
           
static java.lang.String INDENT
           
static java.lang.String LINE_TYPE
           
 
Constructor Summary
Line()
          Constructs an unstyled line.
Line(java.util.Map<java.lang.String,java.lang.String> properties)
          Constructs a line with a given set of properties.
 
Method Summary
 java.lang.String getAlignment()
          The alignment of the text in the line.
 java.lang.String getDirection()
          The display direction of the line l = left to right, r = right to left
 java.lang.String getIndent()
          The indentation level (0,1,2,...).
 java.lang.String getLineType()
          The type of the line.
static Restriction restricByLineType(java.lang.String lineType)
          Creates an instance of Restriction that can be used to search for line with the given line type.
static Restriction restrictByAlignment(java.lang.String alignment)
          Creates an instance of Restriction that can be used to search for line with the given alignment.
static Restriction restrictByDirection(java.lang.String direction)
          Creates an instance of Restriction that can be used to search for line with the given direction.
static Restriction restrictByIndent(java.lang.String indent)
          Creates an instance of Restriction that can be used to search for line with the given indentation.
 void setAlignment(java.lang.String attribute)
          Set the alignment for the line.
 void setDirection(java.lang.String value)
          Set the direction for the line.
 void setIndent(java.lang.String value)
          Set the indent for the line.
 void setLineType(java.lang.String lineType)
          Set the type of the line.
 
Methods inherited from class com.google.wave.api.Element
getProperties, getProperty, getProperty, getText, getType, isAttachment, isFormElement, isGadget, isImage, isInlineBlip, setProperty, toString
 
Methods inherited from class com.google.wave.api.BlipContent
asElement, asPlaintext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ALIGNMENT

public static final java.lang.String ALIGNMENT
See Also:
Constant Field Values

DIRECTION

public static final java.lang.String DIRECTION
See Also:
Constant Field Values

INDENT

public static final java.lang.String INDENT
See Also:
Constant Field Values

LINE_TYPE

public static final java.lang.String LINE_TYPE
See Also:
Constant Field Values
Constructor Detail

Line

public Line()
Constructs an unstyled line.


Line

public Line(java.util.Map<java.lang.String,java.lang.String> properties)
Constructs a line with a given set of properties.

Parameters:
properties - the properties of the line.
Method Detail

getLineType

public java.lang.String getLineType()
The type of the line. Allowed values are 'h1', 'h2', 'h3', 'h4', 'h5', and 'li', where h[1-5] is a heading and 'li' an item in a list.

Returns:
the type of the line.

setLineType

public void setLineType(java.lang.String lineType)
Set the type of the line.


getIndent

public java.lang.String getIndent()
The indentation level (0,1,2,...). This attribute is only meaningful when applied to lines of type t="li".

Returns:
the indent

setIndent

public void setIndent(java.lang.String value)
Set the indent for the line.


getAlignment

public java.lang.String getAlignment()
The alignment of the text in the line. (a, m, r, j) a = align left = centered = aligned right = justified

Returns:
the alignment

setAlignment

public void setAlignment(java.lang.String attribute)
Set the alignment for the line.


getDirection

public java.lang.String getDirection()
The display direction of the line l = left to right, r = right to left

Returns:
the direction

setDirection

public void setDirection(java.lang.String value)
Set the direction for the line.


restrictByAlignment

public static Restriction restrictByAlignment(java.lang.String alignment)
Creates an instance of Restriction that can be used to search for line with the given alignment.

Parameters:
alignment - the alignment to filter.
Returns:
an instance of Restriction.

restrictByDirection

public static Restriction restrictByDirection(java.lang.String direction)
Creates an instance of Restriction that can be used to search for line with the given direction.

Parameters:
direction - the direction to filter.
Returns:
an instance of Restriction.

restrictByIndent

public static Restriction restrictByIndent(java.lang.String indent)
Creates an instance of Restriction that can be used to search for line with the given indentation.

Parameters:
indent - the indentation to filter.
Returns:
an instance of Restriction.

restricByLineType

public static Restriction restricByLineType(java.lang.String lineType)
Creates an instance of Restriction that can be used to search for line with the given line type.

Parameters:
lineType - the line type to filter.
Returns:
an instance of Restriction.