com.sshtools.terminal.swing
Class SwingTerminalPanel

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by com.sshtools.terminal.swing.SwingTerminalPanel
All Implemented Interfaces:
VDUDisplay, java.awt.datatransfer.ClipboardOwner, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.print.Printable, java.io.Serializable, java.util.EventListener

public class SwingTerminalPanel
extends javax.swing.JComponent
implements VDUDisplay, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.print.Printable, java.awt.datatransfer.ClipboardOwner

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
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 COLOR_BOLD
           
static int COLOR_INVERT
           
protected  VDUScrollBar scrollBar
           
 
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
 
Fields inherited from interface com.sshtools.terminal.VDUDisplay
BACKGROUND_IMAGE_CENTERED, BACKGROUND_IMAGE_FILL, BACKGROUND_IMAGE_SCALED, BACKGROUND_IMAGE_TILED, CURSOR_BLOCK, CURSOR_LINE, FORWARD_AUTO_SCROLL, NO_AUTO_SCROLL, NO_BACKGROUND_IMAGE, RESIZE_FONT, RESIZE_NONE, RESIZE_SCREEN, REVERSE_AUTO_SCROLL
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
SwingTerminalPanel()
           
 
Method Summary
 void addFocusListener(java.awt.event.FocusListener listener)
           
 void addMouseListener(java.awt.event.MouseListener listener)
           
 void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
           
 void addNotify()
           
 int calcXOffset()
           
 int calcYOffset()
           
 void clearSelection()
           
 void focusTerminal()
          Terminal component requests focus
 int getCharacterColumns(char ch)
          Get the number of columns the supplied unicode character will take up on this terminal.
 java.awt.Color[] getColorSet()
           
 java.awt.Component getComponent()
          Get the component.
 int getCursorStyle()
           Get the cursor style.
 int getMouseWheelIncrement()
           
 java.awt.Dimension getPreferredSize()
           
 int getResizeStrategy()
          Return the current resize strategy.
 VDUScrollBar getScrollBar()
          Get the scrollbar (if any) that this display is using
 java.lang.String getSelection()
          Return the currently selected text from the terminal.
 java.awt.Font getTerminalFont()
          Get the terminal font
 VDUBuffer getVDUBuffer()
          Get the current buffer
 void init(VDUBuffer buffer)
          Initialise the display.
 void interruptBlink()
          Interupt the blink (make it 'on' for another cycle)
 boolean isAntialias()
           
 boolean isCenter()
          Get whether or not to keep the display central when resizing occurs
 boolean isCursorBlink()
          Get whether the cursor shoud blink or not.
 boolean isReverseVideo()
          Get whether reverse video is currently enabled
 void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
           
static void main(java.lang.String[] args)
           
protected  double max(double f1, double f2)
           
protected  double min(double f1, double f2)
           
 void mouseClicked(java.awt.event.MouseEvent evt)
           
 void mouseDragged(java.awt.event.MouseEvent evt)
           
 void mouseEntered(java.awt.event.MouseEvent evt)
           
 void mouseExited(java.awt.event.MouseEvent evt)
           
 java.awt.Point mouseGetPos(java.awt.Point evtpt)
           
 void mouseMoved(java.awt.event.MouseEvent evt)
           
 void mousePressed(java.awt.event.MouseEvent evt)
           
 void mouseReleased(java.awt.event.MouseEvent evt)
           
 void paintComponent(java.awt.Graphics g)
           
 void print(java.awt.Graphics g)
           
 int print(java.awt.Graphics graphics, java.awt.print.PageFormat pageFormat, int pageIndex)
           
protected  void processComponentKeyEvent(java.awt.event.KeyEvent evt)
           
 void processEvent(java.awt.AWTEvent evt)
           
 void processFocusEvent(java.awt.event.FocusEvent evt)
           
 void processMouseEvent(java.awt.event.MouseEvent evt)
           
 void processMouseMotionEvent(java.awt.event.MouseEvent evt)
           
 void recalculateCharacterMetrics()
           
 void recalculateFontAndDisplaySize()
          Recalculate the font size and the size of the display.
 void redisplay()
          Redisplay everything, including resizing the display if necessary.
 void redraw()
          Implement to redraw the terminal screen from the current buffer
protected  void redraw(java.awt.Graphics g1)
           
 void removeFocusListener(java.awt.event.FocusListener listener)
           
 void removeMouseListener(java.awt.event.MouseListener listener)
           
 void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
           
 void resizeFont(int w, int h)
          Resize the font to best match the given size
 void scrollTo(int position)
          Set the scroll bar position and scroll the display
 void selectScreen()
          Select the entire screen
 void setAntialias(boolean antialias)
           
 void setAutoScroll(int direction, int delay, int x, int y)
           
 void setBackgroundImage(java.awt.Image backgroundImage)
          Set the background image
 void setBackgroundImageType(int backgroundImageType)
          Set the type of background image
 void setBounds(int x, int y, int w, int h)
           
 void setCenter(boolean center)
          Set whether or not to keep the display central when resizing occurs
 void setColorPrinting(boolean colorPrint)
          Set whether colors should be printed.
 void setColorSet(java.awt.Color[] colorset)
           
 void setCursorBlink(boolean blink)
          Set whether the cursor shoud blink or not.
 void setCursorColors(java.awt.Color fg, java.awt.Color bg)
          Set the cursor colors.
 void setCursorStyle(int cursorStyle)
           Set the cursor style.
 void setDefaultBackground(java.awt.Color color)
          Set the default background color of the terminal
 void setDefaultForeground(java.awt.Color color)
          Set the default background color of the terminal
 void setFont(java.awt.Font font)
           
 void setMouseWheelIncrement(int mouseWheelIncrement)
          Set the mouse wheel increment in lines.
 void setResizeStrategy(int strategy)
           Set the resize strategy.
 void setReverseVideo(boolean reverseVideo)
          Set whether reverse video is enabled
 void setScrollBar(VDUScrollBar scrollBar)
          Set the scrollbar (or null for no scrollbar) that this display should use.
 void setSelectionXOR(java.awt.Color selectionXOR)
          Set XOR color to use the current selection.
 void setSetClipboardOnSelect(boolean setClipboardOnSelect)
          Set whether or not to set the clipboard upon selection
 void setTerminalFont(java.awt.Font font)
          Set the default font
 void setVDUBuffer(VDUBuffer buffer)
          Set the current buffer
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, printAll, printBorder, printChildren, printComponent, processKeyBinding, processKeyEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sshtools.terminal.VDUDisplay
getBackground
 

Field Detail

COLOR_BOLD

public static final int COLOR_BOLD
See Also:
Constant Field Values

COLOR_INVERT

public static final int COLOR_INVERT
See Also:
Constant Field Values

scrollBar

protected VDUScrollBar scrollBar
Constructor Detail

SwingTerminalPanel

public SwingTerminalPanel()
Method Detail

init

public void init(VDUBuffer buffer)
Description copied from interface: VDUDisplay
Initialise the display.

Specified by:
init in interface VDUDisplay
Parameters:
buffer - buffer

max

protected double max(double f1,
                     double f2)

min

protected double min(double f1,
                     double f2)

setAntialias

public void setAntialias(boolean antialias)

isAntialias

public boolean isAntialias()

setVDUBuffer

public void setVDUBuffer(VDUBuffer buffer)
Description copied from interface: VDUDisplay
Set the current buffer

Specified by:
setVDUBuffer in interface VDUDisplay
Parameters:
buffer - buffer

getVDUBuffer

public VDUBuffer getVDUBuffer()
Description copied from interface: VDUDisplay
Get the current buffer

Specified by:
getVDUBuffer in interface VDUDisplay
Returns:
buffer

setColorSet

public void setColorSet(java.awt.Color[] colorset)

getColorSet

public java.awt.Color[] getColorSet()

setFont

public void setFont(java.awt.Font font)
Overrides:
setFont in class javax.swing.JComponent

setResizeStrategy

public void setResizeStrategy(int strategy)
Description copied from interface: VDUDisplay

Set the resize strategy. Can be one of :-

Specified by:
setResizeStrategy in interface VDUDisplay
Parameters:
strategy - resize strategy

setScrollBar

public void setScrollBar(VDUScrollBar scrollBar)
Description copied from interface: VDUDisplay
Set the scrollbar (or null for no scrollbar) that this display should use.

Specified by:
setScrollBar in interface VDUDisplay
Parameters:
scrollBar - scrollbar

redraw

protected void redraw(java.awt.Graphics g1)

main

public static void main(java.lang.String[] args)

paintComponent

public void paintComponent(java.awt.Graphics g)
Overrides:
paintComponent in class javax.swing.JComponent

redraw

public void redraw()
Description copied from interface: VDUDisplay
Implement to redraw the terminal screen from the current buffer

Specified by:
redraw in interface VDUDisplay

setColorPrinting

public void setColorPrinting(boolean colorPrint)
Description copied from interface: VDUDisplay
Set whether colors should be printed.

Specified by:
setColorPrinting in interface VDUDisplay
Parameters:
colorPrint - color printing

print

public int print(java.awt.Graphics graphics,
                 java.awt.print.PageFormat pageFormat,
                 int pageIndex)
          throws java.awt.print.PrinterException
Specified by:
print in interface java.awt.print.Printable
Throws:
java.awt.print.PrinterException

print

public void print(java.awt.Graphics g)
Overrides:
print in class javax.swing.JComponent

mouseGetPos

public java.awt.Point mouseGetPos(java.awt.Point evtpt)

setCursorColors

public void setCursorColors(java.awt.Color fg,
                            java.awt.Color bg)
Description copied from interface: VDUDisplay
Set the cursor colors. null means default to text color.

Specified by:
setCursorColors in interface VDUDisplay
Parameters:
fg - cursor foreground
bg - cursor background

redisplay

public void redisplay()
Description copied from interface: VDUDisplay
Redisplay everything, including resizing the display if necessary.

Specified by:
redisplay in interface VDUDisplay

setCenter

public void setCenter(boolean center)
Description copied from interface: VDUDisplay
Set whether or not to keep the display central when resizing occurs

Specified by:
setCenter in interface VDUDisplay
Parameters:
center - center display

isCenter

public boolean isCenter()
Description copied from interface: VDUDisplay
Get whether or not to keep the display central when resizing occurs

Specified by:
isCenter in interface VDUDisplay
Returns:
center display

calcXOffset

public int calcXOffset()

calcYOffset

public int calcYOffset()

setBounds

public void setBounds(int x,
                      int y,
                      int w,
                      int h)
Overrides:
setBounds in class java.awt.Component

recalculateFontAndDisplaySize

public void recalculateFontAndDisplaySize()
Description copied from interface: VDUDisplay
Recalculate the font size and the size of the display. Invoked when a screen resize event occurs.

Specified by:
recalculateFontAndDisplaySize in interface VDUDisplay

resizeFont

public void resizeFont(int w,
                       int h)
Description copied from interface: VDUDisplay
Resize the font to best match the given size

Specified by:
resizeFont in interface VDUDisplay
Parameters:
w - width
h - height

recalculateCharacterMetrics

public void recalculateCharacterMetrics()

getPreferredSize

public java.awt.Dimension getPreferredSize()
Overrides:
getPreferredSize in class javax.swing.JComponent

clearSelection

public void clearSelection()

getSelection

public java.lang.String getSelection()
Description copied from interface: VDUDisplay
Return the currently selected text from the terminal.

Specified by:
getSelection in interface VDUDisplay
Returns:
selected text

getScrollBar

public VDUScrollBar getScrollBar()
Description copied from interface: VDUDisplay
Get the scrollbar (if any) that this display is using

Specified by:
getScrollBar in interface VDUDisplay
Returns:
scrollbar

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent evt)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent evt)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent evt)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent evt)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent evt)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent evt)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent evt)
Specified by:
mouseReleased in interface java.awt.event.MouseListener

addMouseListener

public void addMouseListener(java.awt.event.MouseListener listener)
Overrides:
addMouseListener in class java.awt.Component

removeMouseListener

public void removeMouseListener(java.awt.event.MouseListener listener)
Overrides:
removeMouseListener in class java.awt.Component

addMouseMotionListener

public void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
Overrides:
addMouseMotionListener in class java.awt.Component

removeMouseMotionListener

public void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
Overrides:
removeMouseMotionListener in class java.awt.Component

processMouseEvent

public void processMouseEvent(java.awt.event.MouseEvent evt)
Overrides:
processMouseEvent in class javax.swing.JComponent

processMouseMotionEvent

public void processMouseMotionEvent(java.awt.event.MouseEvent evt)
Overrides:
processMouseMotionEvent in class javax.swing.JComponent

getMouseWheelIncrement

public int getMouseWheelIncrement()

setMouseWheelIncrement

public void setMouseWheelIncrement(int mouseWheelIncrement)
Description copied from interface: VDUDisplay
Set the mouse wheel increment in lines. I.e., if the user scrolls 3 clicks and the increment is 2, then the terminal display will be scrolled 6 lines.

Specified by:
setMouseWheelIncrement in interface VDUDisplay
Parameters:
mouseWheelIncrement - mouse wheel increment

processEvent

public void processEvent(java.awt.AWTEvent evt)
Overrides:
processEvent in class java.awt.Container

processComponentKeyEvent

protected void processComponentKeyEvent(java.awt.event.KeyEvent evt)
Overrides:
processComponentKeyEvent in class javax.swing.JComponent

addFocusListener

public void addFocusListener(java.awt.event.FocusListener listener)
Overrides:
addFocusListener in class java.awt.Component

removeFocusListener

public void removeFocusListener(java.awt.event.FocusListener listener)
Overrides:
removeFocusListener in class java.awt.Component

processFocusEvent

public void processFocusEvent(java.awt.event.FocusEvent evt)
Overrides:
processFocusEvent in class java.awt.Component

getComponent

public java.awt.Component getComponent()
Description copied from interface: VDUDisplay
Get the component. This will be added to container applications UI.

Specified by:
getComponent in interface VDUDisplay
Returns:
VDU display component

getResizeStrategy

public int getResizeStrategy()
Description copied from interface: VDUDisplay
Return the current resize strategy. Can be one of :-

Specified by:
getResizeStrategy in interface VDUDisplay
Returns:
resize strategy

setSelectionXOR

public void setSelectionXOR(java.awt.Color selectionXOR)
Description copied from interface: VDUDisplay
Set XOR color to use the current selection. By default, this will either by the terminal foreground color (if reverse video) or the terminal background color (if not reverse video).

Set to null to reverse to the default behaviour.

Specified by:
setSelectionXOR in interface VDUDisplay
Parameters:
selectionXOR - selection XOR color

setDefaultBackground

public void setDefaultBackground(java.awt.Color color)
Description copied from interface: VDUDisplay
Set the default background color of the terminal

Specified by:
setDefaultBackground in interface VDUDisplay
Parameters:
color - default background color

setDefaultForeground

public void setDefaultForeground(java.awt.Color color)
Description copied from interface: VDUDisplay
Set the default background color of the terminal

Specified by:
setDefaultForeground in interface VDUDisplay
Parameters:
color - default background color

setTerminalFont

public void setTerminalFont(java.awt.Font font)
Description copied from interface: VDUDisplay
Set the default font

Specified by:
setTerminalFont in interface VDUDisplay
Parameters:
font - default font

getTerminalFont

public java.awt.Font getTerminalFont()
Description copied from interface: VDUDisplay
Get the terminal font

Specified by:
getTerminalFont in interface VDUDisplay
Returns:
terminal font

setCursorStyle

public void setCursorStyle(int cursorStyle)
Description copied from interface: VDUDisplay

Set the cursor style. Can be one of :-


getCursorStyle

public int getCursorStyle()
Description copied from interface: VDUDisplay

Get the cursor style. Can be one of :-


interruptBlink

public void interruptBlink()
Description copied from interface: VDUDisplay
Interupt the blink (make it 'on' for another cycle)

Specified by:
interruptBlink in interface VDUDisplay

setCursorBlink

public void setCursorBlink(boolean blink)
Description copied from interface: VDUDisplay
Set whether the cursor shoud blink or not.

Specified by:
setCursorBlink in interface VDUDisplay
Parameters:
blink - cursor blink

setAutoScroll

public void setAutoScroll(int direction,
                          int delay,
                          int x,
                          int y)

isCursorBlink

public boolean isCursorBlink()
Description copied from interface: VDUDisplay
Get whether the cursor shoud blink or not.

Specified by:
isCursorBlink in interface VDUDisplay
Returns:
blink cursor

focusTerminal

public void focusTerminal()
Description copied from interface: VDUDisplay
Terminal component requests focus

Specified by:
focusTerminal in interface VDUDisplay

isReverseVideo

public boolean isReverseVideo()
Description copied from interface: VDUDisplay
Get whether reverse video is currently enabled

Specified by:
isReverseVideo in interface VDUDisplay
Returns:
reverse video

setReverseVideo

public void setReverseVideo(boolean reverseVideo)
Description copied from interface: VDUDisplay
Set whether reverse video is enabled

Specified by:
setReverseVideo in interface VDUDisplay
Parameters:
reverseVideo - reverse video

addNotify

public void addNotify()
Overrides:
addNotify in class javax.swing.JComponent

scrollTo

public void scrollTo(int position)
Description copied from interface: VDUDisplay
Set the scroll bar position and scroll the display

Specified by:
scrollTo in interface VDUDisplay
Parameters:
position - scroll bar position

setBackgroundImageType

public void setBackgroundImageType(int backgroundImageType)
Description copied from interface: VDUDisplay
Set the type of background image

Specified by:
setBackgroundImageType in interface VDUDisplay
Parameters:
backgroundImageType - background image type

setBackgroundImage

public void setBackgroundImage(java.awt.Image backgroundImage)
Description copied from interface: VDUDisplay
Set the background image

Specified by:
setBackgroundImage in interface VDUDisplay
Parameters:
backgroundImage - background image

setSetClipboardOnSelect

public void setSetClipboardOnSelect(boolean setClipboardOnSelect)
Description copied from interface: VDUDisplay
Set whether or not to set the clipboard upon selection

Specified by:
setSetClipboardOnSelect in interface VDUDisplay

lostOwnership

public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
                          java.awt.datatransfer.Transferable contents)
Specified by:
lostOwnership in interface java.awt.datatransfer.ClipboardOwner

selectScreen

public void selectScreen()
Description copied from interface: VDUDisplay
Select the entire screen

Specified by:
selectScreen in interface VDUDisplay

getCharacterColumns

public int getCharacterColumns(char ch)
Description copied from interface: VDUDisplay
Get the number of columns the supplied unicode character will take up on this terminal.

Specified by:
getCharacterColumns in interface VDUDisplay
Returns:
number of colums


Copyright © 2003-2009 SSHTOOLS LTD. All Rights Reserved.