|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.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.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 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
|
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. |
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. |
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. |
View |
getPrev()
Returns the previous view in the list. |
SearchBar |
getSearchBar()
Returns the search bar. |
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. |
javax.swing.Box |
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 |
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 |
setWaitSocket(java.net.Socket waitSocket)
This socket is closed when the buffer is closed. |
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. |
java.lang.String |
toString()
|
void |
unsplit()
Unsplits the view. |
void |
unsplitCurrent()
Removes the current split. |
void |
updateTitle()
Updates the title bar. |
Methods inherited from class javax.swing.JFrame |
---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
---|
addNotify, finalize, 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, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setAlwaysOnTop, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationByPlatform, setLocationRelativeTo, 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, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, size, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
---|
getFont, postEvent |
Field Detail |
---|
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 Valuespublic 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 javax.swing.Box 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()
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)
public EditPane splitHorizontally()
public EditPane splitVertically()
public EditPane split(int orientation)
public void unsplit()
public void unsplitCurrent()
public void resplit()
public void nextTextArea()
public void prevTextArea()
public javax.swing.JSplitPane getSplitPane()
public Buffer getBuffer()
public void setBuffer(Buffer buffer)
public EditPane goToBuffer(Buffer buffer)
buffer
- The bufferpublic JEditTextArea getTextArea()
public EditPane getEditPane()
public EditPane[] getEditPanes()
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |