|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.gjt.sp.jedit.EditPane
public class EditPane
A panel containing a text area.
In a BeanShell script, you can obtain the current edit pane from the
editPane
variable.
Each View can have multiple editPanes, one is active at a time.
Each EditPane has a single JEditTextArea, and is operating on single buffer.
The EditPane also can switch buffers.
This is the "controller" between a JEditTextArea (view) and a buffer (model).
This class does not have a public constructor.
Edit panes can be created and destroyed using methods in the
View
class.
View.splitHorizontally()
,
View.splitVertically()
,
View.unsplitCurrent()
,
View.unsplit()
,
View.getEditPane()
,
View.getEditPanes()
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
---|
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 java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
---|---|
void |
addMarker()
Adds a marker at the caret position. |
void |
bufferAdded(Buffer buffer,
int index)
A buffer was added in the bufferSet. |
void |
bufferMoved(Buffer buffer,
int oldIndex,
int newIndex)
A buffer was moved in the BufferSet. |
void |
bufferRemoved(Buffer buffer,
int index)
A buffer was removed from the bufferSet. |
void |
bufferSetSorted()
The bufferSet was sorted |
void |
focusBufferSwitcher()
Pops up and focuses on the buffer switcher combo box. |
void |
focusOnTextArea()
Sets the focus onto the text area. |
static EditPane |
get(TextArea ta)
Returns the EditPane of a TextArea. |
Buffer |
getBuffer()
Returns the current buffer. |
BufferSet |
getBufferSet()
Returns the current buffer set. |
BufferSet.Scope |
getBufferSetScope()
Get the current scope of bufferSet. |
BufferSwitcher |
getBufferSwitcher()
Returns the buffer switcher combo box instance. |
java.awt.Dimension |
getMinimumSize()
Returns 0,0 for split pane compatibility. |
JEditTextArea |
getTextArea()
Returns the view's text area. |
View |
getView()
Returns the view containing this edit pane. |
void |
goToMarker(char shortcut,
boolean select)
Moves the caret to the marker with the specified shortcut. |
void |
goToNextMarker(boolean select)
Moves the caret to the next marker. |
void |
goToPrevMarker(boolean select)
Moves the caret to the previous marker. |
void |
handleMessage(EBMessage msg)
Handles a message sent on the EditBus. |
static void |
initPainter(TextAreaPainter painter)
Init the painter of a textarea. |
void |
loadCaretInfo()
Loads the caret and selection information from this EditPane, fall back to the information from the current buffer if none is already in this EditPane. |
void |
nextBuffer()
Selects the next buffer. |
void |
prevBuffer()
Selects the previous buffer. |
void |
recentBuffer()
Selects the most recently edited buffer. |
void |
saveCaretInfo()
Saves the caret information to the current buffer. |
void |
setBuffer(Buffer buffer)
Sets the current buffer. |
void |
setBuffer(Buffer buffer,
boolean requestFocus)
Sets the current buffer. |
void |
setBufferSetScope(BufferSet.Scope scope)
Set the scope of bufferSet for the EditPane. |
void |
swapMarkerAndCaret(char shortcut)
Moves the caret to the marker with the specified shortcut, then sets the marker position to the former caret position. |
java.lang.String |
toString()
|
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
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, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, 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, setFont, setForeground, setInheritsPopupMenu, 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, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
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, hide, 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, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public View getView()
public static EditPane get(TextArea ta)
ta
- the textArea
public Buffer getBuffer()
public void setBuffer(Buffer buffer)
buffer
- The buffer to edit.public void setBuffer(Buffer buffer, boolean requestFocus)
buffer
- The buffer to edit.requestFocus
- true if the textarea should request focus, false otherwisepublic void prevBuffer()
public void nextBuffer()
public void recentBuffer()
public void focusOnTextArea()
public JEditTextArea getTextArea()
public BufferSwitcher getBufferSwitcher()
public void focusBufferSwitcher()
public void saveCaretInfo()
public void loadCaretInfo()
public void goToNextMarker(boolean select)
public void goToPrevMarker(boolean select)
public void goToMarker(char shortcut, boolean select)
shortcut
- The shortcutselect
- True if the selection should be extended,
false otherwisepublic void addMarker()
public void swapMarkerAndCaret(char shortcut)
shortcut
- The shortcutpublic void handleMessage(EBMessage msg)
EBComponent
EBMessage
class. Typically
this is done with one or more if
blocks that test
whether the message is an instance of a derived message class in
which the component has an interest. For example:
if(msg instanceof BufferUpdate) { // a buffer's state has changed! } else if(msg instanceof ViewUpdate) { // a view's state has changed! } // ... and so on
handleMessage
in interface EBComponent
msg
- The messagepublic final java.awt.Dimension getMinimumSize()
getMinimumSize
in class javax.swing.JComponent
public BufferSet getBufferSet()
public BufferSet.Scope getBufferSetScope()
public void setBufferSetScope(BufferSet.Scope scope)
scope
- the new scopepublic void bufferAdded(Buffer buffer, int index)
bufferAdded
in interface BufferSetListener
buffer
- the added bufferindex
- the position where it was addedpublic void bufferRemoved(Buffer buffer, int index)
bufferRemoved
in interface BufferSetListener
buffer
- the removed bufferindex
- the position where it was before being removedpublic void bufferMoved(Buffer buffer, int oldIndex, int newIndex)
bufferMoved
in interface BufferSetListener
buffer
- the moved bufferoldIndex
- the position it was beforenewIndex
- the new positionpublic void bufferSetSorted()
bufferSetSorted
in interface BufferSetListener
public java.lang.String toString()
toString
in class java.awt.Component
public static void initPainter(TextAreaPainter painter)
painter
- the painter of a textarea
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |