public class CodeEditor
extends javax.swing.JPanel
Modifier and Type | Class and Description |
---|---|
class |
CodeEditor.NamedTheme |
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
Modifier and Type | Field and Description |
---|---|
protected org.fife.ui.autocomplete.AutoCompletion |
autoCompleter |
protected org.fife.rsta.ui.CollapsibleSectionPanel |
collapsingSectionPanel |
static java.lang.String[] |
PYTHON_KEYWORDS |
protected org.fife.ui.rtextarea.RTextScrollPane |
rTextScrollPane |
protected org.fife.ui.rsyntaxtextarea.RSyntaxTextArea |
textArea |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
CodeEditor() |
CodeEditor(javax.swing.JFrame parent,
DesignerContext context)
This constructor will instantiate a CodeEditor and use the context's script manager to populate and initialize
the auto completion hints using default color theme and Python syntax highlighting.
|
Modifier and Type | Method and Description |
---|---|
void |
addAutoCompletionhints(java.lang.String pathKey,
java.util.List<ScriptFunctionHint> hints)
Will add a one or more hints to the autocomplete system for all CodeEditors for the lifetime of this gateway.
|
org.fife.ui.autocomplete.AutoCompletion |
getAutoCompleter() |
org.fife.rsta.ui.CollapsibleSectionPanel |
getCollapsingSectionPanel() |
org.fife.ui.autocomplete.CompletionProvider |
getCompletionProvider() |
org.fife.ui.rtextarea.RTextScrollPane |
getrTextScrollPane() |
java.lang.String |
getText()
Returns the text held by the internal RSyntaxText area.
|
org.fife.ui.rsyntaxtextarea.RSyntaxTextArea |
getTextArea() |
boolean |
isShowCompletionDescription() |
protected void |
rebuildDefaultCompletions()
Will rebuild the completions
|
void |
removeAutoCompletions(java.lang.String pathKey,
java.util.List<ScriptFunctionHint> hints)
Removes all hints that have the same function signature as those in the list and are associated with the
given pathKey
|
void |
setFont(java.awt.Font font) |
void |
showCompletionDescription(boolean show)
Sets whether or not the autocompletion should pop up the description window for functions
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.lang.String[] PYTHON_KEYWORDS
protected org.fife.ui.rsyntaxtextarea.RSyntaxTextArea textArea
protected org.fife.ui.rtextarea.RTextScrollPane rTextScrollPane
protected org.fife.ui.autocomplete.AutoCompletion autoCompleter
protected org.fife.rsta.ui.CollapsibleSectionPanel collapsingSectionPanel
public CodeEditor()
public CodeEditor(javax.swing.JFrame parent, DesignerContext context)
context
- public void addAutoCompletionhints(java.lang.String pathKey, java.util.List<ScriptFunctionHint> hints)
pathKey
- the key that will be registered with the autocompletion system.hints
- a list of ScriptFunctionHint
that will be added to the auto-completion systempublic void removeAutoCompletions(java.lang.String pathKey, java.util.List<ScriptFunctionHint> hints)
pathKey
- the pathkey, generally the first part of the full function pathhints
- a list of all hints that should be removed from the mapprotected void rebuildDefaultCompletions()
public void showCompletionDescription(boolean show)
show
- true to show the description window, false to only show the autocomplete optionspublic boolean isShowCompletionDescription()
public org.fife.ui.autocomplete.AutoCompletion getAutoCompleter()
public org.fife.rsta.ui.CollapsibleSectionPanel getCollapsingSectionPanel()
public org.fife.ui.autocomplete.CompletionProvider getCompletionProvider()
public org.fife.ui.rtextarea.RTextScrollPane getrTextScrollPane()
public org.fife.ui.rsyntaxtextarea.RSyntaxTextArea getTextArea()
public java.lang.String getText()
public void setFont(java.awt.Font font)
setFont
in class javax.swing.JComponent