Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER Copyright 2010 IBM. All rights reserved. Use is subject to license terms. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0. You can also obtain a copy of the License at http://odftoolkit.org/docs/license.txt Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. /
 
 package org.odftoolkit.simple.style;
 
This class represents the paragraph style settings. It provides methods to access horizontal alignment. More functions will be added latter.

This class is a corresponded high level class for element "style:paragraph-properties". It provides methods to access the attributes and children of "style:paragraph-properties".

Since:
0.3
 
 public class ParagraphProperties {
 
 	// fo:text-align
 
Create an empty paragraph style setting object
 
 	protected ParagraphProperties() {
 	}

Create a paragraph style setting object, which has the association with an element "style:paragraph-properties".

Parameters:
properties - the element "style:paragraph-properties"
 
 		 = properties;
 	}

Set the horizontal alignment.

If the first parameter is null, the horizontal alignment setting will be removed.

Parameters:
alignType - the horizontal alignment
 
 	public void setHorizontalAlignment(HorizontalAlignmentType alignType) {
 		if (alignType == .)
 		else
 	}

Return the horizontal alignment.

Null will be returned if there is no horizontal alignment setting.

Returns:
- the horizontal alignment; null if there is no horizontal alignment setting.
 
 		if ((alignType == null) || (alignType.length() == 0))
 
 		FoTextAlignAttribute.Value value = FoTextAlignAttribute.Value.enumValueOf(alignType);
 		switch (value) {
 		case :
 		case :
		case :
		case :
		case :
		case :
		}
		return null;
	}

Return an instance of ParagraphProperties to represent the "style:paragraph-properties" in a style element.

If there is no "style:paragraph-properties" defined in the style element, a new "style:paragraph-properties" element will be created.

Parameters:
style - a style element
Returns:
an instance of ParagraphProperties
		OdfStylePropertiesBase properties = style
	}

Return an instance of ParagraphProperties to represent the "style:paragraph-properties" in a style element.

If there is no "style:paragraph-properties" defined in the style element, null will be returned.

Parameters:
style - a style element
Returns:
an instance of ParagraphProperties;Null if there is no "style:paragraph-properties" defined
		if (properties != null)
		else
			return null;
	}
New to GrepCode? Check out our FAQ X