|
||||||||
| 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 object| Method Detail |
public void setConfiguration(MJCConfiguration configuration)
setConfiguration in interface MJCConfigureableMJCConfiguration - configuration: the MJCConfiguration
object for the customizationpublic MJCConfiguration getConfiguration()
getConfiguration in interface MJCConfigureablepublic java.lang.String getVirtualDisplayName()
getVirtualDisplayName in interface MJCVirtualDisplaypublic java.lang.String getVirtualDisplayVersion()
getVirtualDisplayVersion in interface MJCVirtualDisplaypublic void paint(java.awt.Graphics g)
paint in class java.awt.CanvasGrpahics - g: the Graphics object with which the rapinting works
public void setCSize(int sizeX,
int sizeY)
setCSize in interface MJCVirtualDisplayint - sizeX: the widthint - sizeY: the heightpublic void setCSizeX(int sizeX)
setCSizeX in interface MJCVirtualDisplayint - sizeX: the widthpublic void setCSizeY(int sizeY)
setCSizeY in interface MJCVirtualDisplayint - sizeY: the heightpublic int getCSizeX()
getCSizeX in interface MJCVirtualDisplaypublic int getCSizeY()
getCSizeY in interface MJCVirtualDisplaypublic void clear()
clear in interface MJCVirtualDisplay
public void setCPos(int x,
int y)
setCPos in interface MJCVirtualDisplayint - x: the columnint - y: the rowpublic void setCPosX(int x)
setCPosX in interface MJCVirtualDisplayint - x: the columnpublic void setCPosY(int y)
setCPosY in interface MJCVirtualDisplayint - y: the rowpublic int getCPosX()
getCPosX in interface MJCVirtualDisplaypublic int getCPosY()
getCPosY in interface MJCVirtualDisplaypublic void addC(char c)
addC in interface MJCVirtualDisplaychar - c: the characted to be addedpublic void scrollDown()
scrollDown in interface MJCVirtualDisplaypublic void scrollUp()
scrollUp in interface MJCVirtualDisplaypublic void newLine()
newLine in interface MJCVirtualDisplaypublic void addS(java.lang.String s)
addS in interface MJCVirtualDisplayString - s: the String to be addedpublic void addCA(char[] c)
addCA in interface MJCVirtualDisplaychar[] - ca: the char array to be addedpublic void refresh()
refresh in interface MJCVirtualDisplaypublic boolean goLeft()
goLeft in interface MJCVirtualDisplaypublic int goLeft(int num)
goLeft in interface MJCVirtualDisplayint - num: the number of times to go leftpublic boolean goRight()
goRight in interface MJCVirtualDisplaypublic int goRight(int num)
goRight in interface MJCVirtualDisplayint - num: the number of times to go rightpublic boolean goUp()
goUp in interface MJCVirtualDisplaypublic int goUp(int num)
goUp in interface MJCVirtualDisplayint - num: the number of times to go uppublic boolean goDown()
goDown in interface MJCVirtualDisplaypublic int goDown(int num)
goDown in interface MJCVirtualDisplayint - num: the number of times to go down.public void setInvert(boolean status)
setInvert in interface MJCVirtualDisplayboolan - status: the inverting statuspublic void dumpContents()
public void eraseEOL()
eraseEOL in interface MJCVirtualDisplaypublic void moveCursor(boolean status)
moveCursor in interface MJCVirtualDisplayboolean - status: should the addC/addCA/addS methods advance
the cursor while adding characters.
public void setScrollingRegion(int firstLine,
int lastLine)
setScrollingRegion in interface MJCVirtualDisplayint - firstLine: the first line of the scrolling regionint - lastLine: the last line of the scrolling regionpublic void insertLine(int lineNum)
insertLine in interface MJCVirtualDisplayint - lineNum: the number of rows to be insertedpublic void deleteLine(int lineNum)
deleteLine in interface MJCVirtualDisplayint - lineNum: the number of rows to be deletedpublic void deleteChar()
deleteChar in interface MJCVirtualDisplaypublic void deleteChar(int charNum)
deleteChar in interface MJCVirtualDisplayint - charNum: number of characters to be deletedpublic void insertChar()
insertChar in interface MJCVirtualDisplaypublic void insertChar(int charNum)
insertChar in interface MJCVirtualDisplayint - charNum: number of characters to be inserted
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||