org.nakedobjects.viewer.lightweight.view
Class EmptyField

java.lang.Object
  extended byorg.nakedobjects.viewer.lightweight.AbstractView
      extended byorg.nakedobjects.viewer.lightweight.AbstractObjectView
          extended byorg.nakedobjects.viewer.lightweight.view.EmptyField
All Implemented Interfaces:
ClassView, java.lang.Cloneable, DragTarget, InternalView, ObjectView, View

public class EmptyField
extends AbstractObjectView
implements InternalView, DragTarget, ClassView


Field Summary
 
Fields inherited from class org.nakedobjects.viewer.lightweight.AbstractObjectView
LOG
 
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
EmptyField()
           
 
Method Summary
 void dragObjectIn(ObjectDrag drag)
          Called as an object drag moves into this view
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 void dropObject(ObjectDrag drag)
          Called when a dragged object is dropped onto this view.
 NakedClass forNakedClass()
           
 int getBaseline()
          Returns the postion of the baseline for adjacent label.
 Size getRequiredSize()
           
 boolean indicatesForView(Location mouseLocation)
          Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.
protected  void init(NakedObject object)
           
 boolean isOpen()
          An empty field is an icon.
 boolean isReplaceable()
          An empty field should not be replaced by another view.
 void viewMenuOptions(MenuOptionSet options)
           
 
Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractObjectView
backgroundColor, clearRootViewIdentified, clone, collectionAddUpdate, collectionRemoveUpdate, createIconImage, debugDetails, dispose, dragCancel, dragging, dragObjectOut, dropView, entered, enteredSubview, exited, exitedSubview, firstClick, getFieldOf, getObject, getRoot, getState, isIdentified, isRoot, makeView, menuOptions, mouseMoved, objectInfo, objectLocatedAt, objectMenuOptions, objectUpdate, parentObjectView, pickupObject, pickupView, removeViewsFor, secondClick, setRootViewIdentified, topView, toString, transparentBackground
 
Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractView
addControl, assignId, calculateRepaintArea, contains, createCanvas, defaultFieldHeight, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getPadding, getParent, getSize, getWorkspace, identifyView, invalidateLayout, isLayoutInvalid, layout, limitBounds, print, redraw, removeControl, repaintAll, setBorder, setBounds, setLayoutValid, setLocation, setParent, setSize, setWorkspace, thirdClick, 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
getFieldOf, getRoot, parentObjectView, setParent
 
Methods inherited from interface org.nakedobjects.viewer.lightweight.View
calculateRepaintArea, contains, debugDetails, dispose, entered, enteredSubview, exited, exitedSubview, firstClick, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getPadding, getParent, getSize, getWorkspace, identifyView, invalidateLayout, isLayoutInvalid, layout, makeView, menuOptions, mouseMoved, print, redraw, secondClick, setBorder, setBounds, setLocation, setSize, thirdClick, validateLayout
 
Methods inherited from interface org.nakedobjects.viewer.lightweight.DragTarget
dragObjectOut
 

Constructor Detail

EmptyField

public EmptyField()
Method Detail

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.
See Also:
View#getBaseline()

isOpen

public boolean isOpen()
An empty field is an icon.

Specified by:
isOpen in interface View
Overrides:
isOpen in class AbstractView

isReplaceable

public boolean isReplaceable()
An empty field should not be replaced by another view.

Specified by:
isReplaceable in interface View
Overrides:
isReplaceable in class AbstractView

getRequiredSize

public Size getRequiredSize()
Specified by:
getRequiredSize in interface View
Overrides:
getRequiredSize in class AbstractObjectView

dragObjectIn

public void dragObjectIn(ObjectDrag drag)
Description copied from interface: DragTarget
Called as an object drag moves into this view

Specified by:
dragObjectIn in interface DragTarget
Overrides:
dragObjectIn in class AbstractObjectView

dropObject

public void dropObject(ObjectDrag drag)
Description copied from interface: DragTarget
Called when a dragged object is dropped onto this view.

Specified by:
dropObject in interface DragTarget
Overrides:
dropObject in class AbstractObjectView

forNakedClass

public NakedClass forNakedClass()
Specified by:
forNakedClass in interface ClassView

init

protected void init(NakedObject object)
Overrides:
init in class AbstractObjectView

indicatesForView

public boolean indicatesForView(Location mouseLocation)
Description copied from interface: View
Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.

Specified by:
indicatesForView in interface View
Overrides:
indicatesForView in class AbstractView

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 AbstractObjectView

viewMenuOptions

public void viewMenuOptions(MenuOptionSet options)
Specified by:
viewMenuOptions in interface ObjectView
Overrides:
viewMenuOptions in class AbstractObjectView