★ wanayoo — archive 1999 http://sourceware.cygnus.com/kawa/api/gnu/jemacs/buffer/Window.htmlNouvelle recherche | Portail wanayoo

gnu.jemacs.buffer
Class Window

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.text.JTextComponent
                          |
                          +--javax.swing.JEditorPane
                                |
                                +--javax.swing.JTextPane
                                      |
                                      +--gnu.jemacs.buffer.Window

public class Window
extends javax.swing.JTextPane
implements java.awt.event.FocusListener

See Also:
Serialized Form

Inner classes inherited from class javax.swing.JEditorPane
javax.swing.JEditorPane.AccessibleJEditorPane, javax.swing.JEditorPane.AccessibleJEditorPaneHTML, javax.swing.JEditorPane.JEditorPaneAccessibleHypertextSupport
 
Inner classes inherited from class javax.swing.text.JTextComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.KeyBinding
 
Inner classes inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
 
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
 
Constructor Summary
Window(Buffer buffer)
          Create new Window.
Window(Buffer buffer, boolean wantModeline)
          Create new Window.
 
Method Summary
 void delete()
           
 void deleteOtherWindows()
           
 void focusGained(java.awt.event.FocusEvent e)
           
 void focusLost(java.awt.event.FocusEvent e)
           
 Buffer getBuffer()
           
static Window getContainedWindow(java.awt.Container cont, boolean last)
           
static Window getFirstWindow(java.awt.Container cont)
           
 Frame getFrame()
           
static Window getLastWindow(java.awt.Container cont)
           
 Window getNextWindow(boolean forwards)
          Return the next/previous Window in the cyclic order of windows.
 Window getNextWindowInFrame(int count)
           
 Window getOtherWindow(boolean forwards)
          Return the next/previous Window in the cyclic order of windows.
 javax.swing.JPanel getPanel()
          Get the JPanel containing this Window.
 int getPoint()
          Returns the "Emacs value" (1-origin) of point.
 java.awt.Dimension getPreferredScrollableViewportSize()
           
static Window getSelected()
           
static Window getWindow(java.awt.event.ActionEvent event)
           
 void setBuffer(Buffer buffer)
           
 void setDot(int offset)
           
 void setPoint(int point)
           
 void setSelected()
           
static void setSelected(Window window)
           
 Window split(Buffer buffer, int lines, boolean horizontal)
          Split this window into two.
 Window split(int lines, boolean horizontal)
           
 java.lang.String toString()
           
 javax.swing.JPanel wrap()
          Warp this (and optional modeline) inside a ScrollPane in a new JPanel.
 
Methods inherited from class javax.swing.JTextPane
addStyle, createDefaultEditorKit, getCharacterAttributes, getInputAttributes, getLogicalStyle, getParagraphAttributes, getScrollableTracksViewportWidth, getStyle, getStyledDocument, getStyledEditorKit, getUIClassID, insertComponent, insertIcon, paramString, removeStyle, replaceSelection, setCharacterAttributes, setDocument, setEditorKit, setLogicalStyle, setParagraphAttributes, setStyledDocument
 
Methods inherited from class javax.swing.JEditorPane
addHyperlinkListener, createEditorKitForContentType, fireHyperlinkUpdate, getAccessibleContext, getContentType, getEditorKit, getEditorKitForContentType, getPage, getPreferredSize, getScrollableTracksViewportHeight, getStream, getText, isManagingFocus, processComponentKeyEvent, read, registerEditorKitForContentType, registerEditorKitForContentType, removeHyperlinkListener, scrollToReference, setContentType, setEditorKitForContentType, setPage, setPage, setText
 
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretPosition, getDisabledTextColor, getDocument, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getScrollableBlockIncrement, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getUI, isEditable, isFocusTraversable, isOpaque, loadKeymap, modelToView, moveCaretPosition, paste, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, select, selectAll, setCaret, setCaretColor, setCaretPosition, setDisabledTextColor, setEditable, setEnabled, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setOpaque, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInsets, getInsets, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, processFocusEvent, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setMaximumSize, setMinimumSize, setNextFocusableComponent, setPreferredSize, setRequestFocusEnabled, setToolTipText, setUI, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setCursor, setLayout, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getInputContext, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hide, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, transferFocus
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Window

public Window(Buffer buffer)
Create new Window.
Parameters:
buffer - the Buffer containing the data.

Window

public Window(Buffer buffer,
              boolean wantModeline)
Create new Window.
Parameters:
buffer - the Buffer containing the data.
wantModeline - true if we should create a mode line
Method Detail

getPreferredScrollableViewportSize

public java.awt.Dimension getPreferredScrollableViewportSize()
Overrides:
getPreferredScrollableViewportSize in class javax.swing.text.JTextComponent

wrap

public javax.swing.JPanel wrap()
Warp this (and optional modeline) inside a ScrollPane in a new JPanel.

getPanel

public javax.swing.JPanel getPanel()
Get the JPanel containing this Window.

getWindow

public static Window getWindow(java.awt.event.ActionEvent event)

getSelected

public static Window getSelected()

setSelected

public void setSelected()

setSelected

public static void setSelected(Window window)

getFrame

public Frame getFrame()

getBuffer

public Buffer getBuffer()

setBuffer

public void setBuffer(Buffer buffer)

getPoint

public int getPoint()
Returns the "Emacs value" (1-origin) of point.

setPoint

public void setPoint(int point)

setDot

public void setDot(int offset)

split

public Window split(int lines,
                    boolean horizontal)

split

public Window split(Buffer buffer,
                    int lines,
                    boolean horizontal)
Split this window into two. Display Var>buffer in the new window.
Returns:
the new Window.

getNextWindow

public Window getNextWindow(boolean forwards)
Return the next/previous Window in the cyclic order of windows. Returns null if this is the last/first window in this Frame.

getOtherWindow

public Window getOtherWindow(boolean forwards)
Return the next/previous Window in the cyclic order of windows. Returns first/last if this is the last/first window in this Frame.

getContainedWindow

public static Window getContainedWindow(java.awt.Container cont,
                                        boolean last)

getFirstWindow

public static Window getFirstWindow(java.awt.Container cont)

getLastWindow

public static Window getLastWindow(java.awt.Container cont)

getNextWindowInFrame

public Window getNextWindowInFrame(int count)

delete

public void delete()

deleteOtherWindows

public void deleteOtherWindows()

focusGained

public void focusGained(java.awt.event.FocusEvent e)
Specified by:
focusGained in interface java.awt.event.FocusListener

focusLost

public void focusLost(java.awt.event.FocusEvent e)
Specified by:
focusLost in interface java.awt.event.FocusListener

toString

public java.lang.String toString()
Overrides:
toString in class java.awt.Component