|
||||||||||
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 View
getBaseline
in class AbstractView
public 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 AbstractValueView
public boolean canFocus()
canFocus
in interface KeyboardAccessible
canFocus
in class AbstractValueView
public int charWidth(char ch)
public void delete()
public void deleteForward()
public void drag(InternalDrag drag)
AbstractValueView
drag
in interface DragInternal
drag
in class AbstractValueView
public void dragFrom(InternalDrag drag)
AbstractValueView
dragFrom
in interface DragInternal
dragFrom
in class AbstractValueView
public void dragTo(InternalDrag drag)
AbstractValueView
dragTo
in interface DragInternal
dragTo
in class AbstractValueView
public void draw(Canvas canvas)
View
draw
in interface View
draw
in class AbstractValueView
public void editComplete()
AbstractValueView
editComplete
in interface KeyboardAccessible
editComplete
in class AbstractValueView
public void entered()
View
entered
in interface View
entered
in class AbstractValueView
public void exited()
View
exited
in interface View
exited
in class AbstractValueView
public void firstClick(Click click)
firstClick
in interface View
firstClick
in class AbstractView
View#firstClick(Click)
public void focusLost()
focusLost
in interface KeyboardAccessible
focusLost
in class AbstractValueView
public void focusRecieved()
focusRecieved
in interface KeyboardAccessible
focusRecieved
in class AbstractValueView
public void init(NakedValue value)
init
in class AbstractValueView
public void keyPressed(int keyCode, int modifiers)
keyPressed
in interface KeyboardAccessible
keyPressed
in class AbstractValueView
keyCode
- modifiers
- public void keyReleased(int keyCode, int modifiers)
keyReleased
in interface KeyboardAccessible
keyReleased
in class AbstractValueView
keyCode
- modifiers
- public void keyTyped(char keyCode)
keyPressed
and a subsequent call to keyReleased
.
keyTyped
in interface KeyboardAccessible
keyTyped
in class AbstractValueView
keyCode
- public int lineHeight()
public void mouseMoved(Location at)
mouseMoved
in interface View
mouseMoved
in class AbstractView
at
- the position relative to the top-left of this viewView#mouseMoved(Location)
public void paste()
public void refresh()
AbstractValueView
refresh
in class AbstractValueView
public void secondClick(Click click)
View
click
.
secondClick
in interface View
secondClick
in class AbstractView
public int stringWidth(java.lang.String string)
public void thirdClick(Click click)
View
doubleClick
.
thirdClick
in interface View
thirdClick
in class AbstractView
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |