|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--dog.gui.DContainer
|
+--dog.gui.DTextComponent
A bean that allows the editing of some text.
| Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
| Field Summary | |
protected boolean |
editable
A boolean indicating whether or not this TextComponent is editable. |
protected int |
position
The caret position. |
protected int |
selectionEnd
The selection end. |
protected int |
selectionStart
The selection start. |
protected java.lang.String |
text
The value of the text. |
protected java.awt.event.TextListener |
textListener
|
| Fields inherited from class dog.gui.DContainer |
cancelButton, CENTER, defaultButton, EAST, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, tooltip, WEST |
| 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 |
| Method Summary | |
void |
addTextListener(java.awt.event.TextListener listener)
Adds the specified text event listener to recieve text events from this DTextComponent. |
void |
copySelection()
Copies the selected text to the clipboard. |
void |
cutSelection()
Cuts the selected text to the clipboard. |
void |
deleteLeft()
Deletes the character to the left of the caret. |
void |
deleteRight()
Deletes the character to the right of the caret. |
void |
deleteSelection()
Removes the selected text. |
int |
getCaretPosition()
Returns the position of the text insertion caret for the DTextComponent. |
java.lang.String |
getSelectedText()
Returns the selected text contained in this DTextComponent. |
int |
getSelectionEnd()
Returns the selected text's end position. |
int |
getSelectionStart()
Returns the selected text's start position. |
java.lang.String |
getText()
Returns the text contained in this DTextComponent. |
void |
insert(char ch,
boolean selected)
Inserts the specified character at the current caret position. |
void |
insert(java.lang.String text,
boolean selected)
Inserts the specified text at the current caret position. |
boolean |
isEditable()
Returns the boolean indicating whether this DTextComponent is editable or not. |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
Required because we are a clipboard owner, but does not actually do anything. |
void |
moveLeft(boolean selected)
Moves the caret one character left. |
void |
moveLineEnd(boolean selected)
Moves the caret to the end of the line. |
void |
moveLineStart(boolean selected)
Moves the caret to the start of the line. |
void |
moveRight(boolean selected)
Moves the caret one character right. |
void |
moveWordLeft(boolean selected)
Moves the caret one word left. |
void |
moveWordRight(boolean selected)
Moves the caret one word right. |
protected java.lang.String |
paramString()
Returns the parameter string for this component. |
void |
pasteSelection()
Pastes the text in the clipboard into this component. |
protected void |
processEvent(java.awt.AWTEvent event)
Processes events on this component. |
protected void |
processTextEvent(java.awt.event.TextEvent event)
Processes text events occurring on this component by dispatching them to any registered TextListener objects. |
void |
removeTextListener(java.awt.event.TextListener listener)
Removes the specified text event listener so that it no longer receives text events from this DTextComponent |
void |
select(int selectionStart,
int selectionEnd)
Selects the text found between the specified start and end locations. |
void |
selectAll()
Selects all the text in the DTextComponent. |
void |
setEditable(boolean editable)
Sets the specified boolean to indicate whether or not this DTextComponent should be editable. |
void |
setSelectionEnd(int selectionEnd)
Sets the selection end to the specified position. |
void |
setSelectionStart(int selectionStart)
Sets the selection start to the specified position. |
protected void |
setText(java.lang.String text)
Sets the text of this DTextComponent to the specified text. |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setFont, setLayout, update, validate, validateTree |
| Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String text
protected boolean editable
protected int position
protected int selectionStart
protected int selectionEnd
protected transient java.awt.event.TextListener textListener
| Method Detail |
public java.lang.String getText()
setText(java.lang.String)protected void setText(java.lang.String text)
text - the new text to be setgetText()public java.lang.String getSelectedText()
setText(java.lang.String)public boolean isEditable()
setEditable(boolean)public void setEditable(boolean editable)
editable - the boolean to be setisEditable()public int getSelectionStart()
public void setSelectionStart(int selectionStart)
selectionStart - the start position of the textpublic int getSelectionEnd()
public void setSelectionEnd(int selectionEnd)
selectionEnd - the start position of the text
public void select(int selectionStart,
int selectionEnd)
selectionStart - the start position of the textselectionEnd - the end position of the textpublic void selectAll()
public int getCaretPosition()
public void cutSelection()
public void copySelection()
public void pasteSelection()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents)
lostOwnership in interface java.awt.datatransfer.ClipboardOwnerpublic void moveLeft(boolean selected)
public void moveRight(boolean selected)
public void moveWordLeft(boolean selected)
public void moveWordRight(boolean selected)
public void moveLineStart(boolean selected)
public void moveLineEnd(boolean selected)
public void deleteSelection()
public void deleteRight()
public void deleteLeft()
public void insert(char ch,
boolean selected)
public void insert(java.lang.String text,
boolean selected)
public void addTextListener(java.awt.event.TextListener listener)
listener - the text event listenerpublic void removeTextListener(java.awt.event.TextListener listener)
protected void processEvent(java.awt.AWTEvent event)
processEvent in class DContainerevent - the eventprotected void processTextEvent(java.awt.event.TextEvent event)
e - the text eventComponent.enableEvents(long)protected java.lang.String paramString()
paramString in class DContainer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||