com.infoengine.modeler.UI
Class EditorTextComponent
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JEditorPane
javax.swing.JTextPane
com.infoengine.modeler.UI.EditorTextComponent
- All Implemented Interfaces:
- Accessible, AWTEventListener, EventListener, ImageObserver, KeyListener, MenuContainer, MouseListener, MouseMotionListener, Scrollable, Serializable
- public class EditorTextComponent
- extends JTextPane
- implements MouseListener, MouseMotionListener, AWTEventListener, KeyListener
- See Also:
- Serialized Form
Fields inherited from class javax.swing.JTextPane |
|
Fields inherited from class java.awt.Container |
|
Methods inherited from class javax.swing.JTextPane |
createDefaultEditorKit, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getStyle, getStyledDocument, getStyledEditorKit, getUIClassID, insertComponent, insertIcon, paramString, 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, getStream, 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, 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, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, 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 |
LEFT_MARGIN
private static final int LEFT_MARGIN
- See Also:
- Constant Field Values
selStart
int selStart
selEnd
int selEnd
lastPseudoCaret
int lastPseudoCaret
pseudoCaret
int pseudoCaret
textCursor
Cursor textCursor
moveCursor
Cursor moveCursor
marginCursor
Cursor marginCursor
crossHairCursor
Cursor crossHairCursor
myCaret
private Caret myCaret
defaultBlinkRate
private int defaultBlinkRate
myDocument
EditorTextComponent.IEStyledDocument myDocument
nSelect
private int nSelect
STYLE_DEBUG
private static boolean STYLE_DEBUG
styles
Hashtable styles
EditorTextComponent
EditorTextComponent()
initTextPane
private void initTextPane()
getScrollableTracksViewportWidth
public boolean getScrollableTracksViewportWidth()
- Specified by:
getScrollableTracksViewportWidth
in interface Scrollable
refresh
public void refresh()
stripCRs
private String stripCRs(String string)
getText
public String getText()
setBackground
public void setBackground(Color c)
eventDispatched
public void eventDispatched(AWTEvent awe)
- Specified by:
eventDispatched
in interface AWTEventListener
mouseClicked
public void mouseClicked(MouseEvent e)
- Specified by:
mouseClicked
in interface MouseListener
mouseEntered
public void mouseEntered(MouseEvent e)
- Specified by:
mouseEntered
in interface MouseListener
mouseExited
public void mouseExited(MouseEvent e)
- Specified by:
mouseExited
in interface MouseListener
mousePressed
public void mousePressed(MouseEvent e)
- Specified by:
mousePressed
in interface MouseListener
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased
in interface MouseListener
mouseMoved
public void mouseMoved(MouseEvent e)
- Specified by:
mouseMoved
in interface MouseMotionListener
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged
in interface MouseMotionListener
inMargin
private boolean inMargin(MouseEvent e)
inSelectionBounds
private boolean inSelectionBounds(MouseEvent e)
drawPseudoCaret
private void drawPseudoCaret()
paint
public void paint(Graphics g)
smartHome
private void smartHome(KeyEvent e)
- Home key pressed
insert
private void insert(int offset,
String string)
smartTab
private void smartTab(KeyEvent e)
- Tab key pressed...
matchBraces
void matchBraces(KeyEvent e)
- if the cursor is touching a brace character then attempt to move the
cursor to the appropriate matching brace... triggered by
-]
autoIndent
void autoIndent(KeyEvent e)
getIndent
public String getIndent(int from)
keyReleased
public void keyReleased(KeyEvent e)
- Specified by:
keyReleased
in interface KeyListener
keyTyped
public void keyTyped(KeyEvent e)
- Specified by:
keyTyped
in interface KeyListener
keyPressed
public void keyPressed(KeyEvent e)
- Specified by:
keyPressed
in interface KeyListener
replaceSelection
public void replaceSelection(String content)
getXmlTagColor
public Color getXmlTagColor()
setXmlTagColor
public void setXmlTagColor(Color c)
getCommentColor
public Color getCommentColor()
setCommentColor
public void setCommentColor(Color c)
getScriptletColor
public Color getScriptletColor()
setScriptletColor
public void setScriptletColor(Color c)
getEqualsColor
public Color getEqualsColor()
setEqualsColor
public void setEqualsColor(Color c)
getAttributeColor
public Color getAttributeColor()
setAttributeColor
public void setAttributeColor(Color c)
getAttributeValueColor
public Color getAttributeValueColor()
setAttributeValueColor
public void setAttributeValueColor(Color c)
setFont
public void setFont(Font f)
getStyles
public Hashtable getStyles()
addStyle
public Style addStyle(String name,
Style s)
removeStyle
public void removeStyle(String name)
restyle
public void restyle()