From 076d17be2ef7346f8c3173eb4854db09e73dd5c3 Mon Sep 17 00:00:00 2001 From: LegitCheetah Date: Tue, 6 Feb 2024 23:30:41 +0100 Subject: [PATCH] added Attributes (unfinished) --- src/main/htmlModules/ModuleGeneric.java | 32 +++++++++++++++++++------ src/main/htmlSites/SiteGeneric.java | 2 ++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/main/htmlModules/ModuleGeneric.java b/src/main/htmlModules/ModuleGeneric.java index 4e25206..da5ac9e 100644 --- a/src/main/htmlModules/ModuleGeneric.java +++ b/src/main/htmlModules/ModuleGeneric.java @@ -12,12 +12,12 @@ public class ModuleGeneric { protected String comment; protected List content = new ArrayList<>(); - //Global Attributes + //Global Attributes------------------------------------------------------------------------------------------------- protected char accessKey; protected String styleClass; protected Boolean contentEditable; - protected String dataPrefix; - protected String dataValue; + protected String dataPrefix; //used with dataValue + protected String dataValue; //used with dataPrefix protected String dir; protected Enum draggable; protected String enterKeyHint; @@ -26,17 +26,35 @@ public class ModuleGeneric { protected boolean inert; protected Enum inputMethod; protected Enum lang; - protected boolean popOver; - protected String popOverTaret; - protected Boolean spellcheck; + protected boolean popOver; //used with id & needs popovertarget on another tag + protected String popOverTaret; //needs id with the same name & popover on another tag + protected Boolean spellCheck; protected HashMap style; protected int tabIndex; protected String title; protected Boolean translate; - // + //Specific Attributes----------------------------------------------------------------------------------------------- + // + protected String accept; //used with type="file" //custom or Enum + protected String alt; //used with type="image" + protected Enum autoComplete; //Enum + protected Boolean autoFocus; + protected boolean checked; //used with type="checkbox" or type="radio" + protected boolean dirname; //used with name="" -> dirname="" + protected boolean disabled; + protected String form; //needs formID + protected String formAction; //used with type="submit" or type="image" + protected Enum formenctype; //used with type="submit" or type="image" + protected Enum formmethod; //used with type="submit" or type="image" + protected boolean formNoValidate; //used with type="submit" + protected Enum formTarget; //or custom //use with type="submit" or type="image" + //form + protected String acceptCharset; + protected String action; + public StringBuilder build(){ StringBuilder buildString = new StringBuilder(); buildString diff --git a/src/main/htmlSites/SiteGeneric.java b/src/main/htmlSites/SiteGeneric.java index fd2c1c0..b281cdb 100644 --- a/src/main/htmlSites/SiteGeneric.java +++ b/src/main/htmlSites/SiteGeneric.java @@ -28,6 +28,8 @@ public class SiteGeneric extends ModuleTag { addModule(this.body); } + + @Override public StringBuilder build() { StringBuilder buildString = new StringBuilder();