|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
com.sshtools.terminal.swing.SwingTerminalPanel
| Nested Class Summary |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes 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 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 |
CURSOR_BLINK, CURSOR_BLOCK, CURSOR_LINE, RESIZE_FONT, RESIZE_NONE, RESIZE_SCREEN |
| 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 |
addKeyListener(java.awt.event.KeyListener listener)
|
void |
addMouseListener(java.awt.event.MouseListener listener)
|
void |
addMouseMotionListener(java.awt.event.MouseMotionListener listener)
|
void |
addNotify()
|
void |
clearSelection()
|
void |
focusTerminal()
Terminal component requests focus |
java.awt.Color[] |
getColorSet()
|
java.awt.Component |
getComponent()
Get the component. |
int |
getCursorStyle()
Get the cursor style. |
java.awt.Insets |
getInsets()
|
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.Dimension |
getSize()
|
java.awt.Font |
getTerminalFont()
Get the terminal font |
VDUBuffer |
getVDUBuffer()
Get the current buffer |
void |
init(VDUBuffer buffer)
Initialise the display. |
boolean |
isAntialias()
|
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)
|
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 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 |
refresh()
|
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 |
setAntialias(boolean antialias)
|
void |
setBorder(int thickness,
boolean raised)
|
void |
setBounds(int x,
int y,
int w,
int h)
|
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 |
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, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, paramString, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setForeground, 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, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, removeMouseWheelListener, 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 |
| Field Detail |
public static final int COLOR_BOLD
public static final int COLOR_INVERT
protected VDUScrollBar scrollBar
| Constructor Detail |
public SwingTerminalPanel()
| Method Detail |
public void init(VDUBuffer buffer)
VDUDisplay
init in interface VDUDisplaybuffer - buffer
protected double max(double f1,
double f2)
protected double min(double f1,
double f2)
public void setAntialias(boolean antialias)
public 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)
public java.awt.Color[] getColorSet()
public void setFont(java.awt.Font font)
public 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)
public void setScrollBar(VDUScrollBar scrollBar)
VDUDisplaynull for no scrollbar) that this display
should use.
setScrollBar in interface VDUDisplayscrollBar - scrollbarpublic void redraw()
VDUDisplay
redraw in interface VDUDisplayprotected void redraw(java.awt.Graphics g1)
public static void main(java.lang.String[] args)
public void paintComponent(java.awt.Graphics g1)
public void setColorPrinting(boolean colorPrint)
VDUDisplay
setColorPrinting in interface VDUDisplaycolorPrint - 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)
public 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 backgroundpublic void redisplay()
VDUDisplay
redisplay in interface VDUDisplay
public void setBounds(int x,
int y,
int w,
int h)
public void recalculateFontAndDisplaySize()
VDUDisplay
recalculateFontAndDisplaySize in interface VDUDisplaypublic void refresh()
public java.awt.Dimension getSize()
public java.awt.Dimension getPreferredSize()
public java.awt.Insets getInsets()
public void clearSelection()
public java.lang.String getSelection()
VDUDisplay
getSelection in interface VDUDisplaypublic VDUScrollBar getScrollBar()
VDUDisplay
getScrollBar in interface VDUDisplaypublic 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 addMouseListener(java.awt.event.MouseListener listener)
public void removeMouseListener(java.awt.event.MouseListener listener)
public void addMouseMotionListener(java.awt.event.MouseMotionListener listener)
public void removeMouseMotionListener(java.awt.event.MouseMotionListener listener)
public void processMouseEvent(java.awt.event.MouseEvent evt)
public void processMouseMotionEvent(java.awt.event.MouseEvent evt)
public int getMouseWheelIncrement()
public void setMouseWheelIncrement(int mouseWheelIncrement)
VDUDisplay
setMouseWheelIncrement in interface VDUDisplaymouseWheelIncrement - mouse wheel incrementpublic void processEvent(java.awt.AWTEvent evt)
public void addKeyListener(java.awt.event.KeyListener listener)
public void removeKeyListener(java.awt.event.KeyListener listener)
public void processKeyEvent(java.awt.event.KeyEvent evt)
public void addFocusListener(java.awt.event.FocusListener listener)
public void removeFocusListener(java.awt.event.FocusListener listener)
public void processFocusEvent(java.awt.event.FocusEvent evt)
public java.awt.Component getComponent()
VDUDisplay
getComponent 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 blinkpublic boolean isCursorBlink()
VDUDisplay
isCursorBlink in interface VDUDisplaypublic 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 addNotify()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||