- Author
- Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g
Definition at line 32 of file WikiElement.java.
◆ WikiElement() [1/3]
org.turro.zkoss.text.WikiElement.WikiElement |
( |
int |
selectionStart, |
|
|
InputElement |
input, |
|
|
String |
tag |
|
) |
| |
Definition at line 43 of file WikiElement.java.
44 this.selectionStart = selectionStart;
45 this.selectionEnd = selectionStart;
48 this.text = input.getText();
◆ WikiElement() [2/3]
org.turro.zkoss.text.WikiElement.WikiElement |
( |
int |
selectionStart, |
|
|
int |
selectionEnd, |
|
|
InputElement |
input |
|
) |
| |
Definition at line 52 of file WikiElement.java.
53 this(selectionStart, selectionEnd, input,
null);
◆ WikiElement() [3/3]
org.turro.zkoss.text.WikiElement.WikiElement |
( |
int |
selectionStart, |
|
|
int |
selectionEnd, |
|
|
InputElement |
input, |
|
|
String |
avoid[] |
|
) |
| |
Definition at line 56 of file WikiElement.java.
57 this.selectionStart = selectionStart;
58 this.selectionEnd = selectionEnd;
61 this.text = input.getText();
◆ addClass()
void org.turro.zkoss.text.WikiElement.addClass |
( |
String |
sclass | ) |
|
Definition at line 104 of file WikiElement.java.
105 String classes = attributes.get(
"&class");
106 if(classes !=
null) {
107 if(!classes.contains(sclass)) {
108 classes +=
" " + sclass;
113 attributes.put(
"&class", classes);
◆ addNoValuedAttribute()
void org.turro.zkoss.text.WikiElement.addNoValuedAttribute |
( |
String |
value | ) |
|
◆ forgetAndCreate()
void org.turro.zkoss.text.WikiElement.forgetAndCreate |
( |
String |
newTag | ) |
|
◆ getAttributes()
HashMap<String, String> org.turro.zkoss.text.WikiElement.getAttributes |
( |
| ) |
|
◆ getFistNoneValued()
String org.turro.zkoss.text.WikiElement.getFistNoneValued |
( |
| ) |
|
Definition at line 95 of file WikiElement.java.
96 for(String s : attributes.keySet()) {
97 if(attributes.get(s).equals(
"no-value")) {
◆ inside()
boolean org.turro.zkoss.text.WikiElement.inside |
( |
| ) |
|
◆ isCreating()
boolean org.turro.zkoss.text.WikiElement.isCreating |
( |
| ) |
|
◆ isTag()
boolean org.turro.zkoss.text.WikiElement.isTag |
( |
String |
tag | ) |
|
Definition at line 79 of file WikiElement.java.
80 return this.tag ==
null ? false : this.tag.equals(tag);
◆ removeValuedAttributes()
void org.turro.zkoss.text.WikiElement.removeValuedAttributes |
( |
| ) |
|
Definition at line 116 of file WikiElement.java.
117 Iterator<String> it = attributes.keySet().iterator();
118 while(it.hasNext()) {
119 String v = attributes.get(it.next());
120 if(!
"no-value".equals(v)) {
◆ render()
boolean org.turro.zkoss.text.WikiElement.render |
( |
| ) |
|
Definition at line 170 of file WikiElement.java.
171 int pointer = creating ? selectionStart : startElement;
172 if(!Strings.isBlank(tag)) {
174 input.setSelectedText(pointer, endElement + 1,
"",
false);
176 String tagString = elementString();
177 input.setSelectedText(pointer, pointer, tagString,
false);
179 if(!Strings.isBlank(content)) {
180 pointer += tagString.length();
181 input.setSelectedText(pointer, pointer, content,
false);
182 pointer += content.length();
184 input.setSelectedText(pointer, pointer,
"[/" + tag +
"]",
false);
◆ renderImage()
boolean org.turro.zkoss.text.WikiElement.renderImage |
( |
File |
image | ) |
|
Definition at line 225 of file WikiElement.java.
227 int pointer = creating ? selectionStart : startElement;
228 if(!Strings.isBlank(tag)) {
230 input.setSelectedText(pointer, endElement + 1,
"",
false);
232 String tagString = imageString(image);
233 input.setSelectedText(pointer, pointer, tagString,
false);
◆ setContent()
void org.turro.zkoss.text.WikiElement.setContent |
( |
String |
content | ) |
|
◆ NON_BLOCK_ELEMENTS
final String [] org.turro.zkoss.text.WikiElement.NON_BLOCK_ELEMENTS = { "img" } |
|
static |
The documentation for this class was generated from the following file: