org.thdl.tib.bibl
Class TextPane

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
All Implemented Interfaces:
Accessible, ImageObserver, MenuContainer, Scrollable, Serializable, TibConstants

public class TextPane
extends JTextPane
implements TibConstants

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.

Author:
Than Garson, Tibetan and Himalayan Digital Library
See Also:
Serialized Form

Field Summary
static String ADD
           
static String BOLD
           
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
           
static String VARIANT
           
 
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.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface org.thdl.tib.bibl.TibConstants
ABBR, ABOUT, ADD_DOX, ALT, ANUYOGA, AP, AP_CHECK, APP_SUBMIT, ATIYOGA, BACK, BAD_PARA, BASE_FONT_NAME, BASE_FONT_SIZE, BG, BIN, BIN_LOGIN, BODY, BOLD_FONT, BRIEF, BUT_MARGINS, BUTT_PANEL_SIZE, BUTTON_SIZE, CANC, CANCEL, CANCEL_NEW_APP, CATEG, CHANGE, CHAP_TITLES_HEAD, CHAPS, CHAPTER, CIT, CLASS, CLOSE_TITLE_HEAD, CLOSEFILE, CLOSING, CONTROL, CONTROL_SOURCE, CONTROLLER, CORRESP, CORRESP_NG, CREATE_FILE_LIST, CREATE_FILE_LIST_SPECS, CREATE_FILE_LIST_TITLE, CREATOR, CRIT_ED_DESC, CRIT_ED_LABEL, CRIT_TITLE, CROSSREF, CURR_DIR, DATA_DIRECTORY, DATE, DATE_DELIM, DATE_MESSAGE, DATE_TITLE, DEFAULT_BGCOLOR, DEFAULT_BUTTON_COLOR, DEFAULT_DIRECTORY, DEFAULT_FONT, DEFAULT_HEADER, DEFAULT_INSETS, DEFAULT_PANEL_SIZE, DEL_EDS_MESS, DEL_EDS_TITLE, DESIG, DG, DIA_DATA, DIAC, DISC, DISC_DIA_TITLE, DIV, DO_ALL_TITLES, DO_TRANS, DOX, DOX_CAT_DELIM, DOX_DELIM, DOX_WINDOW_TITLE, DOXTYPE, ED, ED_EXISTS, ED_EXISTS_MESSAGE, ED_EXISTS_SPECS, ED_EXISTS_TITLE, ED_ID_MESS, ED_ID_REQUIRED, ED_ID_TITLE, ED_INFO, ED_NAME, ED_SCROLL_SIZE, ED_SIG, ED_SIGLA, ED_STRING, ED_TEXT_NUM, ED_TITLE, ED_TITLE_REM, ED_VOL_LET, ED_VOL_NUM, EDCON, EDCONS, EDIT, EDITOR_NAME_MESSAGE, EDITOR_NAME_TITLE, EDITORS_INFO, EDITORS_INFO_SPECS, EDITORS_INITIALS, EDITORS_NAME, EDNAMES, EDS_CORR, ENG, ENTER, ENTER_NORM_TRANS_PHRASE, ENTER_NORMALIZED, ENTER_NORMALIZED_PHRASE, ENTER_PLACE, ENTER_TITLE_PHRASE, ENTER_TRANS, ENTER_TRANS_PHRASE, EOC, EOC_TITLES_HEAD, EX1, EX2, EXIT, EXPAN, EXPORT, FILE, FILE_EXISTS, FILE_EXISTS_SPECS, FILE_EXISTS_TITLE, FOREIGN, FRAME, FRONT, FULL, FULL_TEXT_PAGE, GEN, GET_DESIG, GET_DESIG_QUESTION, GET_DESIG_SPECS, HEAD_FONT, HEAD_FONT_SIZE, HI, ID, INFO, INPUT_DATE_MESSAGE, INPUT_DATE_TITLE, INSERT, INSERT_APP, INTDECL, INV_TRANS, INV_TRANS_TITLE, INVALID_TRANS_SPECS, IS_FILE_LIST, ITEM, JOP_ERROR, JOP_INFO, JOP_QUEST, JOP_WARN, JOP_YESNOCANCEL, KG, LABEL_SIZE, LABEL_SPACE, LANG, LANG_ENG, LANG_TIB, LET, LIST, LIST_COLOR, LIST_INSETS, LM, LVL, MAHAYOGA, MAIN_MARGINS, MASTER_ID_VIEW, MASTER_SIGLA, MENU_FONT, MISC, N, NAME, NEW_AP, NEW_ED_INFO, NEW_ED_INFO_SPECS, NEW_ED_TITLE_INFO, NEW_ED_TITLE_INFO_SPECS, NEW_TITLE, NG, NGDIVS, NGSIGS, NO, NO_ELEM, NO_SELECT_TITLE, NO_SELECTION, NO_SELECTION_SPECS, NO_TITLE, NO_TITLE_MESSAGE, NO_TITLE_SPECS, NO_TITLE_TITLE, NON_TIB_HEAD, NON_TIB_TITLE_HEAD, NONTIB, NONTIBET, NORM, NORM_AP_ERROR, NORM_AP_MESS, NORM_AP_TITLE, NORM_EDIT, NORM_ENG_LABEL, NORM_TIB_LABEL, NORM_TITLE, NORM_TITLE_HEAD, NOT_SAVED_MESSAGE, NOT_SAVED_TITLE, NOT_SPEC, NOT_SPEC_MESSAGE, NOT_SPEC_SPECS, NOT_SPEC_TITLE, NOTE, NOTFOUND, NUM, NUMB, OPEN_ERROR, OPEN_TITLE, OPENFILE, ORIG_LANG, OTHER, OTHER_EDS, OUT_DIRECTORY, P, PAGE_RANGE, PAGIN, PERSNAME, PHYSDEC, PREFS, PREFS_DELIM, PROG_NAME, QUOTE, RDG, RECENT, RECENT_FILE_SIZE, REDISPLAY, RELAT, REMOVE_APP, REMOVE_APP_MESS, REMOVE_APP_SPECS, REMOVE_APP_TITLE, REMOVE_ED_ERROR_MESS, REMOVE_ED_ERROR_TITLE, REMOVE_ED_TITLE_ERROR, REMOVE_ED_TITLE_MESS, REMOVE_ED_TITLE_SPECS, REMOVE_ED_TITLE_TITLE, REMOVE_EDITION, REMOVE_TITLE, RENAME_FILE, RENAME_FILE_TITLE, RENAMING_FILE_SPECS, REND, RESP, RESPDECL, RESPSTM, REVDESC, RS, RUNTIME_ERROR, SAVE, SAVE_SPECS, SAVEAS, SAVED_FILE, SAVED_FILE_SPECS, SAVED_FILE_TITLE, SECTIONS, SELDIV, SEPARATOR, SHORT_LABEL_SIZE, SHOW_AP, SID, SIG, SIGLA_DELIM, SPACE, SRC, SRCS_LABEL, SUBMIT, SUBTYPE, SUMMARY, SYS, SYS_LET, SYS_NUM, SYS_SIG, TABLE, TB, TDECL, TDIV, TEMP_DIR, TEXT, TEXT_COLOR, TEXT_FIELD_SIZE, TEXT_HEAD_SIZE, TEXT_LIST_HEAD, TEXT_NUM, TIB, TIBANAL, TIBBIBL, TIBL, TIBPANEL_SIZE, TID, TIDDECL, TINFO, TITEM, TITLE, TITLE_DISC, TITLE_FONT, TITLE_LINE_HEAD, TITLE_PAGE, TITLEGRP, TITLELINE, TITLELN, TITLEOPENFILE, TITLES_VIEW, TK, TLIST, TLIST_ADD_ERROR, TLIST_ADD_MESS, TLIST_ADD_TITLE, TLIST_WARN, TLIST_WARN_TITLE, TLIST_WARNING, TRANS, TRANS_EDIT, TRANS_JOB, TTFCOLS, TTITLE_TITLE, TXT, TXTHEAD, TYPE, TYPE_CLASS, TYPE_DOX, TYPE_ED, TYPE_TEXT, TYPE_VOL, UNCLASSED, UNTITLED, USER_ID_VIEW, VIEW, VOL, VOL_LET, VOL_NUM, VOL_TEXT, VOL_TEXT_NUM, WIT, YES
 
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 javax.swing.JTextPane
addStyle, createDefaultEditorKit, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getStyle, getStyledDocument, getStyledEditorKit, getUIClassID, insertComponent, insertIcon, paramString, removeStyle, replaceSelection, setCharacterAttributes, setDocument, setEditorKit, setLogicalStyle, setParagraphAttributes, setStyledDocument
 
Methods inherited from class javax.swing.JEditorPane
addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitClassNameForContentType, getEditorKitForContentType, getHyperlinkListeners, getPage, getPreferredSize, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getStream, getText, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setContentType, setEditorKitForContentType, setPage, setPage, setText
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REG

public static String REG

This and the following are static, style constants. I.e., they're names of the styles.


HEAD

public static String HEAD

HEAD_ITALIC

public static String HEAD_ITALIC

TEXT_HEAD

public static String TEXT_HEAD

TEXT_HEAD_ITALIC

public static String TEXT_HEAD_ITALIC

ITALIC

public static String ITALIC

BOLD

public static String BOLD

ADD

public static String ADD

VARIANT

public static String VARIANT

RED

public static String RED

SMALL

public static String SMALL

LARGE

public static String LARGE
Constructor Detail

TextPane

public TextPane(org.thdl.tib.bibl.TiblEdit tt)
Method Detail

setController

public void setController(org.thdl.tib.bibl.TiblEdit tt)

getController

public org.thdl.tib.bibl.TiblEdit getController()

setTextPane

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.


setTextPane

public org.thdl.tib.bibl.ElementList setTextPane(Vector styleElements)

reset

public void reset()

initStyles

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.


getOffset

public int getOffset()

getPreviousParagraphIndex

public int getPreviousParagraphIndex()

getScrollPane

public JScrollPane getScrollPane()


These API docs were created 02/02/2003 08:19 PM.
Copyright © 2001-2002 Tibetan and Himalayan Digital Library. All Rights Reserved.
Hosted by SourceForge_Logo