mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 10:49:24 +02:00
git-svn-id: https://only.mawhrin.net/repos/FBReaderJ/trunk@58 6a642e6f-84f6-412e-ac94-c4a38d5a04b0
This commit is contained in:
parent
bf89948a15
commit
a95a8f27b7
1 changed files with 43 additions and 2 deletions
|
@ -1,19 +1,46 @@
|
|||
package org.zlibrary.model.impl;
|
||||
|
||||
import org.zlibrary.model.ZLTextForcedControlEntry;
|
||||
import org.zlibrary.model.ZLTextModel;
|
||||
import org.zlibrary.model.ZLTextParagraph;
|
||||
import org.zlibrary.model.ZLTextParagraphEntry;
|
||||
import org.zlibrary.model.ZLTextPlainModel;
|
||||
import org.zlibrary.model.ZLTextTreeModel;
|
||||
import org.zlibrary.model.ZLTextTreeParagraph;
|
||||
import org.zlibrary.model.entry.ZLTextControlEntryPool;
|
||||
|
||||
|
||||
public class ZLModelFactory {
|
||||
public ZLTextModel createModel() {
|
||||
//models
|
||||
public ZLTextModel createModel() {
|
||||
return new ZLTextModelImpl();
|
||||
}
|
||||
|
||||
|
||||
public ZLTextPlainModel createPlainModel() {
|
||||
return new ZLTextPlainModelImpl();
|
||||
}
|
||||
|
||||
public ZLTextTreeModel createZLTextTreeModel() {
|
||||
return new ZLTextTreeModelImpl();
|
||||
}
|
||||
//paragraphs
|
||||
public ZLTextParagraph createParagraph() {
|
||||
return new ZLTextParagraphImpl();
|
||||
}
|
||||
|
||||
public ZLTextParagraph createSpecialParagragraph(ZLTextParagraph.Kind kind) {
|
||||
return new ZLTextSpecialParagraphImpl(kind);
|
||||
}
|
||||
|
||||
public ZLTextTreeParagraph createTreeParagraph(ZLTextTreeParagraph parent) {
|
||||
return new ZLTextTreeParagraphImpl(parent);
|
||||
}
|
||||
|
||||
public ZLTextTreeParagraph createTreeParagraph() {
|
||||
return new ZLTextTreeParagraphImpl();
|
||||
}
|
||||
|
||||
//entries
|
||||
public ZLTextControlEntryImpl createControlEntry(byte kind, boolean isStart) {
|
||||
return new ZLTextControlEntryImpl(kind, isStart);
|
||||
}
|
||||
|
@ -22,6 +49,20 @@ public class ZLModelFactory {
|
|||
return new ZLTextEntryImpl(text);
|
||||
}
|
||||
|
||||
public ZLTextParagraphEntry createHyperlinkControlEntry(byte kind, String label) {
|
||||
return new ZLTextHyperlinkControlEntryImpl(kind, label);
|
||||
}
|
||||
|
||||
public ZLTextParagraphEntry createFixedHSpaceEntry(byte lenght) {
|
||||
return new ZLTextFixedHSpaceEntryImpl(lenght);
|
||||
}
|
||||
|
||||
public ZLTextForcedControlEntry createForcedControlEntry() {
|
||||
return new ZLTextForcedControlEntryImpl();
|
||||
}
|
||||
|
||||
|
||||
//pool
|
||||
public ZLTextControlEntryPool createControlEntryPool() {
|
||||
return new ZLTextControlEntryPoolImpl();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue