com.instantbank.lettertemplate.editor.applet
Class TemplateEditor.ComponentEditor

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JEditorPane
                                |
                                +--javax.swing.JTextPane
                                      |
                                      +--com.instantbank.lettertemplate.editor.applet.TemplateEditor.ComponentEditor
All Implemented Interfaces:
javax.accessibility.Accessible, java.awt.image.ImageObserver, java.awt.MenuContainer, javax.swing.Scrollable, java.io.Serializable
Enclosing class:
TemplateEditor

class TemplateEditor.ComponentEditor
extends javax.swing.JTextPane

Actual Editor for the template's components. One instance of this class is needed for each template's component. It provides the required edition services.

Author:
InstantBank (Rodrigo Lopez)
See Also:
Serialized Form

Inner Class Summary
(package private)  class TemplateEditor.ComponentEditor.DocumentChange
          Signals changes occurred to the document under this editor, setting the hasChanged attribute of the corresponding component.
(package private)  class TemplateEditor.ComponentEditor.VariableInsertAction
          Implements variable insertion at caret position, via right mouse click and if there is a selected leaf in the tree of variables.
 
Inner classes inherited from class javax.swing.JEditorPane
javax.swing.JEditorPane.AccessibleJEditorPane, javax.swing.JEditorPane.AccessibleJEditorPaneHTML, javax.swing.JEditorPane.HeaderParser, javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport, javax.swing.JEditorPane.PageLoader, javax.swing.JEditorPane.PlainEditorKit
 
Inner classes inherited from class javax.swing.text.JTextComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.ClipboardObserver, javax.swing.text.JTextComponent.ComposedTextCaret, javax.swing.text.JTextComponent.DefaultKeymap, javax.swing.text.JTextComponent.InputMethodRequestsHandler, javax.swing.text.JTextComponent.KeyBinding, javax.swing.text.JTextComponent.KeymapActionMap, javax.swing.text.JTextComponent.KeymapWrapper, javax.swing.text.JTextComponent.MutableCaretEvent
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent, javax.swing.JComponent.ActionStandin, javax.swing.JComponent.IntVector, javax.swing.JComponent.KeyboardState
 
Inner classes inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Inner classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.AWTTreeLock
 
Field Summary
(package private)  int componentType
          Type of LetterComponent edited by this editor.
protected  javax.swing.text.StyleContext context
          Context manager for the Elements' attributes.
protected  javax.swing.text.DefaultStyledDocument doc
          Document model for this editor.
protected  javax.swing.text.rtf.RTFEditorKit kit
          Editor "kit" for this editor.
protected  int xFinish
          Final point of the current selection.
protected  int xStart
          Starting point of the current selection.
 
Fields inherited from class javax.swing.JTextPane
uiClassID
 
Fields inherited from class javax.swing.JEditorPane
kitLoaderRegistryKey, kitRegistryKey, kitTypeRegistryKey, managingFocus, pageProperties, typeHandlers
 
Fields inherited from class javax.swing.text.JTextComponent
canAccessSystemClipboard, caret, caretColor, caretEvent, composedText, composedTextCaret, composedTextContent, composedTextEnd, composedTextStart, DEFAULT_KEYMAP, defaultClipboardOwner, disabledTextColor, editable, editor, FOCUS_ACCELERATOR_KEY, focusAccelerator, focusedComponent, highlighter, inputMethodRequestsHandler, keymap, keymapTable, margin, model, needToSendKeyTypedEvent, originalCaret, SandboxClipboardKey, selectedTextColor, selectionColor
 
Fields inherited from class javax.swing.JComponent
_bounds, accessibleContext, actionMap, ACTIONMAP_CREATED, alignmentX, alignmentY, ANCESTOR_INPUTMAP_CREATED, ANCESTOR_USING_BUFFER, ancestorInputMap, ancestorNotifier, autoscroller, border, changeSupport, clientProperties, CREATED_DOUBLE_BUFFER, flags, FOCUS_INPUTMAP_CREATED, focusInputMap, HAS_FOCUS, htmlKey, htmlView, inputVerifier, IS_DOUBLE_BUFFERED, IS_OPAQUE, IS_PAINTING_TILE, IS_PRINTING, IS_PRINTING_ALL, KEY_EVENTS_ENABLED, KEYBOARD_BINDINGS_KEY, listenerList, maximumSize, minimumSize, NEXT_FOCUS, paintImmediatelyClip, paintingChild, preferredSize, readObjectCallbacks, REQUEST_FOCUS_DISABLED, tmpRect, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, verifyInputWhenFocusTarget, vetoableChangeSupport, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW, WHEN_IN_FOCUSED_WINDOW_BINDINGS, WIF_INPUTMAP_CREATED, windowInputMap
 
Fields inherited from class java.awt.Container
component, containerListener, containerSerializedDataVersion, dbg, dispatcher, layoutMgr, listeningBoundsChildren, listeningChildren, maxSize, ncomponents, printing, printingThreads, serialVersionUID
 
Fields inherited from class java.awt.Component
actionListenerK, adjustmentListenerK, appContext, background, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, componentListener, componentListenerK, componentOrientation, componentSerializedDataVersion, containerListenerK, cursor, dropTarget, enabled, eventMask, focusListener, focusListenerK, font, foreground, graphicsConfig, hasFocus, height, hierarchyBoundsListener, hierarchyBoundsListenerK, hierarchyListener, hierarchyListenerK, incRate, inputMethodListener, inputMethodListenerK, isInc, isPacked, itemListenerK, keyListener, keyListenerK, LEFT_ALIGNMENT, locale, LOCK, metrics, minSize, mouseListener, mouseListenerK, mouseMotionListener, mouseMotionListenerK, name, nameExplicitlySet, newEventsOnly, ownedWindowK, parent, peer, peerFont, popups, prefSize, privateKey, RIGHT_ALIGNMENT, textListenerK, TOP_ALIGNMENT, valid, visible, width, windowClosingException, windowListenerK, x, y
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
(package private) TemplateEditor.ComponentEditor(int type)
          Constructor for the ComponentEditor object
 
Method Summary
private  java.lang.String buildGuiVarName(java.lang.Long varCode, java.lang.Long delta)
          Delivers the name for a Date variable as shown in the user iterface.
 void clean()
          Removes the text displayed by this ComponentEditor.
 javax.swing.text.DefaultStyledDocument cloneDoc()
          Calculates a clone of the editor's doc where variables are substituted by a "varChar" and a suitable VARCODE attribute.
 void copyWithAttr()
          Copy the selected text --with attributes-- to the local clipboard.
 void cutWithAttr()
          Cut the selected text and copy it --with attributes-- to the local clipboard.
private  java.lang.Long deltaDialog(java.lang.Long varCode, java.lang.String offsetType)
          Captures the value of an offset to be applied to a date, measured in days.
 void displayImage(int pos, byte[] image)
          Displays an image inside this ComponentEditor
 void displayLetterComponent(LetterComponent comp)
          Shows the content of a LetterComponent in the text area of this ComponentEditor.
 void displayVariable(int pos, java.util.ArrayList slot)
          Displays a variable inside this ComponentEditor.
 void echoVars(java.util.ArrayList trace)
          Debug method.
 void echoVarsImages()
          Debug method, it echoes the trace of images and variables contained in the document.
 void fillLetterComponent(LetterComponent comp)
          Fills a letter component with the status of this ComponentEditor: the text, images and variables.
 void initSelection()
          Establishes an initial --void-- selection of the text displayed by this ComponentEditor.
 void insertImage(int pos, byte[] image)
          Inserts an image at the specified position inside this ComponentEditor.
 void insertVariable(int pos, java.lang.Long varCode, java.lang.Long varFormat, java.lang.Long delta)
          Inserts a variable at a position in the document.
 void pasteWithAttr()
          Paste the local clipboard text --with attributes-- to the selected region.
protected  void setAttributeSet(javax.swing.text.AttributeSet attr)
          Sets the attributes for the selected portion of the text.
 void setupKeymap()
          Sets up the keymap in order to capture Ctrl-C, Ctrl-X and Ctr-V keystrokes and make copy-cut-paste with attributes.
protected  void setVarFormatAttribute(java.lang.Long format)
          Sets the variable format attribute for the character at the start of the selected region.
protected  void showAttributes(int p)
          Updates the display of the attributes of the selected component on the corresponding controls.
 java.lang.String toRtfString()
          Calculates the RTF representation of the text contained in this editor's document.
 java.lang.String toRtfString(javax.swing.text.DefaultStyledDocument doc)
          Calculates the RTF representation of a document.
 java.util.ArrayList traceImages()
          Calculates a trace of the images in the document tied to this ComponentEditor.
 java.util.ArrayList traceImages(javax.swing.text.DefaultStyledDocument doc)
          Calculates a trace of the images in a document.
 java.util.ArrayList traceVariables()
          Calculates a trace of the variables in a 'clone' of this.document.
 java.util.ArrayList traceVariables(javax.swing.text.DefaultStyledDocument doc)
          Calculates a trace of the variables in a 'cloned' document.
 java.lang.String whoAmI()
          Debug method that identifies this ComponentEditor among the three possibilities: header, body, closing.
 
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, writeObject
 
Methods inherited from class javax.swing.JEditorPane
, addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitClassNameForContentType, getEditorKitForContentType, getKitLoaderRegistry, getKitRegisty, getKitTypeRegistry, getPage, getPreferredSize, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getStream, getText, isFocusCycleRoot, isManagingFocus, loadDefaultKitsIfNecessary, processComponentKeyEvent, processKeyEvent, read, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setCharsetFromContentTypeParameters, setContentType, setEditorKitForContentType, setPage, setPage, setText
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, canAccessSystemClipboard, copy, createComposedString, cut, exchangeCaret, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretPosition, getClipboard, getDisabledTextColor, getDocument, getFocusAccelerator, getFocusedComponent, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getPreferredScrollableViewportSize, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getUI, isEditable, isFocusTraversable, isProcessInputMethodEventOverridden, loadKeymap, mapCommittedTextToAction, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, readObject, removeCaretListener, removeKeymap, removeNotify, replaceInputMethodText, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setEditable, setFocusAccelerator, setHighlighter, setInputMethodCaretPosition, setKeymap, setMargin, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateInputMap, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
_paintImmediately, addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, adjustPaintFlags, alwaysOnTop, checkIfChildObscuredBySibling, clearFocusOwners, componentInputMapChanged, computeVisibleRect, computeVisibleRect, compWriteObjectNotify, contains, createToolTip, disable, enable, enableSerialization, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperties, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getCreatedDoubleBuffer, getDebugGraphicsOptions, getFlag, getGraphics, getHeight, getInputMap, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isLightweightComponent, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paintWithBuffer, print, printAll, printBorder, printChildren, printComponent, processFocusEvent, processKeyBinding, processKeyBindings, processKeyBindingsForAllComponents, processMouseMotionEvent, putClientProperty, rectangleIsObscured, rectangleIsObscuredBySibling, registerKeyboardAction, registerKeyboardAction, registerWithKeyboardManager, registerWithKeyboardManager, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setCreatedDoubleBuffer, setDebugGraphicsOptions, setDoubleBuffered, setEnabled, setFlag, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPaintingChild, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVerifyInputWhenFocusTarget, setVisible, shouldDebugGraphics, superProcessMouseMotionEvent, unregisterKeyboardAction, unregisterWithKeyboardManager, unregisterWithKeyboardManager, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, adjustListeningChildren, applyOrientation, checkGD, countComponents, createChildHierarchyEvents, createHierarchyEvents, deliverEvent, dispatchEventImpl, dispatchEventToSelf, doLayout, eventEnabled, findComponentAt, findComponentAt, findComponentAt, getAccessibleAt, getAccessibleChild, getAccessibleChildrenCount, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents_NoClientCode, getComponents, getLayout, getMouseEventTarget, getWindow, initIDs, insets, invalidate, invalidateTree, isAncestorOf, layout, lightweightPaint, lightweightPrint, list, list, locate, minimumSize, nextFocus, numListening, paintComponents, paintHeavyweightComponents, postProcessKeyEvent, postsOldMouseEvents, preferredSize, preProcessKeyEvent, printComponents, printHeavyweightComponents, processContainerEvent, processEvent, proxyEnableEvents, proxyRequestFocus, remove, remove, removeAll, removeContainerListener, setFocusOwner, setLayout, transferFocus, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, areInputMethodsEnabled, bounds, checkImage, checkImage, checkWindowClosingException, coalesceEvents, constructComponentName, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getAccessibleIndexInParent, getAccessibleStateSet, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont_NoClientCode, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getLocale, getLocation, getLocationOnScreen_NoTreeLock, getLocationOnScreen, getName, getNativeContainer, getParent_NoClientCode, getParent, getPeer, getSize, getToolkit, getToolkitImpl, getTreeLock, getWindowForObject, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isEnabledImpl, isLightweight, isRecursivelyVisible, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resetGC, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

context

protected javax.swing.text.StyleContext context
Context manager for the Elements' attributes.

doc

protected javax.swing.text.DefaultStyledDocument doc
Document model for this editor.

kit

protected javax.swing.text.rtf.RTFEditorKit kit
Editor "kit" for this editor.

xStart

protected int xStart
Starting point of the current selection.

xFinish

protected int xFinish
Final point of the current selection.

componentType

int componentType
Type of LetterComponent edited by this editor.
Constructor Detail

TemplateEditor.ComponentEditor

TemplateEditor.ComponentEditor(int type)
Constructor for the ComponentEditor object
Parameters:
type - Print type of the component: Laser, typewritter.
Method Detail

deltaDialog

private java.lang.Long deltaDialog(java.lang.Long varCode,
                                   java.lang.String offsetType)
Captures the value of an offset to be applied to a date, measured in days.
Parameters:
varCode - Code of the date variable.
offsetType - "workable" or "chronological".
Returns:
The offset as a Long object.

insertVariable

public void insertVariable(int pos,
                           java.lang.Long varCode,
                           java.lang.Long varFormat,
                           java.lang.Long delta)
Inserts a variable at a position in the document. VARCODE, VARFORMAT DATEDELTA attributes are bound to the "display representation" of the variable.
Parameters:
pos - Position of the variable
varCode - Code of the inserted variable
varFormat - Printing format when the variable is substituted for an actual value.
delta - Date offset (in days) for the variable. Makes sense only if the variable is of Date type.

buildGuiVarName

private java.lang.String buildGuiVarName(java.lang.Long varCode,
                                         java.lang.Long delta)
Delivers the name for a Date variable as shown in the user iterface. The actual name ends with a + or - offset suffix.
Parameters:
varCode - Variable's code.
delta - The date offset in days (workable or chronological).
Returns:
Description of the Return Value

insertImage

public void insertImage(int pos,
                        byte[] image)
Inserts an image at the specified position inside this ComponentEditor.
Parameters:
pos - Position in the text
image - Raw bytes of the image

setupKeymap

public void setupKeymap()
Sets up the keymap in order to capture Ctrl-C, Ctrl-X and Ctr-V keystrokes and make copy-cut-paste with attributes.

toRtfString

public java.lang.String toRtfString(javax.swing.text.DefaultStyledDocument doc)
Calculates the RTF representation of a document.
Parameters:
doc - The document the RTF representations is calculated for.
Returns:
A String containing the RTF representation of the document.

toRtfString

public java.lang.String toRtfString()
Calculates the RTF representation of the text contained in this editor's document.
Returns:
A String containing the RTF representation.

copyWithAttr

public void copyWithAttr()
Copy the selected text --with attributes-- to the local clipboard.

cutWithAttr

public void cutWithAttr()
Cut the selected text and copy it --with attributes-- to the local clipboard.

pasteWithAttr

public void pasteWithAttr()
Paste the local clipboard text --with attributes-- to the selected region.

cloneDoc

public javax.swing.text.DefaultStyledDocument cloneDoc()
Calculates a clone of the editor's doc where variables are substituted by a "varChar" and a suitable VARCODE attribute. It is not associated to any editorKit, so it can be manipulated with no visual effect on the user interface.
Returns:
The calculated clone.

traceVariables

public java.util.ArrayList traceVariables()
Calculates a trace of the variables in a 'clone' of this.document. See cloneDoc() method.
Returns:
A set (Hashtable) of < position, code-of-variable, code-of-format > tuples.

traceVariables

public java.util.ArrayList traceVariables(javax.swing.text.DefaultStyledDocument doc)
Calculates a trace of the variables in a 'cloned' document.
Parameters:
doc - The cloned document that contains the variables. See cloneDoc method.
Returns:
A set (Hashtable) of < position, code-of-variable, format > tuples.

traceImages

public java.util.ArrayList traceImages()
Calculates a trace of the images in the document tied to this ComponentEditor.
Returns:
a ArrayList containing <position,iconbytes> pairs. These pairs record the position of each image in the document. The 'iconbytes' value is the value of the ICONBYTES attribute that was inserted whith the image.

traceImages

public java.util.ArrayList traceImages(javax.swing.text.DefaultStyledDocument doc)
Calculates a trace of the images in a document.
Parameters:
doc - The document the trace of images is calculated for.
Returns:
a Hashtable containing <position,iconbytes> pairs. These pairs record the position of each image in the document. The 'iconbytes' value is the value of the ICONBYTES attribute that was inserted whith the image which currently is an array with the raw bytes of the image.

echoVarsImages

public void echoVarsImages()
Debug method, it echoes the trace of images and variables contained in the document.

echoVars

public void echoVars(java.util.ArrayList trace)
Debug method. Shows the variables and their positions.
Parameters:
trace - The set of variables to be shown.

fillLetterComponent

public void fillLetterComponent(LetterComponent comp)
Fills a letter component with the status of this ComponentEditor: the text, images and variables.
Parameters:
comp - The Letter Component to be filled.

displayLetterComponent

public void displayLetterComponent(LetterComponent comp)
Shows the content of a LetterComponent in the text area of this ComponentEditor.
Parameters:
comp - The component to be displayed.

displayImage

public void displayImage(int pos,
                         byte[] image)
Displays an image inside this ComponentEditor
Parameters:
pos - Position for insertion.
image - The image to be displayed

displayVariable

public void displayVariable(int pos,
                            java.util.ArrayList slot)
Displays a variable inside this ComponentEditor.
Parameters:
pos - Variable's position in the component
slot - Variable's < --, code, format, delta>

clean

public void clean()
Removes the text displayed by this ComponentEditor.

initSelection

public void initSelection()
Establishes an initial --void-- selection of the text displayed by this ComponentEditor. See xStart and xFinish.

showAttributes

protected void showAttributes(int p)
Updates the display of the attributes of the selected component on the corresponding controls.
Parameters:
p - Position in the document.

setAttributeSet

protected void setAttributeSet(javax.swing.text.AttributeSet attr)
Sets the attributes for the selected portion of the text.
Parameters:
attr - The values of the attributes

setVarFormatAttribute

protected void setVarFormatAttribute(java.lang.Long format)
Sets the variable format attribute for the character at the start of the selected region. If the caracter just after the cursor is not a "variable mark" this method has no effect.
Parameters:
format - Code of the variable format.

whoAmI

public java.lang.String whoAmI()
Debug method that identifies this ComponentEditor among the three possibilities: header, body, closing.
Returns:
The name of component's type.