public class TextActivityDocument extends DefaultStyledDocument
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElement
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement
Modifier and Type | Field and Description |
---|---|
static String |
BASE |
ActiveBagContent |
boxesContent |
static int |
DEFAULT_TAB |
static Color |
DEFAULT_TARGET_COLOR |
static Color |
DEFAULT_TARGET_ERROR_COLOR |
static String |
ELEMENT_NAME |
static String |
FILL |
protected int |
lastBoxId |
static String |
NAME |
static int |
NUM_TABS |
static String |
P |
ActiveBagContent |
popupsContent |
static String |
STYLE |
protected StyleContext |
styleContext |
protected int |
tabSpc |
static String |
TABSPC |
static String |
TARGET |
static String |
TARGET_ERROR |
protected int |
targetType |
static String |
TEXT |
TargetMarkerBag |
tmb |
static int |
TT_CHAR |
static int |
TT_FREE |
static int |
TT_PARAGRAPH |
static int |
TT_WORD |
buffer, BUFFER_SIZE_DEFAULT
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
StreamDescriptionProperty, TitleProperty
Constructor and Description |
---|
TextActivityDocument(StyleContext sc)
Creates new TextActivityDocument
|
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, insertString, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, insertString, putProperty, remove, removeUndoableEditListener, render
public static final int NUM_TABS
public static final int DEFAULT_TAB
public static final Color DEFAULT_TARGET_COLOR
public static final Color DEFAULT_TARGET_ERROR_COLOR
public static final String TARGET
public static final String TARGET_ERROR
public static final String FILL
public static final int TT_FREE
public static final int TT_CHAR
public static final int TT_WORD
public static final int TT_PARAGRAPH
protected int tabSpc
protected int lastBoxId
protected StyleContext styleContext
public TargetMarkerBag tmb
public ActiveBagContent boxesContent
public ActiveBagContent popupsContent
protected int targetType
public static final String ELEMENT_NAME
public static final String STYLE
public static final String TABSPC
public static final String TEXT
public static final String P
public static final String BASE
public static final String NAME
public TextActivityDocument(StyleContext sc)
public static void checkStyleContext(StyleContext sc)
public void readClic3Data(Clic3Activity c3a, TextActivityBase tab) throws Exception
Exception
public static JPanelActiveBox insertBox(ActiveBoxContent ab, int atPos, TextActivityDocument doc, TextActivityBase tab, AttributeSet atr) throws Exception
Exception
public static Style boxBaseToStyledDocument(BoxBase bb, StyledDocument sd)
public void setTabSpc(int newTabSpc)
protected static AttributeSet getAttributes(TextActivityDocument doc, AttributeSet a, Element e) throws Exception
Exception
protected static void fillAttributes(MutableAttributeSet a, Element e) throws Exception
Exception
protected static void addStyle(TextActivityDocument doc, Element e) throws Exception
Exception
public static void setStyledDocumentTabSpc(int tab, StyledDocument sd, StyleContext sc)
public int getTabSpc()
public static StyleContext copyStylesFrom(StyleContext src, StyleContext dest, boolean fontFace, boolean fontSize, boolean style, boolean colour, boolean targetColour, boolean errorColour)
public Element getJDomElement(StyleContext sc) throws Exception
Exception
public static void addStylesToElement(Element e, StyleContext sc, int tabSpc) throws Exception
Exception
protected static String getElementText(Element element) throws Exception
Exception
protected static void setJDomElementAttributes(Element e, AttributeSet atr, boolean isParagraph)
public static TextActivityDocument getTextActivityDocument(Element e, TextActivityBase tab) throws Exception
Exception
public TextActivityDocument cloneDoc(TextActivityDocument dest, boolean hideTargets, boolean initTargets, boolean hideTargetStyle) throws Exception
Exception
public static Font attributesToFont(AttributeSet s)
public JPanelActiveBox[] getPanelBoxes()
public void attachTo(JTextComponent tc, Activity.Panel parent)
public static boolean checkBooleanAttribute(AttributeSet atr, Object key)
public boolean checkBooleanAttribute(int offset, Object key)
public MutableAttributeSet getTargetAttributeSet()
public MutableAttributeSet getFillAttributeSet()
public void applyStyleToTarget(TargetMarker tm, String style, boolean invertColors, boolean replace)
public void clearAllTargets()
public Element getJDomElementWithoutStyles() throws Exception
Exception
protected void clearElementStyles(Element e)
public int getTargetType()
public void setTargetType(int targetType)
targetType
- New value of property targetType.Copyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.