/
HTMLElement.java
50 lines (39 loc) · 897 Bytes
/
HTMLElement.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.eyeball.html4j.api;
import java.util.ArrayList;
/**
*
* Declares a class as an HTML element.
*
*/
public abstract class HTMLElement {
/**
* Gets the children
*
* <div> <a href="#"> Hi </a> <button value="Click"></button> </div>
*
* Where <code>a</code> and <code>b</code> are children
*
* @return The children
*/
public abstract ArrayList<HTMLElement> getChildren();
public abstract String getElementTagName();
public abstract String getSource(int spaces);
public abstract void addElement(HTMLElement element);
public abstract void removeElement(HTMLElement element);
/**
* HTML class name. <code>
* <button class="A"></button>
* </code>
*
* Sorry class not accepted, use clazz
*/
@Attribute
public String clazz = "";
/**
* This element's id
*/
@Attribute
public String id = "";
@Attribute
public String title = "";
}