|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--javax.swing.text.JTextComponent | +--javax.swing.JEditorPane | +--javax.swing.JTextPane | +--org.thdl.tib.bibl.TextPane
An extension of Swing's JPanel that is used to create the display for a
text's bibliographic information. The panel is created using the text's information
contained in a TibDoc
and then is added or set to the content pane
of the main frame which is an TibFrame
.
Field Summary | |
static String |
ADD
|
static String |
BOLD
|
(package private) int |
caretPos
|
(package private) org.thdl.tib.bibl.TiblEdit |
controller
|
static String |
HEAD
|
static String |
HEAD_ITALIC
|
static String |
ITALIC
|
static String |
LARGE
|
static String |
RED
|
static String |
REG
This and the following are static, style constants. |
static String |
SMALL
|
static String |
TEXT_HEAD
|
static String |
TEXT_HEAD_ITALIC
|
(package private) org.thdl.tib.bibl.TibDoc |
tibDoc
This is the TibDoc that is the XML document from which the information for
the JTextPane 's document comes. |
(package private) Object[][] |
titleRefs
This is a two-dimensional array of Element s that holds the titles displayed in
this text pane, with the strings starting position, and length. |
static String |
VARIANT
|
Fields inherited from class javax.swing.JTextPane |
|
Fields inherited from class javax.swing.JEditorPane |
|
Fields inherited from class javax.swing.text.JTextComponent |
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
TextPane(org.thdl.tib.bibl.TiblEdit tt)
|
Method Summary | |
org.thdl.tib.bibl.TiblEdit |
getController()
|
int |
getOffset()
|
int |
getPreviousParagraphIndex()
|
JScrollPane |
getScrollPane()
|
protected void |
initStyles()
This method initializes the styles used for the given JTextPane . |
void |
reset()
|
void |
setController(org.thdl.tib.bibl.TiblEdit tt)
|
void |
setTextPane(String[] phrases,
String[] styles)
This method takes a string array of phrases and a string array of associated style names iterates through them and inserts the strings with their styles one by one into this TextPane 's document. |
org.thdl.tib.bibl.ElementList |
setTextPane(Vector styleElements)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
org.thdl.tib.bibl.TiblEdit controller
org.thdl.tib.bibl.TibDoc tibDoc
This is the TibDoc
that is the XML document from which the information for
the JTextPane
's document comes. It needs to be here so we can use it functionality
to navigate the XML hierarchy and extract certain information.
Object[][] titleRefs
This is a two-dimensional array of Element
s that holds the titles displayed in
this text pane, with the strings starting position, and length. It is used to reference the
element for editing when the cursor is positioned on a specific title.
int caretPos
public static String REG
This and the following are static, style constants. I.e., they're names of the styles.
public static String HEAD
public static String HEAD_ITALIC
public static String TEXT_HEAD
public static String TEXT_HEAD_ITALIC
public static String ITALIC
public static String BOLD
public static String ADD
public static String VARIANT
public static String RED
public static String SMALL
public static String LARGE
Constructor Detail |
public TextPane(org.thdl.tib.bibl.TiblEdit tt)
Method Detail |
public void setController(org.thdl.tib.bibl.TiblEdit tt)
public org.thdl.tib.bibl.TiblEdit getController()
public void setTextPane(String[] phrases, String[] styles)
This method takes a string array of phrases and a string array of associated style names
iterates through them and inserts the strings with their styles one by one into
this TextPane
's document.
public org.thdl.tib.bibl.ElementList setTextPane(Vector styleElements)
public void reset()
protected void initStyles()
This method initializes the styles used for the given JTextPane
.
It adds a regular, italic, bold, small, and large styles, plus styles that
change the background color to green, yellow, or red to indicate different
types of annotations. Green = addition; yellow = alternative reading or variant;
red = omission/deletion.
public int getOffset()
public int getPreviousParagraphIndex()
public JScrollPane getScrollPane()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |