|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--com.monica.javacom.virtualdisplay.MJCAWTDisplay
This class provides the virtualDisplay functionality in the AWT framework.
This class acts as a Canvas and can be added to other Containers.
Configureable values:
Inner classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
MJCAWTDisplay(MJCConfiguration configuration)
Default constructor. |
Method Summary | |
void |
addC(char c)
Adds a character to the current cursor position. |
void |
addCA(char[] c)
Adds a char array to the current cursor position. |
void |
addS(java.lang.String s)
Adds a String to the current cursor position. |
void |
clear()
Clears the contents of the screen. |
void |
deleteChar()
Deletes a character at the cursor position. |
void |
deleteChar(int charNum)
Deletes charNum characters at the cursor position. |
void |
deleteLine(int lineNum)
Deletes lineNum rows at the current cursor position. |
void |
dumpContents()
Dumps the contents of the screen to the standard output. |
void |
eraseEOL()
Erases the contents of the current row from the horizontal cursor position (inclusive) to the last column (inclusive). |
MJCConfiguration |
getConfiguration()
Returns the MJCConfiguration with which this object is customized. |
int |
getCPosX()
Returns the current column of the cursor. |
int |
getCPosY()
Returns the current row of the cursor. |
int |
getCSizeX()
Returns the screen width in characters. |
int |
getCSizeY()
Returns the screen height in characters. |
java.lang.String |
getVirtualDisplayName()
Returns the MJC name of the MJCVirtualDisplay. |
java.lang.String |
getVirtualDisplayVersion()
Returns the MJC version of the MJCVirtualDisplay. |
boolean |
goDown()
Cursor goes one row down (if possible). |
int |
goDown(int num)
Cursor goes num times down. |
boolean |
goLeft()
Cursor goes one column to the left. |
int |
goLeft(int num)
Cursor goes <>num times to the left. |
boolean |
goRight()
Cursor goes one column to the right. |
int |
goRight(int num)
Cursor goes num times to the right. |
boolean |
goUp()
Cursor goes one row up (if possible). |
int |
goUp(int num)
Cursor goes num times up. |
void |
insertChar()
Inserts an empty character at the cursor position. |
void |
insertChar(int charNum)
Inserts charNum empty characters at the cursor position. |
void |
insertLine(int lineNum)
Inserts lineNum rows at the current cursor position. |
void |
moveCursor(boolean status)
Should addC/addCA/addS advance the cursor while adding characters. |
void |
newLine()
Cursors goes one row down. |
void |
paint(java.awt.Graphics g)
Repaints the contents of the Canvas. |
void |
refresh()
Refreshes the screen contents for the user. |
void |
scrollDown()
Moves all rows int the scrolling region one row up. |
void |
scrollUp()
Moves all rows in the scolling region one row down. |
void |
setConfiguration(MJCConfiguration configuration)
Sets the MJCConfiguration for this object. |
void |
setCPos(int x,
int y)
Sets the position of the cursor. |
void |
setCPosX(int x)
Sets the column of the cursor. |
void |
setCPosY(int y)
Sets the row of the cursors. |
void |
setCSize(int sizeX,
int sizeY)
Sets the screen size in characters. |
void |
setCSizeX(int sizeX)
Sets the screen width in characters. |
void |
setCSizeY(int sizeY)
Sets the screen height in characters. |
void |
setInvert(boolean status)
Sets the inverting status. |
void |
setScrollingRegion(int firstLine,
int lastLine)
Sets the scrolling region for the screen. |
Methods inherited from class java.awt.Canvas |
addNotify, getAccessibleContext |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, 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, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public MJCAWTDisplay(MJCConfiguration configuration)
MJCConfiguration
- configuration: the customization objectMethod Detail |
public void setConfiguration(MJCConfiguration configuration)
setConfiguration
in interface MJCConfigureable
MJCConfiguration
- configuration: the MJCConfiguration
object for the customizationpublic MJCConfiguration getConfiguration()
getConfiguration
in interface MJCConfigureable
public java.lang.String getVirtualDisplayName()
getVirtualDisplayName
in interface MJCVirtualDisplay
public java.lang.String getVirtualDisplayVersion()
getVirtualDisplayVersion
in interface MJCVirtualDisplay
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
Grpahics
- g: the Graphics object with which the rapinting workspublic void setCSize(int sizeX, int sizeY)
setCSize
in interface MJCVirtualDisplay
int
- sizeX: the widthint
- sizeY: the heightpublic void setCSizeX(int sizeX)
setCSizeX
in interface MJCVirtualDisplay
int
- sizeX: the widthpublic void setCSizeY(int sizeY)
setCSizeY
in interface MJCVirtualDisplay
int
- sizeY: the heightpublic int getCSizeX()
getCSizeX
in interface MJCVirtualDisplay
public int getCSizeY()
getCSizeY
in interface MJCVirtualDisplay
public void clear()
clear
in interface MJCVirtualDisplay
public void setCPos(int x, int y)
setCPos
in interface MJCVirtualDisplay
int
- x: the columnint
- y: the rowpublic void setCPosX(int x)
setCPosX
in interface MJCVirtualDisplay
int
- x: the columnpublic void setCPosY(int y)
setCPosY
in interface MJCVirtualDisplay
int
- y: the rowpublic int getCPosX()
getCPosX
in interface MJCVirtualDisplay
public int getCPosY()
getCPosY
in interface MJCVirtualDisplay
public void addC(char c)
addC
in interface MJCVirtualDisplay
char
- c: the characted to be addedpublic void scrollDown()
scrollDown
in interface MJCVirtualDisplay
public void scrollUp()
scrollUp
in interface MJCVirtualDisplay
public void newLine()
newLine
in interface MJCVirtualDisplay
public void addS(java.lang.String s)
addS
in interface MJCVirtualDisplay
String
- s: the String to be addedpublic void addCA(char[] c)
addCA
in interface MJCVirtualDisplay
char[]
- ca: the char array to be addedpublic void refresh()
refresh
in interface MJCVirtualDisplay
public boolean goLeft()
goLeft
in interface MJCVirtualDisplay
public int goLeft(int num)
goLeft
in interface MJCVirtualDisplay
int
- num: the number of times to go leftpublic boolean goRight()
goRight
in interface MJCVirtualDisplay
public int goRight(int num)
goRight
in interface MJCVirtualDisplay
int
- num: the number of times to go rightpublic boolean goUp()
goUp
in interface MJCVirtualDisplay
public int goUp(int num)
goUp
in interface MJCVirtualDisplay
int
- num: the number of times to go uppublic boolean goDown()
goDown
in interface MJCVirtualDisplay
public int goDown(int num)
goDown
in interface MJCVirtualDisplay
int
- num: the number of times to go down.public void setInvert(boolean status)
setInvert
in interface MJCVirtualDisplay
boolan
- status: the inverting statuspublic void dumpContents()
public void eraseEOL()
eraseEOL
in interface MJCVirtualDisplay
public void moveCursor(boolean status)
moveCursor
in interface MJCVirtualDisplay
boolean
- status: should the addC/addCA/addS methods advance
the cursor while adding characters.public void setScrollingRegion(int firstLine, int lastLine)
setScrollingRegion
in interface MJCVirtualDisplay
int
- firstLine: the first line of the scrolling regionint
- lastLine: the last line of the scrolling regionpublic void insertLine(int lineNum)
insertLine
in interface MJCVirtualDisplay
int
- lineNum: the number of rows to be insertedpublic void deleteLine(int lineNum)
deleteLine
in interface MJCVirtualDisplay
int
- lineNum: the number of rows to be deletedpublic void deleteChar()
deleteChar
in interface MJCVirtualDisplay
public void deleteChar(int charNum)
deleteChar
in interface MJCVirtualDisplay
int
- charNum: number of characters to be deletedpublic void insertChar()
insertChar
in interface MJCVirtualDisplay
public void insertChar(int charNum)
insertChar
in interface MJCVirtualDisplay
int
- charNum: number of characters to be inserted
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |