|
||||||||||
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
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.createMenuItems(Vector)
method of
each plugin core 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 FormField Summary | |
static int |
ABOVE_STATUS_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 |
BELOW_SEARCH_BAR_LAYER
Below search bar layer. |
static int |
BELOW_STATUS_BAR_LAYER
Deprecated. Status bar no longer added as a tool bar. |
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
Deprecated. Status bar no longer added as a tool bar. |
static int |
SYSTEM_BAR_LAYER
System tool bar layer. |
static int |
TOP_GROUP
The group of tool bars above the DockableWindowManager |
static int |
TOP_LAYER
The highest possible layer. |
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 |
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. |
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. |
java.lang.String |
getSplitConfig()
Returns a string that can be passed to the view constructor to recreate the current split configuration in a new view. |
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.JToolBar |
getToolBar()
Returns the view's tool bar. |
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. |
boolean |
isSynchroScrollEnabled()
Returns if synchronized scrolling is enabled. |
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 |
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 |
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 |
setSynchroScrollEnabled(boolean synchroScroll)
Sets synchronized scrolling. |
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 |
synchroScrollHorizontal(JEditTextArea textArea,
int horizontalOffset)
Sets the horizontal offset of all text areas. |
void |
synchroScrollVertical(JEditTextArea textArea,
int firstLine)
Sets the first line of all text areas. |
void |
toggleSynchroScrollEnabled()
Toggles synchronized scrolling. |
void |
unsplit()
Unsplits the view. |
void |
unsplitCurrent()
Removes the current split. |
void |
updateGutterBorders()
Updates the borders of all gutters in this view to reflect the currently focused text area. |
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, 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, setIconImage, 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, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, 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, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, 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, 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, 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, isOpaque, 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, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, 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_STATUS_BAR_LAYER
public static final int STATUS_BAR_LAYER
public static final int BELOW_STATUS_BAR_LAYER
Method Detail |
public DockableWindowManager getDockableWindowManager()
public javax.swing.JToolBar 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.
public void hideWaitCursor()
public final SearchBar getSearchBar()
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 java.awt.event.KeyListener getKeyEventInterceptor()
public void setKeyEventInterceptor(java.awt.event.KeyListener listener)
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 EditPane splitHorizontally()
public EditPane splitVertically()
public EditPane split(int orientation)
public void unsplit()
public void unsplitCurrent()
public void nextTextArea()
public void prevTextArea()
public javax.swing.JSplitPane getSplitPane()
public Buffer getBuffer()
public void setBuffer(Buffer buffer)
public JEditTextArea getTextArea()
public EditPane getEditPane()
public EditPane[] getEditPanes()
public java.lang.String getSplitConfig()
public void updateGutterBorders()
public boolean isSynchroScrollEnabled()
public void toggleSynchroScrollEnabled()
public void setSynchroScrollEnabled(boolean synchroScroll)
public void synchroScrollVertical(JEditTextArea textArea, int firstLine)
textArea
- The text area that is propagating this changefirstLine
- The first linepublic void synchroScrollHorizontal(JEditTextArea textArea, int horizontalOffset)
textArea
- The text area that is propagating this changehorizontalOffset
- The horizontal offsetpublic void quickIncrementalSearch(boolean word)
public void quickHyperSearch(boolean word)
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |