|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
org.gjt.sp.jedit.View
public class View
A View
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 a JEditTextArea
that displays a
Buffer
.
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.
EditPlugin
class.DockableWindowManager
object. This object is
responsible for creating, closing and managing dockable windows.jEdit
class.
jEdit.newView(View)
,
jEdit.newView(View,Buffer)
,
jEdit.newView(View,Buffer,boolean)
,
jEdit.closeView(View)
,
Serialized FormNested Class Summary | |
---|---|
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.Frame |
---|
java.awt.Frame.AccessibleAWTFrame |
Nested classes/interfaces inherited from class java.awt.Window |
---|
java.awt.Window.AccessibleAWTWindow |
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 | |
---|---|
static int |
ABOVE_ACTION_BAR_LAYER
Deprecated. Status bar no longer added as a tool bar. |
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 DockableWindowManager |
static 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 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 DockableWindowManager |
static int |
TOP_LAYER
The highest possible layer. |
static int |
VIEW
|
static java.lang.String |
VIEW_DOCKING_FRAMEWORK_PROPERTY
|
Fields inherited from class javax.swing.JFrame |
---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
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 |
Fields inherited from interface javax.swing.WindowConstants |
---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Method Summary | |
---|---|
void |
actionBar()
Shows the action bar if needed, and sends keyboard focus there. |
void |
addToolBar(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(int group,
int layer,
java.awt.Component toolBar)
Adds a tool bar to this view. |
void |
adjust(View parent,
View.ViewConfig config)
|
ActionBar |
getActionBar()
Returns the action bar. |
Buffer |
getBuffer()
Returns the current edit pane's buffer. |
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. |
BufferSet |
getLocalBufferSet()
Returns the view's local buffer set, which can be shared by several editpanes. |
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 |
handleMessage(EBMessage msg)
Handles a message sent on the EditBus. |
void |
hideWaitCursor()
Hides the wait cursor. |
boolean |
isClosed()
Returns true if this view has been closed with jEdit.closeView(View) . |
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 |
processKeyEvent(java.awt.event.KeyEvent evt,
int from,
boolean global)
Deprecated. do not use, try InputHandler.processKeyEvent(java.awt.event.KeyEvent, int, boolean) |
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 |
setBuffer(Buffer buffer,
boolean disableFileStatusCheck)
Sets the current edit pane's buffer. |
void |
setBuffer(Buffer buffer,
boolean disableFileStatusCheck,
boolean focus)
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 |
setPrefixFocusOwner(java.awt.Component prefixFocusOwner)
|
void |
setSplitConfig(Buffer buffer,
java.lang.String splitConfig)
sets the split configuration as per the splitConfig. |
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 |
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, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
---|
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, 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, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, 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, isOpaque, 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, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
public static final java.lang.String VIEW_DOCKING_FRAMEWORK_PROPERTY
public static final java.lang.String DOCKING_FRAMEWORK_PROVIDER_SERVICE
public static final int TOP_GROUP
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int BOTTOM_GROUP
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int DEFAULT_GROUP
public static final int TOP_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int DEFAULT_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int BOTTOM_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int ABOVE_SYSTEM_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int SYSTEM_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int BELOW_SYSTEM_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int SEARCH_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int BELOW_SEARCH_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Values@Deprecated public static final int ABOVE_ACTION_BAR_LAYER
public static final int ACTION_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int STATUS_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int BELOW_STATUS_BAR_LAYER
addToolBar(int,int,java.awt.Component)
,
Constant Field Valuespublic static final int VIEW
public static final int TEXT_AREA
public static final int ACTION_BAR
Method Detail |
---|
public DockableWindowManager getDockableWindowManager()
public static java.lang.String getDockingFrameworkName()
public static DockingFrameworkProvider getDockingFrameworkProvider()
public java.awt.Container getToolBar()
public void addToolBar(java.awt.Component toolBar)
toolBar
- The tool barpublic void addToolBar(int group, java.awt.Component toolBar)
group
- The tool bar group to add totoolBar
- The tool barToolBarManager
public void addToolBar(int group, int layer, java.awt.Component toolBar)
group
- The tool bar group to add tolayer
- The layer of the group to add totoolBar
- The tool barToolBarManager
public void removeToolBar(java.awt.Component toolBar)
toolBar
- The tool barpublic void showWaitCursor()
hideWaitCursor()
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 a showWaitCursor()
, use a
try
/finally
block, like this:
try { view.showWaitCursor(); // ... } finally { view.hideWaitCursor(); }
public void hideWaitCursor()
public final SearchBar getSearchBar()
public final ActionBar getActionBar()
public StatusBar getStatus()
StatusBar.setMessage(String)
and
StatusBar.setMessageAndClear(String)
methods can
be called on the return value of this method to display status
information to the user.
public void quickIncrementalSearch(boolean word)
public void quickHyperSearch(boolean word)
public void actionBar()
public java.awt.event.KeyListener getKeyEventInterceptor()
public void setKeyEventInterceptor(java.awt.event.KeyListener listener)
listener
- The key event interceptor.public InputHandler getInputHandler()
getInputHandler
in interface InputHandlerProvider
public void setInputHandler(InputHandler inputHandler)
inputHandler
- The new input handlerpublic Macros.Recorder getMacroRecorder()
public void setMacroRecorder(Macros.Recorder recorder)
recorder
- The macro recorderpublic void processKeyEvent(java.awt.event.KeyEvent evt)
processKeyEvent
in class java.awt.Component
public void processKeyEvent(java.awt.event.KeyEvent evt, boolean calledFromTextArea)
public void processKeyEvent(java.awt.event.KeyEvent evt, int from)
@Deprecated public void processKeyEvent(java.awt.event.KeyEvent evt, int from, boolean global)
InputHandler.processKeyEvent(java.awt.event.KeyEvent, int, boolean)
public EditPane splitHorizontally()
public EditPane splitVertically()
public EditPane split(int orientation)
orientation
- the orientation JSplitPane.HORIZONTAL_SPLIT
or
JSplitPane.VERTICAL_SPLIT
public void unsplit()
public void unsplitCurrent()
public void resplit()
public java.lang.String getSplitConfig()
public void setSplitConfig(Buffer buffer, java.lang.String splitConfig)
buffer
- if null, checks all buffers to restore View's split config.splitConfig
- the split config, as returned by getSplitConfig()public void nextTextArea()
public void prevTextArea()
public javax.swing.JSplitPane getSplitPane()
public Buffer getBuffer()
public void setBuffer(Buffer buffer)
buffer
- The bufferpublic void setBuffer(Buffer buffer, boolean disableFileStatusCheck)
buffer
- The bufferdisableFileStatusCheck
- Disables file status checking
regardless of the state of the checkFileStatus propertypublic void setBuffer(Buffer buffer, boolean disableFileStatusCheck, boolean focus)
buffer
- The bufferdisableFileStatusCheck
- Disables file status checking
regardless of the state of the checkFileStatus propertyfocus
- Whether the textarea should request focuspublic EditPane goToBuffer(Buffer buffer)
buffer
- The buffer
public EditPane showBuffer(Buffer buffer)
buffer
- The buffer to show
public JEditTextArea getTextArea()
public EditPane getEditPane()
public EditPane[] getEditPanes()
public BufferSet getLocalBufferSet()
public View.ViewConfig getViewConfig()
public boolean isClosed()
jEdit.closeView(View)
.
public boolean isPlainView()
public View getNext()
public View getPrev()
public 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 java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Container
public void setWaitSocket(java.net.Socket waitSocket)
public java.lang.String toString()
toString
in class java.awt.Component
public void updateTitle()
public java.awt.Component getPrefixFocusOwner()
public void setPrefixFocusOwner(java.awt.Component prefixFocusOwner)
public void visit(JEditVisitor visitor)
visitor
- the visitorpublic void updateFullScreenProps()
public void toggleFullScreen()
public void updateBufferSwitcherStates()
public void adjust(View parent, View.ViewConfig config)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |