|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Canvas
com.sshtools.terminal.awt.AWTTerminalPanel
public class AWTTerminalPanel
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Canvas |
|---|
java.awt.Canvas.AccessibleAWTCanvas |
| 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 |
COLOR_BOLD
|
static int |
COLOR_INVERT
|
protected VDUScrollBar |
scrollBar
|
| 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 | |
|---|---|
AWTTerminalPanel()
Construct a new AWTTerminalPanel |
|
| Method Summary | |
|---|---|
void |
addFocusListener(java.awt.event.FocusListener listener)
|
void |
addKeyListener(java.awt.event.KeyListener listener)
|
void |
addMouseListener(java.awt.event.MouseListener listener)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener listener)
|
int |
calcXOffset()
|
int |
calcYOffset()
|
void |
clearSelection()
Remove the selection of text. |
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()
Return the set of 10 colors in use. |
java.awt.Component |
getComponent()
Get the component. |
int |
getCursorStyle()
Get the cursor style. |
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.Dimension |
getSize()
|
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()
Get if antialiasing in use |
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 |
keyPressed(java.awt.event.KeyEvent e)
|
void |
keyReleased(java.awt.event.KeyEvent e)
|
void |
keyTyped(java.awt.event.KeyEvent e)
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
|
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 |
paint(java.awt.Graphics g1)
|
void |
print(java.awt.Graphics g)
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
|
void |
processEvent(java.awt.AWTEvent evt)
|
void |
processFocusEvent(java.awt.event.FocusEvent evt)
|
void |
processKeyEvent(java.awt.event.KeyEvent evt)
|
void |
processMouseEvent(java.awt.event.MouseEvent evt)
|
void |
processMouseMotionEvent(java.awt.event.MouseEvent evt)
|
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 |
removeKeyListener(java.awt.event.KeyListener 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)
Set if the terminal characters should be antialiased |
void |
setAutoScroll(int direction,
int delay,
int x,
int y)
|
void |
setBackground(java.awt.Color c)
|
void |
setBackgroundImage(java.awt.Image backgroundImage)
Set the background image |
void |
setBackgroundImageType(int backgroundImageType)
Set the type of background image |
void |
setBorder(int thickness,
boolean raised)
Set the border around the terminal |
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 colorPrinting)
Set whether colors should be printed. |
void |
setColorSet(java.awt.Color[] colorset)
Set all 10 of the palette of ANSI colors. |
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 |
void |
update(java.awt.Graphics g)
|
| Methods inherited from class java.awt.Canvas |
|---|
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
| 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 |
|---|
public static final int COLOR_BOLD
public static final int COLOR_INVERT
protected VDUScrollBar scrollBar
| Constructor Detail |
|---|
public AWTTerminalPanel()
| Method Detail |
|---|
public void init(VDUBuffer buffer)
VDUDisplay
init in interface VDUDisplaybuffer - bufferpublic void setAntialias(boolean antialias)
antialias - antialiaspublic boolean isAntialias()
public void setVDUBuffer(VDUBuffer buffer)
VDUDisplay
setVDUBuffer in interface VDUDisplaybuffer - bufferpublic VDUBuffer getVDUBuffer()
VDUDisplay
getVDUBuffer in interface VDUDisplaypublic void setColorSet(java.awt.Color[] colorset)
colorset - color set.public java.awt.Color[] getColorSet()
public void setFont(java.awt.Font font)
setFont in class java.awt.Componentpublic void setResizeStrategy(int strategy)
VDUDisplaySet the resize strategy. Can be one of :-
setResizeStrategy in interface VDUDisplaystrategy - resize strategy
public void setBorder(int thickness,
boolean raised)
thickness - border widthraised - 3D raised effectpublic void setScrollBar(VDUScrollBar scrollBar)
VDUDisplaynull for no scrollbar) that this
display should use.
setScrollBar in interface VDUDisplayscrollBar - scrollbarpublic void scrollTo(int position)
VDUDisplay
scrollTo in interface VDUDisplayposition - scroll bar positionpublic void setSelectionXOR(java.awt.Color selectionXOR)
VDUDisplay
Set to null to reverse to the default behaviour.
setSelectionXOR in interface VDUDisplayselectionXOR - selection XOR colorpublic void setBackground(java.awt.Color c)
setBackground in class java.awt.Componentpublic void redraw()
VDUDisplay
redraw in interface VDUDisplaypublic void update(java.awt.Graphics g)
update in class java.awt.Canvaspublic void paint(java.awt.Graphics g1)
paint in class java.awt.Canvaspublic void setColorPrinting(boolean colorPrinting)
VDUDisplay
setColorPrinting in interface VDUDisplaycolorPrinting - color printing
public int print(java.awt.Graphics graphics,
java.awt.print.PageFormat pageFormat,
int pageIndex)
throws java.awt.print.PrinterException
print in interface java.awt.print.Printablejava.awt.print.PrinterExceptionpublic void print(java.awt.Graphics g)
print in class java.awt.Componentpublic java.awt.Point mouseGetPos(java.awt.Point evtpt)
public void setCursorColors(java.awt.Color fg,
java.awt.Color bg)
VDUDisplaynull means default to text color.
setCursorColors in interface VDUDisplayfg - cursor foregroundbg - cursor background
public void setBounds(int x,
int y,
int w,
int h)
setBounds in class java.awt.Componentpublic void recalculateFontAndDisplaySize()
VDUDisplay
recalculateFontAndDisplaySize in interface VDUDisplaypublic java.awt.Dimension getSize()
getSize in class java.awt.Componentpublic java.awt.Dimension getPreferredSize()
getPreferredSize in class java.awt.Componentpublic void clearSelection()
public java.lang.String getSelection()
VDUDisplay
getSelection in interface VDUDisplaypublic VDUScrollBar getScrollBar()
VDUDisplay
getScrollBar in interface VDUDisplaypublic void addMouseListener(java.awt.event.MouseListener listener)
addMouseListener in class java.awt.Componentpublic void mouseMoved(java.awt.event.MouseEvent evt)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked in interface java.awt.event.MouseListenerpublic void mouseEntered(java.awt.event.MouseEvent evt)
mouseEntered in interface java.awt.event.MouseListenerpublic void mouseExited(java.awt.event.MouseEvent evt)
mouseExited in interface java.awt.event.MouseListenerpublic void mousePressed(java.awt.event.MouseEvent evt)
mousePressed in interface java.awt.event.MouseListenerpublic void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased in interface java.awt.event.MouseListenerpublic void keyTyped(java.awt.event.KeyEvent e)
keyTyped in interface java.awt.event.KeyListenerpublic void keyPressed(java.awt.event.KeyEvent e)
keyPressed in interface java.awt.event.KeyListenerpublic void keyReleased(java.awt.event.KeyEvent e)
keyReleased in interface java.awt.event.KeyListenerpublic void removeMouseListener(java.awt.event.MouseListener listener)
removeMouseListener in class java.awt.Componentpublic void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
addMouseMotionListener in class java.awt.Componentpublic void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
removeMouseMotionListener in class java.awt.Componentpublic void processMouseEvent(java.awt.event.MouseEvent evt)
processMouseEvent in class java.awt.Componentpublic void processMouseMotionEvent(java.awt.event.MouseEvent evt)
processMouseMotionEvent in class java.awt.Componentpublic void setMouseWheelIncrement(int mouseWheelIncrement)
VDUDisplay
setMouseWheelIncrement in interface VDUDisplaymouseWheelIncrement - mouse wheel incrementpublic void processEvent(java.awt.AWTEvent evt)
processEvent in class java.awt.Componentpublic void addKeyListener(java.awt.event.KeyListener listener)
addKeyListener in class java.awt.Componentpublic void removeKeyListener(java.awt.event.KeyListener listener)
removeKeyListener in class java.awt.Componentpublic void processKeyEvent(java.awt.event.KeyEvent evt)
processKeyEvent in class java.awt.Componentpublic void addFocusListener(java.awt.event.FocusListener listener)
addFocusListener in class java.awt.Componentpublic void removeFocusListener(java.awt.event.FocusListener listener)
removeFocusListener in class java.awt.Componentpublic void processFocusEvent(java.awt.event.FocusEvent evt)
processFocusEvent in class java.awt.Componentpublic java.awt.Component getComponent()
VDUDisplay
getComponent in interface VDUDisplaypublic void redisplay()
VDUDisplay
redisplay in interface VDUDisplaypublic int getResizeStrategy()
VDUDisplay
getResizeStrategy in interface VDUDisplaypublic void setDefaultBackground(java.awt.Color color)
VDUDisplay
setDefaultBackground in interface VDUDisplaycolor - default background colorpublic void setDefaultForeground(java.awt.Color color)
VDUDisplay
setDefaultForeground in interface VDUDisplaycolor - default background colorpublic void setTerminalFont(java.awt.Font font)
VDUDisplay
setTerminalFont in interface VDUDisplayfont - default fontpublic java.awt.Font getTerminalFont()
VDUDisplay
getTerminalFont in interface VDUDisplaypublic void setCursorStyle(int cursorStyle)
VDUDisplaySet the cursor style. Can be one of :-
setCursorStyle in interface VDUDisplaycursorStyle - cursor stylepublic int getCursorStyle()
VDUDisplayGet the cursor style. Can be one of :-
getCursorStyle in interface VDUDisplaypublic void setCursorBlink(boolean blink)
VDUDisplay
setCursorBlink in interface VDUDisplayblink - cursor blink
public void setAutoScroll(int direction,
int delay,
int x,
int y)
public boolean isCursorBlink()
VDUDisplay
isCursorBlink in interface VDUDisplayprotected void redraw(java.awt.Graphics g1)
public void focusTerminal()
VDUDisplay
focusTerminal in interface VDUDisplaypublic boolean isReverseVideo()
VDUDisplay
isReverseVideo in interface VDUDisplaypublic void setReverseVideo(boolean reverseVideo)
VDUDisplay
setReverseVideo in interface VDUDisplayreverseVideo - reverse videopublic void setCenter(boolean center)
VDUDisplay
setCenter in interface VDUDisplaycenter - center displaypublic boolean isCenter()
VDUDisplay
isCenter in interface VDUDisplaypublic int calcXOffset()
public int calcYOffset()
public void interruptBlink()
VDUDisplay
interruptBlink in interface VDUDisplay
public void resizeFont(int w,
int h)
VDUDisplay
resizeFont in interface VDUDisplayw - widthh - heightpublic void setBackgroundImageType(int backgroundImageType)
VDUDisplay
setBackgroundImageType in interface VDUDisplaybackgroundImageType - background image typepublic void setBackgroundImage(java.awt.Image backgroundImage)
VDUDisplay
setBackgroundImage in interface VDUDisplaybackgroundImage - background imagepublic void setSetClipboardOnSelect(boolean setClipboardOnSelect)
VDUDisplay
setSetClipboardOnSelect in interface VDUDisplay
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
lostOwnership in interface java.awt.datatransfer.ClipboardOwnerpublic void selectScreen()
VDUDisplay
selectScreen in interface VDUDisplaypublic int getCharacterColumns(char ch)
VDUDisplay
getCharacterColumns in interface VDUDisplay
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||