org.nakedobjects.viewer.lightweight.view
Class OptionField

java.lang.Object
  extended byorg.nakedobjects.viewer.lightweight.AbstractView
      extended byorg.nakedobjects.viewer.lightweight.AbstractValueView
          extended byorg.nakedobjects.viewer.lightweight.view.OptionField
All Implemented Interfaces:
java.lang.Cloneable, DragInternal, InternalView, KeyboardAccessible, View

public class OptionField
extends AbstractValueView


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
OptionField()
           
 
Method Summary
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 int getBaseline()
          Returns the postion of the baseline for adjacent label.
 Size getRequiredSize()
           
 NakedValue getValue()
           
protected  void init(NakedValue value)
           
 void refresh()
          refresh this views state from the value objects state so that it accurately reflects the value objects value.
 
Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractValueView
canChangeValue, canFocus, clone, drag, dragCancel, dragFrom, dragTo, editComplete, entered, exited, focusLost, focusRecieved, getContainedBy, getFieldOf, getIdentified, getPadding, getRoot, hasFocus, indicatesForView, keyPressed, keyReleased, keyTyped, 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, firstClick, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getParent, getSize, getWorkspace, identifyView, invalidateLayout, isLayoutInvalid, isOpen, isReplaceable, layout, limitBounds, mouseMoved, print, redraw, removeControl, repaintAll, secondClick, setBorder, setBounds, setLayoutValid, setLocation, setParent, setSize, setWorkspace, thirdClick, 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, firstClick, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getParent, getSize, getWorkspace, identifyView, invalidateLayout, isLayoutInvalid, isOpen, isReplaceable, layout, mouseMoved, print, redraw, secondClick, setBorder, setBounds, setLocation, setSize, thirdClick, validateLayout
 
Methods inherited from interface org.nakedobjects.viewer.lightweight.KeyboardAccessible
redraw
 

Constructor Detail

OptionField

public OptionField()
Method Detail

draw

public void draw(Canvas canvas)
Description copied from interface: View
Called by the frame, or the parent view, when this view must redraw itself.

Specified by:
draw in interface View
Overrides:
draw in class AbstractValueView

getBaseline

public int getBaseline()
Description copied from class: AbstractView
Returns the postion of the baseline for adjacent label. If the label is drawn on this baseline when top of the label rectangle and this view's rectangle are aligned then the label should share the baseline with whatever text is shown within the view.

Specified by:
getBaseline in interface View
Overrides:
getBaseline in class AbstractView
Returns:
int the baseline to draw the label at.

getRequiredSize

public Size getRequiredSize()

getValue

public NakedValue getValue()
Specified by:
getValue in class AbstractValueView

refresh

public void refresh()
Description copied from class: AbstractValueView
refresh this views state from the value objects state so that it accurately reflects the value objects value.

Specified by:
refresh in class AbstractValueView

init

protected void init(NakedValue value)
Overrides:
init in class AbstractValueView