org.nakedobjects.plugins.dnd.viewer.view.field
Class WrappedTextField

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
      extended by org.nakedobjects.plugins.dnd.viewer.view.field.AbstractField
          extended by org.nakedobjects.plugins.dnd.viewer.view.field.TextParseableFieldAbstract
              extended by org.nakedobjects.plugins.dnd.viewer.view.field.TextField
                  extended by org.nakedobjects.plugins.dnd.viewer.view.field.WrappedTextField
All Implemented Interfaces:
java.lang.Cloneable, View, TextBlockTarget

public class WrappedTextField
extends TextField


Field Summary
 
Fields inherited from class org.nakedobjects.plugins.dnd.viewer.view.field.TextField
cursor, selection, style, textContent
 
Fields inherited from class org.nakedobjects.plugins.dnd.viewer.view.field.AbstractField
TEXT_WIDTH
 
Fields inherited from interface org.nakedobjects.plugins.dnd.View
HPADDING, VPADDING
 
Constructor Summary
WrappedTextField(TextParseableContent content, ViewSpecification specification, ViewAxis axis, boolean showLines)
           
 
Method Summary
protected  void align()
           
protected  void drawHighlight(Canvas canvas, int maxWidth)
           
protected  void drawLines(Canvas canvas, Color color, int width)
           
protected  void drawText(Canvas canvas, Color textColor, int width)
           
protected  boolean enter()
          Called when 'enter' has been pressed.
 void setMaximumSize(Size size)
           
 void setNoLines(int noLines)
          Sets the number of lines to display
 void setSize(Size size)
           
 void setWrapping(boolean wrapping)
           
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.field.TextField
changeMade, clear, contentMenuOptions, copyToClipboard, debug, delete, deleteForward, down, drag, dragStart, dragTo, draw, editComplete, end, entered, escape, exited, firstClick, focusLost, focusReceived, getBaseline, getMaxFieldWidth, getMaximumSize, getText, hasInvalidEntry, home, isIdentified, keyPressed, keyReleased, keyTyped, left, pageDown, pageUp, pasteFromClipboard, refresh, right, save, secondClick, setWidth, tab, thirdClick, up
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.field.TextParseableFieldAbstract
canChangeValue, cantClear, isEmpty, parseEntry, provideClearCopyPaste, saveValue
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.field.AbstractField
canFocus, dragCancel, dragFrom, getIdentified, getPadding, getRoot, hasFocus, indicatesForView, initiateSave, toString, viewAreaType
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
addView, assignId, contains, containsFocus, debugStructure, dispose, drag, dragIn, dragOut, drop, drop, getAbsoluteLocation, getBounds, getContent, getFeedbackManager, getFocusManager, getId, getLocation, getParent, getRequiredSize, getSize, getSpecification, getState, getSubviews, getView, getViewAxis, getViewManager, getWorkspace, identify, invalidateContent, invalidateLayout, layout, limitBoundsWithin, limitBoundsWithin, markDamaged, markDamaged, mouseDown, mouseMoved, mouseUp, objectActionResult, pickupContent, pickupView, print, removeView, replaceOptions, replaceView, setBounds, setContent, setFocusManager, setLocation, setParent, setSpecification, setView, setViewAxis, subviewFor, update, updateView, viewMenuOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WrappedTextField

public WrappedTextField(TextParseableContent content,
                        ViewSpecification specification,
                        ViewAxis axis,
                        boolean showLines)
Method Detail

setWrapping

public void setWrapping(boolean wrapping)

drawLines

protected void drawLines(Canvas canvas,
                         Color color,
                         int width)
Specified by:
drawLines in class TextField

drawHighlight

protected void drawHighlight(Canvas canvas,
                             int maxWidth)
Specified by:
drawHighlight in class TextField

drawText

protected void drawText(Canvas canvas,
                        Color textColor,
                        int width)
Specified by:
drawText in class TextField

enter

protected boolean enter()
Description copied from class: TextField
Called when 'enter' has been pressed. Return indicates whether event has been consumed; by default it hasn't. This default implementation marks field as having edit completed.

Overrides:
enter in class TextField

setNoLines

public void setNoLines(int noLines)
Sets the number of lines to display


setSize

public void setSize(Size size)
Specified by:
setSize in interface View
Overrides:
setSize in class TextField

setMaximumSize

public void setMaximumSize(Size size)
Specified by:
setMaximumSize in interface View
Overrides:
setMaximumSize in class AbstractView

align

protected void align()
Specified by:
align in class TextField


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.