/*******************************************************************************
* Copyright (c) 2004 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.wst.html.core.contentmodel;
import java.util.Collection;
import java.util.Iterator;
import java.util.Vector;
import org.eclipse.wst.common.contentmodel.CMNamedNodeMap;
import org.eclipse.wst.html.core.HTML40Namespace;
/**
* P.
*/
final class HedP extends HedInlineContainer {
private static Collection terminators = null;
/**
*/
public HedP(ElementCollection collection) {
super(HTML40Namespace.ElementName.P, collection);
correctionType = CORRECT_EMPTY;
layoutType = LAYOUT_BLOCK;
omitType = OMIT_END;
}
/**
* Create all attribute declarations.
* This method is called once in the constructor of the super class.
* The P
element may have the following attributes:
*
NAME | TYPE | USAGE | DEFAULT (INITIAL) VALUE | MEMO | *
---|---|---|---|---|
%attrs; | - | - | - | - | *
%align; | - | - | - | - | *
%align; means align (left|center|right|justify) #IMPLIED
.
* Unfortunately, this align
is different from one in
* IMG
or TABLE
. So, the attribute declaration
* of align
should be localy created and it shouldn't be registered
* in a HCMDocImpl
instance.
However, %align is used in sevaral times. I wouldn't write same code
* in many times. So, I add a new utility method into CMUtil
* to create the attribute declaration.
P
has terminators.
* @return java.util.Iterator
*/
protected Iterator getTerminators() {
if (terminators != null)
return terminators.iterator();
//<