|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.IlvObjectInteractor
ilog.views.IlvReshapeSelection
ilog.views.objectinteractor.IlvTextEditor
public class IlvTextEditor
This is the object interactor designed for a IlvTextSelection.
It can handle mouse and key events and then edit the selected graphic object
implementing the interface IlvTextInterface.
While editing the selected label, you can perform the following actions with your mouse:
Tips
You can combine the <Shift> key and arrow keys to extend the selection zone.
You can also do Copy/Paste by using the Ctrl+C and Ctrl+V keys.
During the edit session you can move and reshape the selected text object:
IlvLabel);
IlvTextSelection,
Serialized Form| Constructor Summary | |
|---|---|
IlvTextEditor()
Creates a new IlvTextEditor. |
|
| Method Summary | |
|---|---|
protected void |
copySelection(IlvTextInterface text,
int startIndex,
int endIndex)
Copies the region from the input text object to the clipboard. |
protected void |
deleteSelection(IlvTextInterface text,
int startIndex,
int endIndex)
Delete the region from the input text object. |
void |
lostOwnership(Clipboard aClipboard,
Transferable aContents)
Empty implementation of the ClipboardOwner interface. |
boolean |
processEvent(IlvGraphic obj,
AWTEvent event,
IlvObjectInteractorContext context)
Handles mouse or key events to edit a selected graphic object implementing IlvTextInterface. |
protected void |
replaceSelection(IlvTextInterface text,
int startIndex,
int endIndex,
AttributedString s)
Replace the region from the input text object. |
protected void |
replaceSelection(IlvTextInterface text,
int startIndex,
int endIndex,
String s)
Replace the region from the input text object. |
| Methods inherited from class ilog.views.IlvReshapeSelection |
|---|
drawGhost, drawGhost, getBoundingBox, getCursor, handleButtonDown, handleButtonDragged, handleButtonUp, handleExpose, isOpaqueMode, onEnter, onExit, reshapeObject, setOpaqueMode |
| Methods inherited from class ilog.views.IlvObjectInteractor |
|---|
Get, Put |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvTextEditor()
IlvTextEditor.
| Method Detail |
|---|
public boolean processEvent(IlvGraphic obj,
AWTEvent event,
IlvObjectInteractorContext context)
IlvTextInterface.
processEvent in class IlvReshapeSelectionobj - Should be an IlvTextSelection.event - The mouse or key event.context - The interaction context.
public void lostOwnership(Clipboard aClipboard,
Transferable aContents)
lostOwnership in interface ClipboardOwner
protected void deleteSelection(IlvTextInterface text,
int startIndex,
int endIndex)
label.substring(startIndex, endIndex)
is removed from the label of the text object.
text - The text objectstartIndex - The index of the first character to be removed.endIndex - The index of the first character that is not anymore
removed.
protected void replaceSelection(IlvTextInterface text,
int startIndex,
int endIndex,
String s)
label.substring(startIndex, endIndex)
is replaced from the label of the text object.
text - The text objectstartIndex - The index of the first character to be replaced.endIndex - The index of the first character that is not anymore
replaced.s - The replacement string.
protected void replaceSelection(IlvTextInterface text,
int startIndex,
int endIndex,
AttributedString s)
label.substring(startIndex, endIndex)
is replaced from the label of the text object.
This variant is used when pasting an attributed string from the clipboard.
text - The text objectstartIndex - The index of the first character to be replaced.endIndex - The index of the first character that is not anymore
replaced.s - The replacement string as attributed text.
protected void copySelection(IlvTextInterface text,
int startIndex,
int endIndex)
label.substring(startIndex, endIndex)
is copied from the label of the text object to the clipboard.
text - The text objectstartIndex - The index of the first character to be removed.endIndex - The index of the first character that is not anymore
removed.
|
||||||||||
| PREV CLASS Documentation homepage. NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||