Package org.gjt.sp.jedit
Class View
- java.lang.Object
-
- java.awt.Component
-
- java.awt.Container
-
- java.awt.Window
-
- java.awt.Frame
-
- javax.swing.JFrame
-
- org.gjt.sp.jedit.View
-
- All Implemented Interfaces:
java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.io.Serializable
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
,InputHandlerProvider
public class View extends javax.swing.JFrame implements InputHandlerProvider
AView
is jEdit's top-level frame window.In a BeanShell script, you can obtain the current view instance from the
view
variable.The largest component it contains is an
EditPane
that in turn contains aJEditTextArea
that displays aBuffer
. A view can have more than one edit pane in a split window configuration. A view also contains a menu bar, an optional toolbar and other window decorations, as well as docked windows.The View class performs two important operations dealing with plugins: creating plugin menu items, and managing dockable windows.
- When a view is being created, its initialization routine
iterates through the collection of loaded plugins and constructs the
Plugins menu using the properties as specified in the
EditPlugin
class. - The view also creates and initializes a
DockableWindowManager
object. This object is responsible for creating, closing and managing dockable windows.
jEdit
class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
View.ViewConfig
-
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description static int
ABOVE_SYSTEM_BAR_LAYER
Above system tool bar layer.static int
ACTION_BAR
static int
ACTION_BAR_LAYER
Action bar layer.static int
BELOW_SEARCH_BAR_LAYER
Below search bar layer.static int
BELOW_STATUS_BAR_LAYER
Status bar layer.static int
BELOW_SYSTEM_BAR_LAYER
Below system tool bar layer.static int
BOTTOM_GROUP
The group of tool bars below the DockableWindowManagerstatic int
BOTTOM_LAYER
The lowest possible layer.static int
DEFAULT_GROUP
static int
DEFAULT_LAYER
The default layer for tool bars with no preference.static java.lang.String
DOCKING_FRAMEWORK_PROVIDER_SERVICE
static EditPane[]
EMPTY_EDIT_PANES_ARRAY
static int
SEARCH_BAR_LAYER
Search bar layer.static int
STATUS_BAR_LAYER
Status bar layer.static int
SYSTEM_BAR_LAYER
System tool bar layer.static int
TEXT_AREA
static int
TOP_GROUP
The group of tool bars above the DockableWindowManagerstatic int
TOP_LAYER
The highest possible layer.static int
VIEW
static java.lang.String
VIEW_DOCKING_FRAMEWORK_PROPERTY
-
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionBar()
Shows the action bar if needed, and sends keyboard focus there.void
addToolBar(int group, int layer, java.awt.Component toolBar)
Adds a tool bar to this view.void
addToolBar(int group, java.awt.Component toolBar)
Adds a tool bar to this view.void
addToolBar(java.awt.Component toolBar)
Adds a tool bar to this view.void
adjust(View parent, View.ViewConfig config)
void
closeAllMenus()
closes any popup menus that may have been openedvoid
forEachEditPane(java.util.function.Consumer<? super EditPane> action)
Perform the given action on every EditPaneActionBar
getActionBar()
Returns the action bar.Buffer
getBuffer()
Returns the current edit pane's buffer.Buffer[]
getBuffers()
Returns all Buffers opened in this View, Sorted according to View options.DockableWindowManager
getDockableWindowManager()
Returns the dockable window manager associated with this view.static java.lang.String
getDockingFrameworkName()
static DockingFrameworkProvider
getDockingFrameworkProvider()
EditPane
getEditPane()
Returns the current edit pane.EditPane[]
getEditPanes()
Returns all edit panes.InputHandler
getInputHandler()
Returns the input handler.java.awt.event.KeyListener
getKeyEventInterceptor()
Returns the listener that will handle all key events in this view, if any.Macros.Recorder
getMacroRecorder()
Returns the macro recorder.java.awt.Dimension
getMinimumSize()
View
getNext()
Returns the next view in the list.java.awt.Component
getPrefixFocusOwner()
View
getPrev()
Returns the previous view in the list.SearchBar
getSearchBar()
Returns the search bar.java.lang.String
getSplitConfig()
Split configurations are recorded in a simple RPN "language".javax.swing.JSplitPane
getSplitPane()
Returns the top-level split pane, if any.StatusBar
getStatus()
Returns the status bar.JEditTextArea
getTextArea()
Returns the current edit pane's text area.java.awt.Container
getToolBar()
Returns the view's tool bar.View.ViewConfig
getViewConfig()
EditPane
goToBuffer(Buffer buffer)
If this buffer is open in one of the view's edit panes, sets focus to that edit pane.void
handleBufferUpdate(BufferUpdate msg)
void
handleEditPaneUpdate(EditPaneUpdate msg)
void
handlePropertiesChanged(PropertiesChanged msg)
void
handleSearchSettingsChanged(SearchSettingsChanged msg)
void
handleViewUpdate(ViewUpdate msg)
void
hideWaitCursor()
Hides the wait cursor.boolean
isClosed()
Returns true if this view has been closed withjEdit.closeView(View)
.boolean
isFullScreenMode()
boolean
isPlainView()
Returns true if this is an auxilliary view with no dockable windows.void
nextTextArea()
Moves keyboard focus to the next text area.void
prevTextArea()
Moves keyboard focus to the previous text area.void
processKeyEvent(java.awt.event.KeyEvent evt)
Forwards key events directly to the input handler.void
processKeyEvent(java.awt.event.KeyEvent evt, boolean calledFromTextArea)
Forwards key events directly to the input handler.void
processKeyEvent(java.awt.event.KeyEvent evt, int from)
Forwards key events directly to the input handler.void
quickHyperSearch(boolean word)
Quick HyperSearch.void
quickIncrementalSearch(boolean word)
Quick search.void
removeToolBar(java.awt.Component toolBar)
Removes a tool bar from this view.void
resplit()
Restore the split configuration as it was before unsplitting.void
setBuffer(Buffer buffer)
Sets the current edit pane's buffer.void
setInputHandler(InputHandler inputHandler)
Sets the input handler.void
setKeyEventInterceptor(java.awt.event.KeyListener listener)
Sets the listener that will handle all key events in this view.void
setMacroRecorder(Macros.Recorder recorder)
Sets the macro recorder.void
setNext(View next)
Set the next view in linked list.void
setPrefixFocusOwner(java.awt.Component prefixFocusOwner)
void
setPrev(View prev)
Set the previous view in linked list.void
setSplitConfig(Buffer buffer, java.lang.String splitConfig)
sets the split configuration as per the splitConfig.void
setUserTitle(java.lang.String title)
Sets a user-defined title for this view instead of the "view.title" property.void
setWaitSocket(java.net.Socket waitSocket)
This socket is closed when the buffer is closed.EditPane
showBuffer(Buffer buffer)
If this buffer is open in one of the view's edit panes, activates that edit pane.void
showUserTitleDialog()
Shows a dialog for selecting a user-defined title for this view.void
showWaitCursor()
Shows the wait cursor.EditPane
split(int orientation)
Splits the view.EditPane
splitHorizontally()
Splits the view horizontally.EditPane
splitVertically()
Splits the view vertically.void
toggleFullScreen()
java.lang.String
toString()
void
unsplit()
Unsplits the view.void
unsplitCurrent()
Removes the current split.void
updateBufferSwitcherStates()
Enables or Disables the "Focus Buffer Switcher" menu item in the View menu depending on the visible state of the buffer switcher.void
updateFullScreenProps()
void
updateTitle()
Updates the title bar.void
visit(JEditVisitor visitor)
Visit the the editpanes and textareas of the view-
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
-
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
-
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
-
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
-
-
-
-
Field Detail
-
EMPTY_EDIT_PANES_ARRAY
public static final EditPane[] EMPTY_EDIT_PANES_ARRAY
-
VIEW_DOCKING_FRAMEWORK_PROPERTY
public static final java.lang.String VIEW_DOCKING_FRAMEWORK_PROPERTY
- See Also:
- Constant Field Values
-
DOCKING_FRAMEWORK_PROVIDER_SERVICE
public static final java.lang.String DOCKING_FRAMEWORK_PROVIDER_SERVICE
- See Also:
- Constant Field Values
-
TOP_GROUP
public static final int TOP_GROUP
The group of tool bars above the DockableWindowManager- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
BOTTOM_GROUP
public static final int BOTTOM_GROUP
The group of tool bars below the DockableWindowManager- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
DEFAULT_GROUP
public static final int DEFAULT_GROUP
- See Also:
- Constant Field Values
-
TOP_LAYER
public static final int TOP_LAYER
The highest possible layer.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
DEFAULT_LAYER
public static final int DEFAULT_LAYER
The default layer for tool bars with no preference.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
BOTTOM_LAYER
public static final int BOTTOM_LAYER
The lowest possible layer.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
ABOVE_SYSTEM_BAR_LAYER
public static final int ABOVE_SYSTEM_BAR_LAYER
Above system tool bar layer.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
SYSTEM_BAR_LAYER
public static final int SYSTEM_BAR_LAYER
System tool bar layer. jEdit uses this for the main tool bar.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
BELOW_SYSTEM_BAR_LAYER
public static final int BELOW_SYSTEM_BAR_LAYER
Below system tool bar layer.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
SEARCH_BAR_LAYER
public static final int SEARCH_BAR_LAYER
Search bar layer.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
BELOW_SEARCH_BAR_LAYER
public static final int BELOW_SEARCH_BAR_LAYER
Below search bar layer.- Since:
- jEdit 4.0pre7
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
ACTION_BAR_LAYER
public static final int ACTION_BAR_LAYER
Action bar layer.- Since:
- jEdit 4.2pre1
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
STATUS_BAR_LAYER
public static final int STATUS_BAR_LAYER
Status bar layer.- Since:
- jEdit 4.2pre1
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
BELOW_STATUS_BAR_LAYER
public static final int BELOW_STATUS_BAR_LAYER
Status bar layer.- Since:
- jEdit 4.2pre1
- See Also:
addToolBar(int,int,java.awt.Component)
, Constant Field Values
-
VIEW
public static final int VIEW
- See Also:
- Constant Field Values
-
TEXT_AREA
public static final int TEXT_AREA
- See Also:
- Constant Field Values
-
ACTION_BAR
public static final int ACTION_BAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDockableWindowManager
public DockableWindowManager getDockableWindowManager()
Returns the dockable window manager associated with this view.- Since:
- jEdit 2.6pre3
-
getDockingFrameworkName
public static java.lang.String getDockingFrameworkName()
-
getDockingFrameworkProvider
public static DockingFrameworkProvider getDockingFrameworkProvider()
-
getToolBar
public java.awt.Container getToolBar()
Returns the view's tool bar.- Since:
- jEdit 4.2pre1
-
addToolBar
public void addToolBar(java.awt.Component toolBar)
Adds a tool bar to this view.- Parameters:
toolBar
- The tool bar
-
addToolBar
public void addToolBar(int group, java.awt.Component toolBar)
Adds a tool bar to this view.- Parameters:
group
- The tool bar group to add totoolBar
- The tool bar- Since:
- jEdit 4.0pre7
- See Also:
ToolBarManager
-
addToolBar
public void addToolBar(int group, int layer, java.awt.Component toolBar)
Adds a tool bar to this view.- Parameters:
group
- The tool bar group to add tolayer
- The layer of the group to add totoolBar
- The tool bar- Since:
- jEdit 4.0pre7
- See Also:
ToolBarManager
-
removeToolBar
public void removeToolBar(java.awt.Component toolBar)
Removes a tool bar from this view.- Parameters:
toolBar
- The tool bar
-
showWaitCursor
public void showWaitCursor()
Shows the wait cursor. This method andhideWaitCursor()
are implemented using a reference count of requests for wait cursors, so that nested calls work correctly; however, you should be careful to use these methods in tandem.To ensure that
hideWaitCursor()
is always called after ashowWaitCursor()
, use atry
/finally
block, like this:try { view.showWaitCursor(); // ... } finally { view.hideWaitCursor(); }
-
hideWaitCursor
public void hideWaitCursor()
Hides the wait cursor.
-
getSearchBar
public final SearchBar getSearchBar()
Returns the search bar.- Since:
- jEdit 2.4pre4
-
getActionBar
public final ActionBar getActionBar()
Returns the action bar.- Since:
- jEdit 4.2pre3
-
getStatus
public StatusBar getStatus()
Returns the status bar. TheStatusBar.setMessage(String)
andStatusBar.setMessageAndClear(String)
methods can be called on the return value of this method to display status information to the user.- Since:
- jEdit 3.2pre2
-
quickIncrementalSearch
public void quickIncrementalSearch(boolean word)
Quick search.- Since:
- jEdit 4.0pre3
-
quickHyperSearch
public void quickHyperSearch(boolean word)
Quick HyperSearch.- Since:
- jEdit 4.0pre3
-
actionBar
public void actionBar()
Shows the action bar if needed, and sends keyboard focus there.- Since:
- jEdit 4.2pre1
-
getKeyEventInterceptor
public java.awt.event.KeyListener getKeyEventInterceptor()
Returns the listener that will handle all key events in this view, if any.- Returns:
- the key event interceptor or null
-
setKeyEventInterceptor
public void setKeyEventInterceptor(java.awt.event.KeyListener listener)
Sets the listener that will handle all key events in this view. For example, the complete word command uses this so that all key events are passed to the word list popup while it is visible.- Parameters:
listener
- The key event interceptor.
-
getInputHandler
public InputHandler getInputHandler()
Returns the input handler.- Specified by:
getInputHandler
in interfaceInputHandlerProvider
-
setInputHandler
public void setInputHandler(InputHandler inputHandler)
Sets the input handler.- Parameters:
inputHandler
- The new input handler
-
getMacroRecorder
public Macros.Recorder getMacroRecorder()
Returns the macro recorder.
-
setMacroRecorder
public void setMacroRecorder(Macros.Recorder recorder)
Sets the macro recorder.- Parameters:
recorder
- The macro recorder
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent evt)
Forwards key events directly to the input handler. This is slightly faster than using a KeyListener because some Swing overhead is avoided.- Overrides:
processKeyEvent
in classjava.awt.Component
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent evt, boolean calledFromTextArea)
Forwards key events directly to the input handler. This is slightly faster than using a KeyListener because some Swing overhead is avoided.
-
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent evt, int from)
Forwards key events directly to the input handler. This is slightly faster than using a KeyListener because some Swing overhead is avoided.
-
splitHorizontally
public EditPane splitHorizontally()
Splits the view horizontally.- Returns:
- the new editPane
- Since:
- jEdit 4.1pre2
-
splitVertically
public EditPane splitVertically()
Splits the view vertically.- Returns:
- the new editPane
- Since:
- jEdit 4.1pre2
-
split
public EditPane split(int orientation)
Splits the view.- Parameters:
orientation
- the orientationJSplitPane.HORIZONTAL_SPLIT
orJSplitPane.VERTICAL_SPLIT
- Returns:
- the new editPane
- Since:
- jEdit 4.1pre2
-
unsplit
public void unsplit()
Unsplits the view.- Since:
- jEdit 2.3pre2
-
unsplitCurrent
public void unsplitCurrent()
Removes the current split.- Since:
- jEdit 2.3pre2
-
resplit
public void resplit()
Restore the split configuration as it was before unsplitting.- Since:
- jEdit 4.3pre1
-
getSplitConfig
public java.lang.String getSplitConfig()
Split configurations are recorded in a simple RPN "language".- Returns:
- The split configuration, describing where splitpanes are, which buffers are open in each EditPane, etc.
-
setSplitConfig
public void setSplitConfig(Buffer buffer, java.lang.String splitConfig)
sets the split configuration as per the splitConfig.- Parameters:
buffer
- if null, checks all buffers to restore View's split config.splitConfig
- the split config, as returned by getSplitConfig()
-
nextTextArea
public void nextTextArea()
Moves keyboard focus to the next text area.- Since:
- jEdit 2.7pre4
-
prevTextArea
public void prevTextArea()
Moves keyboard focus to the previous text area.- Since:
- jEdit 2.7pre4
-
getSplitPane
public javax.swing.JSplitPane getSplitPane()
Returns the top-level split pane, if any.- Returns:
- the top JSplitPane if any.
- Since:
- jEdit 2.3pre2
-
getBuffer
public Buffer getBuffer()
Returns the current edit pane's buffer.- Returns:
- the current edit pane's buffer, it can be null
-
getBuffers
public Buffer[] getBuffers()
Returns all Buffers opened in this View, Sorted according to View options. (as of jEdit 5.2) With order preserved for unsorted buffersets (as of jEdit 5.3)- Since:
- jEdit 5.1
-
setBuffer
public void setBuffer(Buffer buffer)
Sets the current edit pane's buffer.- Parameters:
buffer
- The buffer
-
goToBuffer
public EditPane goToBuffer(Buffer buffer)
If this buffer is open in one of the view's edit panes, sets focus to that edit pane. Otherwise, opens the buffer in the currently active edit pane.- Parameters:
buffer
- The buffer- Returns:
- the current edit pane
- Since:
- jEdit 4.2pre1
-
showBuffer
public EditPane showBuffer(Buffer buffer)
If this buffer is open in one of the view's edit panes, activates that edit pane. Otherwise, opens the buffer in the currently active edit pane. But the focus is not moved.- Parameters:
buffer
- The buffer to show- Returns:
- the current edit pane
- Since:
- jEdit 4.3pre13
-
getTextArea
public JEditTextArea getTextArea()
Returns the current edit pane's text area.- Returns:
- the current edit pane's text area, or null if there is no edit pane yet
-
getEditPane
public EditPane getEditPane()
Returns the current edit pane.- Returns:
- the current edit pane
- Since:
- jEdit 2.5pre2
-
getEditPanes
public EditPane[] getEditPanes()
Returns all edit panes.- Returns:
- an array of all edit panes in the view
- Since:
- jEdit 2.5pre2
-
forEachEditPane
public void forEachEditPane(java.util.function.Consumer<? super EditPane> action)
Perform the given action on every EditPane- Parameters:
action
- an action to perform on every EditPane
-
getViewConfig
public View.ViewConfig getViewConfig()
- Returns:
- a ViewConfig instance for the current view
- Since:
- jEdit 4.2pre1
-
isClosed
public boolean isClosed()
Returns true if this view has been closed withjEdit.closeView(View)
.- Returns:
- true if the view is closed
-
isPlainView
public boolean isPlainView()
Returns true if this is an auxilliary view with no dockable windows.- Returns:
- true if the view is plain
- Since:
- jEdit 4.1pre2
-
getNext
public View getNext()
Returns the next view in the list.- Returns:
- the next view
-
getPrev
public View getPrev()
Returns the previous view in the list.- Returns:
- the preview view
-
setPrev
public void setPrev(View prev)
Set the previous view in linked list. To be used byBufferManager
only- Parameters:
prev
-- Since:
- jEdit 5.6pre1
-
setNext
public void setNext(View next)
Set the next view in linked list. To be used byBufferManager
only- Parameters:
next
-- Since:
- jEdit 5.6pre1
-
handlePropertiesChanged
public void handlePropertiesChanged(PropertiesChanged msg)
-
handleSearchSettingsChanged
public void handleSearchSettingsChanged(SearchSettingsChanged msg)
-
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Overrides:
getMinimumSize
in classjava.awt.Container
-
setWaitSocket
public void setWaitSocket(java.net.Socket waitSocket)
This socket is closed when the buffer is closed.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.awt.Component
-
updateTitle
public void updateTitle()
Updates the title bar.
-
setUserTitle
public void setUserTitle(java.lang.String title)
Sets a user-defined title for this view instead of the "view.title" property.
-
showUserTitleDialog
public void showUserTitleDialog()
Shows a dialog for selecting a user-defined title for this view.
-
getPrefixFocusOwner
public java.awt.Component getPrefixFocusOwner()
-
setPrefixFocusOwner
public void setPrefixFocusOwner(java.awt.Component prefixFocusOwner)
-
visit
public void visit(JEditVisitor visitor)
Visit the the editpanes and textareas of the view- Parameters:
visitor
- the visitor- Since:
- jEdit 4.3pre13
-
closeAllMenus
public void closeAllMenus()
closes any popup menus that may have been opened- Since:
- jEdit 4.4pre1
-
updateFullScreenProps
public void updateFullScreenProps()
-
isFullScreenMode
public boolean isFullScreenMode()
-
toggleFullScreen
public void toggleFullScreen()
-
updateBufferSwitcherStates
public void updateBufferSwitcherStates()
Enables or Disables the "Focus Buffer Switcher" menu item in the View menu depending on the visible state of the buffer switcher. The menu item is intended to have the same effect as clicking on the buffer switcher combo box, and it doesn't make sense to have this action available if the buffer switcher isn't visible. Also shows or hides the Buffer Switcher itself, since this can be invoked after the toggle buffer switcher action.
-
handleBufferUpdate
public void handleBufferUpdate(BufferUpdate msg)
-
handleEditPaneUpdate
public void handleEditPaneUpdate(EditPaneUpdate msg)
-
handleViewUpdate
public void handleViewUpdate(ViewUpdate msg)
-
adjust
public void adjust(View parent, View.ViewConfig config)
-
-