added more attributes and renamed the others to better distinguish
This commit is contained in:
parent
076d17be2e
commit
24f1b7d680
@ -13,54 +13,156 @@ public class ModuleGeneric {
|
|||||||
protected List<ModuleGeneric> content = new ArrayList<>();
|
protected List<ModuleGeneric> content = new ArrayList<>();
|
||||||
|
|
||||||
//Global Attributes-------------------------------------------------------------------------------------------------
|
//Global Attributes-------------------------------------------------------------------------------------------------
|
||||||
protected char accessKey;
|
protected char globalAttributeAccesskey;
|
||||||
protected String styleClass;
|
protected String globalAttributeClass;
|
||||||
protected Boolean contentEditable;
|
protected Boolean globalAttributeContenteditable;
|
||||||
protected String dataPrefix; //used with dataValue
|
protected String globalAttributeDataPrefix; //used with dataValue
|
||||||
protected String dataValue; //used with dataPrefix
|
protected String globalAttributeDataValue; //used with dataPrefix
|
||||||
protected String dir;
|
protected String globalAttributeDir;
|
||||||
protected Enum draggable;
|
protected Enum globalAttributeDraggable;
|
||||||
protected String enterKeyHint;
|
protected String globalAttributeEnterkeyhint;
|
||||||
protected boolean hidden;
|
protected boolean globalAttributeHidden;
|
||||||
protected String id;
|
protected String globalAttributeId;
|
||||||
protected boolean inert;
|
protected boolean globalAttributeInert;
|
||||||
protected Enum inputMethod;
|
protected Enum globalAttributeInputmethod;
|
||||||
protected Enum lang;
|
protected Enum globalAttributeLang;
|
||||||
protected boolean popOver; //used with id & needs popovertarget on another tag
|
protected boolean globalAttributePopover; //used with id & needs popovertarget on another tag
|
||||||
protected String popOverTaret; //needs id with the same name & popover on another tag
|
protected Boolean globalAttributeSpellcheck;
|
||||||
protected Boolean spellCheck;
|
protected HashMap globalAttributeStyle;
|
||||||
protected HashMap style;
|
protected int globalAttributeTabindex;
|
||||||
protected int tabIndex;
|
protected String globalAttributeTitle;
|
||||||
protected String title;
|
protected Boolean globalAttributeTranslate;
|
||||||
protected Boolean translate;
|
|
||||||
|
|
||||||
//Specific Attributes-----------------------------------------------------------------------------------------------
|
//Specific Attributes-----------------------------------------------------------------------------------------------
|
||||||
|
//<area>
|
||||||
|
protected String areaAttributeAlt;
|
||||||
|
protected String areaAttributeCoords;
|
||||||
|
protected String areaAttributeDownload;
|
||||||
|
protected String areaAttributeHref;
|
||||||
|
protected Enum areaAttributeHreflang;
|
||||||
|
protected String areaAttributeMedia; //Enums
|
||||||
|
protected Enum areaAttributeReferrerpolicy;
|
||||||
|
protected Enum areaAttributeRel;
|
||||||
|
protected Enum areaAttributeShape;
|
||||||
|
protected String areaAttributeTarget; //and Enum
|
||||||
|
protected Enum areaAttributeType;
|
||||||
|
//<audio>
|
||||||
|
protected boolean audioAttributeAutoplay;
|
||||||
|
protected boolean audioAttributeControls;
|
||||||
|
protected boolean audioAttributeLoop;
|
||||||
|
protected boolean audioAttributeMuted;
|
||||||
|
protected Enum audioAttributePreload;
|
||||||
|
protected String audioAttributeSrc;
|
||||||
|
//<button>
|
||||||
|
protected boolean buttonAttributeAutofocus;
|
||||||
|
protected boolean buttonAttributeDisabled;
|
||||||
|
protected String buttonAttributeForm;
|
||||||
|
protected String buttonAttributeFormaction;
|
||||||
|
protected Enum buttonAttributeFormenctype;
|
||||||
|
protected Enum buttonAttributeFormmethod;
|
||||||
|
protected boolean buttonAttributeFormnovalidate;
|
||||||
|
protected String buttonAttributeFormtarget; //and Enum
|
||||||
|
protected String buttonAttributePopovertarget;
|
||||||
|
protected Enum buttonAttributePopovertargetaction;
|
||||||
|
protected String buttonAttributeName;
|
||||||
|
protected Enum buttonAttributeType;
|
||||||
|
protected String buttonAttributeValue;
|
||||||
|
//<form>
|
||||||
|
protected String formAttributeAcceptcharset;
|
||||||
|
protected String formAttributeAction;
|
||||||
|
protected Enum formAttributeAutocomplete;
|
||||||
|
protected Enum formAttributeEnctype;
|
||||||
|
protected Enum formAttributeMethod;
|
||||||
|
protected String formAttributeName;
|
||||||
|
protected boolean formAttributeNovalidate;
|
||||||
|
protected Enum formAttributeRel;
|
||||||
|
protected String formAttributeTarget; //and Enum
|
||||||
|
//<img>
|
||||||
|
protected String imgAttributeAlt;
|
||||||
|
protected Enum imgAttributeCrossorigin;
|
||||||
|
protected int imgAttributeHeight;
|
||||||
|
protected boolean imgAttributeIsmap;
|
||||||
|
protected Enum imgAttributeLoading;
|
||||||
|
protected String imgAttributeLongdesc;
|
||||||
|
protected Enum imgAttributeReferrerpolicy;
|
||||||
|
protected String imgAttributeSizes;
|
||||||
|
protected String imgAttributeSrc;
|
||||||
|
protected String imgAttributeSrcset;
|
||||||
|
protected String imgAttributeUsemap;
|
||||||
|
protected int imgAttributeWidth;
|
||||||
//<input>
|
//<input>
|
||||||
protected String accept; //used with type="file" //custom or Enum
|
protected String inputAttributeAccept; //used with type="file" //custom or Enum
|
||||||
protected String alt; //used with type="image"
|
protected String inputAttributeAlt; //used with type="image"
|
||||||
protected Enum autoComplete; //Enum
|
protected Enum inputAttributeAutocomplete; //Enum
|
||||||
protected Boolean autoFocus;
|
protected Boolean inputAttributeAutofocus;
|
||||||
protected boolean checked; //used with type="checkbox" or type="radio"
|
protected boolean inputAttributeChecked; //used with type="checkbox" or type="radio"
|
||||||
protected boolean dirname; //used with name="<value>" -> dirname="<value.dir>"
|
protected boolean inputAttributeDirname; //used with name="<value>" -> dirname="<value.dir>"
|
||||||
protected boolean disabled;
|
protected boolean inputAttributeDisabled;
|
||||||
protected String form; //needs formID
|
protected String inputAttributeForm; //needs formID
|
||||||
protected String formAction; //used with type="submit" or type="image"
|
protected String inputAttributeFormaction; //used with type="submit" or type="image"
|
||||||
protected Enum formenctype; //used with type="submit" or type="image"
|
protected Enum inputAttributeFormenctype; //used with type="submit" or type="image"
|
||||||
protected Enum formmethod; //used with type="submit" or type="image"
|
protected Enum inputAttributeFormmethod; //used with type="submit" or type="image"
|
||||||
protected boolean formNoValidate; //used with type="submit"
|
protected boolean inputAttributeFormnovalidate; //used with type="submit"
|
||||||
protected Enum formTarget; //or custom //use with type="submit" or type="image"
|
protected Enum inputAttributeFormtarget; //or custom //use with type="submit" or type="image"
|
||||||
|
protected int inputAttributeHeight; //used with type="image"
|
||||||
|
protected String inputAttributeList; //used with datalist and same as datalist id
|
||||||
|
protected String inputAttributeMax; //number or date
|
||||||
|
protected int inputAttributeMaxlength;
|
||||||
|
protected String inputAttributeMin; //number or date
|
||||||
|
protected int inputAttributeMinlength;
|
||||||
|
protected boolean inputAttributeMultiple;
|
||||||
|
protected String inputAttributeName;
|
||||||
|
protected String inputAttributePattern;
|
||||||
|
protected String inputAttributePlaceholder;
|
||||||
|
protected String inputAttributePopovertarget; //needs id with the same name & popover on another tag
|
||||||
|
protected Enum inputAttributePopovertargetaction;
|
||||||
|
protected boolean inputAttributeReadOnly;
|
||||||
|
protected boolean inputAttributeRequired;
|
||||||
|
protected int inputAttributeSize;
|
||||||
|
protected String inputAttributeSrc;
|
||||||
|
protected String inputAttributeStep;
|
||||||
|
protected Enum inputAttributeType;
|
||||||
|
protected String inputAttributeValue;
|
||||||
|
protected int inputAttributeWidth;
|
||||||
|
//<select>
|
||||||
|
protected boolean selectAttributeAutofocus;
|
||||||
|
protected boolean selectAttributeDisabled;
|
||||||
|
protected String selectAttributeForm;
|
||||||
|
protected boolean selectAttributeMultiple;
|
||||||
|
protected String selectAttributeName;
|
||||||
|
protected boolean selectAttributeRequired;
|
||||||
|
protected int selectAttributeSize;
|
||||||
|
//<script>
|
||||||
|
protected boolean scriptAttributeAsync;
|
||||||
|
protected Enum scriptAttributeCrossorigin;
|
||||||
|
protected boolean scriptAttributeDefer;
|
||||||
|
protected String scriptAttributeIntegrity;
|
||||||
|
protected Boolean scriptAttributeNomodule;
|
||||||
|
protected Enum scriptAttributeReferrerpolicy;
|
||||||
|
protected String scriptAttributeSrc;
|
||||||
|
protected Enum scriptAttributetype;
|
||||||
|
//<textarea>
|
||||||
|
protected boolean textareaAttributeAutofocus;
|
||||||
|
protected int textareaAttributeCols;
|
||||||
|
protected String textareaAttributeDirname;
|
||||||
|
protected boolean textareaAttributeDisabled;
|
||||||
|
protected String textareaAttributeForm;
|
||||||
|
protected int textareaAttributeMaxlength;
|
||||||
|
protected String textareaAttributeName;
|
||||||
|
protected String textareaAttributePlaceholder;
|
||||||
|
protected boolean textareaAttributeReadonly;
|
||||||
|
protected boolean textareaAttributeRequired;
|
||||||
|
protected int textareaAttributeRows;
|
||||||
|
protected Boolean textareaAttributeWrap;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//form
|
|
||||||
protected String acceptCharset;
|
|
||||||
protected String action;
|
|
||||||
|
|
||||||
public StringBuilder build(){
|
public StringBuilder build(){
|
||||||
StringBuilder buildString = new StringBuilder();
|
StringBuilder buildString = new StringBuilder();
|
||||||
buildString
|
buildString
|
||||||
.append("\n<")
|
.append("\n<")
|
||||||
.append(tag.getTag())
|
.append(tag.getTag())
|
||||||
.append(id != null ? " id=\"" + id +"\"" : "")
|
.append(globalAttributeId != null ? " id=\"" + globalAttributeId +"\"" : "")
|
||||||
.append(">");
|
.append(">");
|
||||||
|
|
||||||
for (ModuleGeneric moduleGeneric : content) {
|
for (ModuleGeneric moduleGeneric : content) {
|
||||||
|
@ -18,11 +18,11 @@ public class ModuleTag extends ModuleGeneric {
|
|||||||
|
|
||||||
|
|
||||||
public void setID(String ID) {
|
public void setID(String ID) {
|
||||||
this.id = ID;
|
this.globalAttributeId = ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getID() {
|
public String getID() {
|
||||||
return id;
|
return globalAttributeId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTag(HtmlTagsEnum tag) {
|
public void setTag(HtmlTagsEnum tag) {
|
||||||
|
Loading…
Reference in New Issue
Block a user