|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nakedobjects.viewer.lightweight.AbstractView
org.nakedobjects.viewer.lightweight.AbstractValueView
org.nakedobjects.viewer.lightweight.view.TextField
| Nested Class Summary | |
class |
TextField.CursorPosition
|
class |
TextField.Selection
|
| Field Summary |
| Fields inherited from class org.nakedobjects.viewer.lightweight.AbstractValueView |
objectField |
| Fields inherited from class org.nakedobjects.viewer.lightweight.AbstractView |
DEBUG, DRAG_HANDLE_WIDTH, HPADDING, ICON_SIZE, VPADDING |
| Fields inherited from interface org.nakedobjects.viewer.lightweight.InternalView |
FIELD, NORMAL |
| Constructor Summary | |
TextField()
|
|
| Method Summary | |
boolean |
canFocus()
|
int |
charWidth(char ch)
returns the width (in pixels) of the specified character if it were used in this field. |
void |
delete()
Delete the character to the left of the cursor. |
void |
deleteForward()
Delete the character to the right of the cursor. |
void |
drag(InternalDrag drag)
Indicates the drag started within this view's bounds is continuing. |
void |
dragFrom(InternalDrag drag)
Indicates the start of a drag within this view's bounds. |
void |
dragTo(InternalDrag drag)
Indicates the drag started within this view's bounds has been finished (although the location may now be outside of its bounds). |
void |
draw(Canvas canvas)
Called by the frame, or the parent view, when this view must redraw itself. |
void |
editComplete()
Indicates that editing has been completed and the entry should be saved. |
void |
entered()
Called as the mouse crosses the bounds, and ends up inside, of this view. |
void |
exited()
Called as the mouse crosses the bounds, and ends up outside, of this view. |
void |
firstClick(Click click)
Responds to first click by placing the cursor between the two characters nearest the point of the mouse. |
void |
focusLost()
|
void |
focusRecieved()
|
int |
getBaseline()
Returns the postion of the baseline for adjacent label. |
int |
getMaxWidth()
|
Size |
getRequiredSize()
|
NakedValue |
getValue()
|
void |
init(NakedValue value)
|
void |
keyPressed(int keyCode,
int modifiers)
Called when the user presses any key on the keyboard while this view has the focus. |
void |
keyReleased(int keyCode,
int modifiers)
Called when the user releases any key on the keyboard while this view has the focus. |
void |
keyTyped(char keyCode)
Called when the user presses a non-control key (i.e. data entry keys and not shift, up-arrow etc). |
int |
lineHeight()
|
void |
mouseMoved(Location at)
Detects wheter the point is in the lower right corner, and if so changes the cursor to show it can be resized. |
void |
paste()
|
void |
refresh()
refresh this views state from the value objects state so that it accurately reflects the value objects value. |
void |
secondClick(Click click)
Called when the user double-clicked this view. |
void |
setMaxTextWidth(int noCharacters)
Set the maximum width of the field, as a number of characters |
void |
setMaxWidth(int width)
Set the maximum width of the field, as a number of pixels |
void |
setNoLines(int noLines)
Sets the number of lines to display |
int |
stringWidth(java.lang.String string)
|
void |
thirdClick(Click click)
Called when the user triple-clicks the mouse buttone within this view. |
| Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractValueView |
canChangeValue, clone, dragCancel, getContainedBy, getFieldOf, getIdentified, getPadding, getRoot, hasFocus, indicatesForView, makeView, menuOptions, parentObjectView, refreshDerivedValue, refreshValue, set, toString |
| Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractView |
addControl, assignId, backgroundColor, calculateRepaintArea, contains, createCanvas, debugDetails, defaultFieldHeight, dispose, enteredSubview, exitedSubview, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getParent, getSize, getWorkspace, identifyView, invalidateLayout, isLayoutInvalid, isOpen, isReplaceable, layout, limitBounds, print, redraw, removeControl, repaintAll, setBorder, setBounds, setLayoutValid, setLocation, setParent, setSize, setWorkspace, transparentBackground, validateLayout |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.nakedobjects.viewer.lightweight.InternalView |
setParent |
| Methods inherited from interface org.nakedobjects.viewer.lightweight.View |
calculateRepaintArea, contains, debugDetails, dispose, enteredSubview, exitedSubview, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getParent, getSize, getWorkspace, identifyView, invalidateLayout, isLayoutInvalid, isOpen, isReplaceable, layout, print, redraw, setBorder, setBounds, setLocation, setSize, validateLayout |
| Methods inherited from interface org.nakedobjects.viewer.lightweight.KeyboardAccessible |
redraw |
| Constructor Detail |
public TextField()
| Method Detail |
public int getBaseline()
AbstractView
getBaseline in interface ViewgetBaseline in class AbstractViewpublic void setMaxTextWidth(int noCharacters)
public void setMaxWidth(int width)
public int getMaxWidth()
public void setNoLines(int noLines)
public Size getRequiredSize()
public NakedValue getValue()
getValue in class AbstractValueViewpublic boolean canFocus()
canFocus in interface KeyboardAccessiblecanFocus in class AbstractValueViewpublic int charWidth(char ch)
public void delete()
public void deleteForward()
public void drag(InternalDrag drag)
AbstractValueView
drag in interface DragInternaldrag in class AbstractValueViewpublic void dragFrom(InternalDrag drag)
AbstractValueView
dragFrom in interface DragInternaldragFrom in class AbstractValueViewpublic void dragTo(InternalDrag drag)
AbstractValueView
dragTo in interface DragInternaldragTo in class AbstractValueViewpublic void draw(Canvas canvas)
View
draw in interface Viewdraw in class AbstractValueViewpublic void editComplete()
AbstractValueView
editComplete in interface KeyboardAccessibleeditComplete in class AbstractValueViewpublic void entered()
View
entered in interface Viewentered in class AbstractValueViewpublic void exited()
View
exited in interface Viewexited in class AbstractValueViewpublic void firstClick(Click click)
firstClick in interface ViewfirstClick in class AbstractViewView#firstClick(Click)public void focusLost()
focusLost in interface KeyboardAccessiblefocusLost in class AbstractValueViewpublic void focusRecieved()
focusRecieved in interface KeyboardAccessiblefocusRecieved in class AbstractValueViewpublic void init(NakedValue value)
init in class AbstractValueView
public void keyPressed(int keyCode,
int modifiers)
keyPressed in interface KeyboardAccessiblekeyPressed in class AbstractValueViewkeyCode - modifiers -
public void keyReleased(int keyCode,
int modifiers)
keyReleased in interface KeyboardAccessiblekeyReleased in class AbstractValueViewkeyCode - modifiers - public void keyTyped(char keyCode)
keyPressed and a subsequent call to keyReleased.
keyTyped in interface KeyboardAccessiblekeyTyped in class AbstractValueViewkeyCode - public int lineHeight()
public void mouseMoved(Location at)
mouseMoved in interface ViewmouseMoved in class AbstractViewat - the position relative to the top-left of this viewView#mouseMoved(Location)public void paste()
public void refresh()
AbstractValueView
refresh in class AbstractValueViewpublic void secondClick(Click click)
Viewclick.
secondClick in interface ViewsecondClick in class AbstractViewpublic int stringWidth(java.lang.String string)
public void thirdClick(Click click)
ViewdoubleClick.
thirdClick in interface ViewthirdClick in class AbstractView
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||