## org.gjt.sp.jedit
Class EditPane

    java.lang.Object
      java.awt.Component
          java.awt.Container
              javax.swing.JComponent
                  javax.swing.JPanel
                      org.gjt.sp.jedit.EditPane

All Implemented Interfaces:
  javax.accessibility.Accessible, EBComponent, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable

public class EditPane
extends javax.swing.JPanel
implements EBComponent

A panel containing a text area.

In a BeanShell script, you can obtain the current edit pane from the `editPane` variable.

This class does not have a public constructor. Edit panes can be created and destroyed using methods in the `View` class.

Each edit pane can edit one buffer at a time.

Version:
  $Id: EditPane.java,v 1.51 2004/08/17 06:37:35 spestov Exp $
Author:
  Slava Pestov
See Also:
  `View.splitHorizontally()`, `View.splitVertically()`, `View.unsplitCurrent()`, `View.unsplit()`, `View.getEditPane()`, `View.getEditPanes()`, Serialized Form

Nested Class Summary

Nested classes inherited from class javax.swing.JPanel
`javax.swing.JPanel.AccessibleJPanel`

Nested classes inherited from class javax.swing.JComponent
`javax.swing.JComponent.AccessibleJComponent`

Nested classes inherited from class java.awt.Container
`java.awt.Container.AccessibleAWTContainer`

Nested classes inherited from class java.awt.Component
`java.awt.Component.AccessibleAWTComponent, 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` `focusOnTextArea()` Sets the focus onto the text area.
`Buffer` `getBuffer()` Returns the current buffer.
`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` `handleMessage(EBMessage msg)` Handles a message sent on the EditBus.
`void` `loadCaretInfo()` Loads the caret information from the current buffer.
`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` `showBufferSwitcher()` Shows the buffer switcher combo box.
`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, 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, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, 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, removeNotify, 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, addInputMethodListener, 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, getInputMethodRequests, 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, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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

### getView

    public View getView()

  Returns the view containing this edit pane.

  Since:
    jEdit 2.5pre2

### getBuffer

    public Buffer getBuffer()

  Returns the current buffer.

  Since:
    jEdit 2.5pre2

### setBuffer

    public void setBuffer(Buffer buffer)

  Sets the current buffer.

  Parameters:
    `buffer` - The buffer to edit.
  Since:
    jEdit 2.5pre2

### prevBuffer

    public void prevBuffer()

  Selects the previous buffer.

  Since:
    jEdit 2.7pre2

### nextBuffer

    public void nextBuffer()

  Selects the next buffer.

  Since:
    jEdit 2.7pre2

### recentBuffer

    public void recentBuffer()

  Selects the most recently edited buffer.

  Since:
    jEdit 2.7pre2

### focusOnTextArea

    public void focusOnTextArea()

  Sets the focus onto the text area.

  Since:
    jEdit 2.5pre2

### getTextArea

    public JEditTextArea getTextArea()

  Returns the view's text area.

  Since:
    jEdit 2.5pre2

### getBufferSwitcher

    public BufferSwitcher getBufferSwitcher()

  Returns the buffer switcher combo box instance.

  Since:
    jEdit 4.1pre8

### showBufferSwitcher

    public void showBufferSwitcher()

  Shows the buffer switcher combo box.

  Since:
    jEdit 4.1pre8

### saveCaretInfo

    public void saveCaretInfo()

  Saves the caret information to the current buffer.

  Since:
    jEdit 2.5pre2

### loadCaretInfo

    public void loadCaretInfo()

  Loads the caret information from the current buffer.

  Since:
    jEdit 2.5pre2

### handleMessage

    public void handleMessage(EBMessage msg)

  Description copied from interface: `EBComponent`
  Handles a message sent on the EditBus. This method must specify the type of responses the plugin will have for various subclasses of the `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

  Specified by:
    `handleMessage` in interface `EBComponent`
  Parameters:
    `msg` - The message

### getMinimumSize

    public final java.awt.Dimension getMinimumSize()

  Returns 0,0 for split pane compatibility.

### toString

    public java.lang.String toString()