Child: [r24] (diff)

Download this file

Page.java    63 lines (53 with data), 1.5 kB

 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
51
52
53
54
55
56
57
58
59
60
61
62
/*
* SPDXVersion: SPDX-1.1
* Creator: Person: Nuno Brito (nuno.brito@triplecheck.de)
* Creator: Organization: TripleCheck (contact@triplecheck.de)
* Created: 2013-11-13T00:00:00Z
* LicenseName: NOASSERTION
* FileName: Page.java
* FileType: SOURCE
* FileCopyrightText: <text> Copyright 2013 Nuno Brito, TripleCheck </text>
* FileComment: <text> Defines the contents of a web page, captures details
* such as position of the text cursor, content, selected node, etc. </text>
*/
package GUI;
import definitions.is;
/**
*
* @author Nuno Brito, 13th of November 2013 in Darmstadt, Germany.
* nuno.brito@triplecheck.de | http://nunobrito.eu
*/
public class Page {
public String
contentType = is.contentHTML,
header = "",
body = "",
content = "",
footer = "";
public int carotPosition = 0;
public Boolean editable = false;
/**
* Does this page has any real content or not?
* @return
*/
public boolean hasContent(){
if(content == null){
return false;
}
if(content.length() > 0){
return true;
}
// nothing worked, return as empty
return false;
}
/**
* gets a page ready for web publishing
* @return the HTML code to be inserted on the web page
*/
public String getText(){
return header
+ body
+ content
+ footer;
}
}