org.nakedobjects.viewer.lightweight.view
Class CollectionView

java.lang.Object
  extended byorg.nakedobjects.viewer.lightweight.AbstractView
      extended byorg.nakedobjects.viewer.lightweight.AbstractObjectView
          extended byorg.nakedobjects.viewer.lightweight.ObjectIconView
              extended byorg.nakedobjects.viewer.lightweight.AbstractCompositeView
                  extended byorg.nakedobjects.viewer.lightweight.view.CollectionView
All Implemented Interfaces:
java.lang.Cloneable, CompositeView, LayoutTarget, ObjectView, View
Direct Known Subclasses:
StandardList

public abstract class CollectionView
extends AbstractCompositeView


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
 
Constructor Summary
CollectionView()
           
 
Method Summary
 void collectionAddUpdate(NakedCollection collection, NakedObject element)
           
 void collectionRemoveUpdate(NakedCollection collection, NakedObject element)
           
protected abstract  InternalView createListElement(NakedObject obj)
           
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 void firstClick(Click click)
          Called when the user clicks the mouse buttone within this view.
 Padding getPadding()
           
protected  void refresh()
           
 
Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractCompositeView
addView, calculateRepaintArea, clearRootViewIdentified, clone, debugDetails, debugFieldDetails, dispose, dropView, focusNext, focusPrevious, getBaseline, getComponents, getLayout, getRequiredSize, identifyView, layout, removeAllViews, removeView, replaceView, setLayout, setRootViewIdentified
 
Methods inherited from class org.nakedobjects.viewer.lightweight.ObjectIconView
defaultName, getStyle, getTitleTextStyle, includeIcon, includeTitle, indicatesForView, objectLocatedAt, size, titleIconBounds, titleSize, titleTextBounds
 
Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractObjectView
backgroundColor, createIconImage, dragCancel, dragging, dragObjectIn, dragObjectOut, dropObject, entered, enteredSubview, exited, exitedSubview, getFieldOf, getObject, getRoot, getState, init, isIdentified, isRoot, makeView, menuOptions, mouseMoved, objectInfo, objectMenuOptions, objectUpdate, parentObjectView, pickupObject, pickupView, removeViewsFor, secondClick, topView, toString, transparentBackground, viewMenuOptions
 
Methods inherited from class org.nakedobjects.viewer.lightweight.AbstractView
addControl, assignId, contains, createCanvas, defaultFieldHeight, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getParent, getSize, getWorkspace, invalidateLayout, isLayoutInvalid, isOpen, isReplaceable, 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.LayoutTarget
setLayoutValid
 
Methods inherited from interface org.nakedobjects.viewer.lightweight.ObjectView
getObject, getState, isRoot, objectInfo, objectLocatedAt, objectMenuOptions, objectUpdate, pickupObject, pickupView, removeViewsFor, topView, viewMenuOptions
 
Methods inherited from interface org.nakedobjects.viewer.lightweight.View
contains, entered, enteredSubview, exited, exitedSubview, getAbsoluteLocation, getBorder, getBounds, getId, getLocation, getName, getParent, getSize, getWorkspace, indicatesForView, invalidateLayout, isLayoutInvalid, isOpen, isReplaceable, makeView, menuOptions, mouseMoved, print, redraw, secondClick, setBorder, setBounds, setLocation, setSize, thirdClick, validateLayout
 

Constructor Detail

CollectionView

public CollectionView()
Method Detail

getPadding

public Padding getPadding()
Specified by:
getPadding in interface LayoutTarget
Overrides:
getPadding in class AbstractCompositeView

firstClick

public void firstClick(Click click)
Description copied from interface: View
Called when the user clicks the mouse buttone within this view.

Specified by:
firstClick in interface View
Overrides:
firstClick in class AbstractObjectView

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 AbstractCompositeView

refresh

protected void refresh()

createListElement

protected abstract InternalView createListElement(NakedObject obj)

collectionRemoveUpdate

public void collectionRemoveUpdate(NakedCollection collection,
                                   NakedObject element)
Specified by:
collectionRemoveUpdate in interface ObjectView
Overrides:
collectionRemoveUpdate in class AbstractObjectView

collectionAddUpdate

public void collectionAddUpdate(NakedCollection collection,
                                NakedObject element)
Specified by:
collectionAddUpdate in interface ObjectView
Overrides:
collectionAddUpdate in class AbstractObjectView