📄 tagandattributes.java
字号:
/**
*
*/
/**
* @author LightingMan
*
*/
import javax.swing.text.html.*;
import java.util.*;
public class TagAndAttributes {
private HTML.Tag name;
private static ArrayList<HTML.Attribute> attributes;
/**
*
* @param tagName The tag to get its all attributes
* @return The set of attributes of the given tag
*/
public static ArrayList<HTML.Attribute> getAttribute(HTML.Tag tagName){
if (tagName.equals(HTML.Tag.A))
attributes= ATag.getAttributes();
if (tagName.equals(HTML.Tag.ADDRESS))
attributes=AddressTag.getAttributes();
if (tagName.equals(HTML.Tag.APPLET))
attributes=AppletTag.getAttributes();
if (tagName.equals(HTML.Tag.AREA))
attributes=AreaTag.getAttributes();
if (tagName.equals(HTML.Tag.B))
attributes=AreaTag.getAttributes();
if (tagName.equals(HTML.Tag.BASE))
attributes=BaseTag.getAttributes();
if (tagName.equals(HTML.Tag.BASEFONT))
attributes=BasefontTag.getAttributes();
if (tagName.equals(HTML.Tag.BIG))
attributes=BigTag.getAttributes();
if (tagName.equals(HTML.Tag.BLOCKQUOTE))
attributes=BlockquoteTag.getAttributes();
if (tagName.equals(HTML.Tag.BODY))
attributes=BodyTag.getAttributes();
if (tagName.equals(HTML.Tag.BR))
attributes=BrTag.getAttributes();
if (tagName.equals(HTML.Tag.CAPTION))
attributes=CaptionTag.getAttributes();
if (tagName.equals(HTML.Tag.CENTER))
attributes=CenterTag.getAttributes();
if (tagName.equals(HTML.Tag.CITE))
attributes=CiteTag.getAttributes();
if (tagName.equals(HTML.Tag.CODE))
attributes=CodeTag.getAttributes();
if (tagName.equals(HTML.Tag.DD))
attributes=DdTag.getAttributes();
if (tagName.equals(HTML.Tag.DFN))
attributes=DfnTag.getAttributes();
if (tagName.equals(HTML.Tag.DIR))
attributes=DirTag.getAttributes();
if (tagName.equals(HTML.Tag.DIV))
attributes=DivTag.getAttributes();
if (tagName.equals(HTML.Tag.DL))
attributes=DlTag.getAttributes();
if (tagName.equals(HTML.Tag.DT))
attributes=DtTag.getAttributes();
if (tagName.equals(HTML.Tag.EM))
attributes=EmTag.getAttributes();
if (tagName.equals(HTML.Tag.FONT))
attributes=FontTag.getAttributes();
if (tagName.equals(HTML.Tag.FORM))
attributes=FormTag.getAttributes();
if (tagName.equals(HTML.Tag.FRAME))
attributes=FrameTag.getAttributes();
if (tagName.equals(HTML.Tag.FRAMESET))
attributes=FramesetTag.getAttributes();
if (tagName.equals(HTML.Tag.H1)||tagName.equals(HTML.Tag.H2)||tagName.equals(HTML.Tag.H3)||
tagName.equals(HTML.Tag.H4)||tagName.equals(HTML.Tag.H5)||tagName.equals(HTML.Tag.H6))
attributes=HTag.getAttributes();
if (tagName.equals(HTML.Tag.HEAD))
attributes=HeadTag.getAttributes();
if (tagName.equals(HTML.Tag.HR))
attributes=HrTag.getAttributes();
if (tagName.equals(HTML.Tag.HTML))
attributes=HTMLTag.getAttributes();
if (tagName.equals(HTML.Tag.I))
attributes=ITag.getAttributes();
if (tagName.equals(HTML.Tag.IMG))
attributes=ImgTag.getAttributes();
if (tagName.equals(HTML.Tag.INPUT))
attributes=InputTag.getAttributes();
if (tagName.equals(HTML.Tag.KBD))
attributes=KbdTag.getAttributes();
if (tagName.equals(HTML.Tag.LI))
attributes=LiTag.getAttributes();
if (tagName.equals(HTML.Tag.LINK))
attributes=LinkTag.getAttributes();
if (tagName.equals(HTML.Tag.MAP))
attributes=MapTag.getAttributes();
if (tagName.equals(HTML.Tag.MENU))
attributes=MenuTag.getAttributes();
if (tagName.equals(HTML.Tag.META))
attributes=MetaTag.getAttributes();
if (tagName.equals(HTML.Tag.NOFRAMES))
attributes=NoframesTag.getAttributes();
if (tagName.equals(HTML.Tag.OBJECT))
attributes=ObjectTag.getAttributes();
if (tagName.equals(HTML.Tag.OL))
attributes=OlTag.getAttributes();
if (tagName.equals(HTML.Tag.OPTION))
attributes=OptionTag.getAttributes();
if (tagName.equals(HTML.Tag.P))
attributes=PTag.getAttributes();
if (tagName.equals(HTML.Tag.PARAM))
attributes=ParamTag.getAttributes();
if (tagName.equals(HTML.Tag.PRE))
attributes=PreTag.getAttributes();
if (tagName.equals(HTML.Tag.S))
attributes=STag.getAttributes();
if (tagName.equals(HTML.Tag.SAMP))
attributes=SampTag.getAttributes();
if (tagName.equals(HTML.Tag.SCRIPT))
attributes=ScriptTag.getAttributes();
if (tagName.equals(HTML.Tag.SELECT))
attributes=SelectTag.getAttributes();
if (tagName.equals(HTML.Tag.SMALL))
attributes=SmallTag.getAttributes();
if (tagName.equals(HTML.Tag.SPAN))
attributes=SpanTag.getAttributes();
if (tagName.equals(HTML.Tag.STRIKE))
attributes=StrikeTag.getAttributes();
if (tagName.equals(HTML.Tag.STRONG))
attributes=StrongTag.getAttributes();
if (tagName.equals(HTML.Tag.STYLE))
attributes=StyleTag.getAttributes();
if (tagName.equals(HTML.Tag.SUB))
attributes=SubTag.getAttributes();
if (tagName.equals(HTML.Tag.SUP))
attributes=SupTag.getAttributes();
if (tagName.equals(HTML.Tag.TABLE))
attributes=TableTag.getAttributes();
if (tagName.equals(HTML.Tag.TD))
attributes=TdTag.getAttributes();
if (tagName.equals(HTML.Tag.TEXTAREA))
attributes=TextareaTag.getAttributes();
if (tagName.equals(HTML.Tag.TH))
attributes=ThTag.getAttributes();
if (tagName.equals(HTML.Tag.TITLE))
attributes=TitleTag.getAttributes();
if (tagName.equals(HTML.Tag.TR))
attributes=TrTag.getAttributes();
if (tagName.equals(HTML.Tag.TT))
attributes=TtTag.getAttributes();
if (tagName.equals(HTML.Tag.U))
attributes=UTag.getAttributes();
if (tagName.equals(HTML.Tag.UL))
attributes=UlTag.getAttributes();
if (tagName.equals(HTML.Tag.VAR))
attributes=VarTag.getAttributes();
return attributes;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -