001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.dto.html5; 014 015import static org.apache.juneau.xml.annotation.XmlFormat.*; 016 017import java.util.*; 018 019import org.apache.juneau.annotation.*; 020import org.apache.juneau.xml.annotation.*; 021 022/** 023 * DTO for an HTML {@doc ExtHTML5.grouping-content#the-pre-element <pre>} 024 * element. 025 * 026 * <ul class='seealso'> 027 * <li class='link'>{@doc DtoHtml5} 028 * </ul> 029 */ 030@Bean(typeName="pre") 031public class Pre extends HtmlElementMixed { 032 033 /** 034 * Creates an empty {@link Pre} element. 035 */ 036 public Pre() {} 037 038 /** 039 * Creates a {@link Pre} element with the specified child nodes. 040 * 041 * @param children The child nodes. 042 */ 043 public Pre(Object...children) { 044 children(children); 045 } 046 047 //----------------------------------------------------------------------------------------------------------------- 048 // Overridden methods 049 //----------------------------------------------------------------------------------------------------------------- 050 051 @Xml(format=MIXED_PWS) 052 @Beanp(dictionary=HtmlBeanDictionary.class, name="c") 053 @Override 054 public LinkedList<Object> getChildren() { 055 return super.getChildren(); 056 } 057 058 @Override /* HtmlElement */ 059 public final Pre _class(String _class) { 060 super._class(_class); 061 return this; 062 } 063 064 @Override /* HtmlElement */ 065 public final Pre id(String id) { 066 super.id(id); 067 return this; 068 } 069 070 @Override /* HtmlElement */ 071 public final Pre style(String style) { 072 super.style(style); 073 return this; 074 } 075 076 @Override /* HtmlElementMixed */ 077 public Pre children(Object...children) { 078 super.children(children); 079 return this; 080 } 081 082 @Override /* HtmlElementMixed */ 083 public Pre child(Object child) { 084 super.child(child); 085 return this; 086 } 087}