org.nakedobjects.plugins.dnd.viewer.view.simple
Class AbstractCompositeView

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
      extended by org.nakedobjects.plugins.dnd.viewer.view.simple.ObjectView
          extended by org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractCompositeView
All Implemented Interfaces:
java.lang.Cloneable, View
Direct Known Subclasses:
CompositeViewUsingBuilder, MasterDetailPanel

public abstract class AbstractCompositeView
extends ObjectView


Field Summary
protected  java.util.Vector<View> views
           
 
Fields inherited from interface org.nakedobjects.plugins.dnd.View
HPADDING, VPADDING
 
Constructor Summary
AbstractCompositeView(Content content, ViewSpecification specification, ViewAxis axis)
           
 
Method Summary
protected  void add(java.util.Vector views, View view)
           
 void addView(View view)
           
protected abstract  void buildView()
           
 boolean canDragView()
           
 void debug(DebugString debug)
          Returns debug details about this view.
 void debugStructure(DebugString b)
           
 void dispose()
          Called when a view is no longer needed and its resources can be disposed of.
protected abstract  void doLayout(Size maximumSize)
           
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 int getBaseline()
           
 FocusManager getFocusManager()
           
abstract  Size getMaximumSize()
           
 View[] getSubviews()
           
 void invalidateContent()
          Flags that the views do not properly represent the content, and hence it needs rebuilding.
 void invalidateLayout()
          Flags that the views are possibly not displaying the content fully - too small, wrong place etc - although views exists for all the content.
protected  boolean isLayoutInvalid()
           
 void layout(Size maximumSize)
           
 View pickupView(Location location)
          Called as the drag of this view starts.
 void refresh()
          Refreshes this view by reaccessing its content and redisplaying it.
 void removeView(View view)
          Removes the specifed view from the subviews contained by this view.
 void replaceView(View toReplace, View replacement)
           
 void setCanDragView(boolean canDragView)
           
 void setFocusManager(FocusManager focusManager)
           
 View subviewFor(Location location)
          Identifies the subview that contains the specified location within its bounds.
protected  View[] subviews()
           
 java.lang.String toString()
           
 void update(NakedObject object)
          notification that the content of this view has changed
 ViewAreaType viewAreaType(Location location)
          Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.simple.ObjectView
contentMenuOptions, dragIn, dragOut, dragStart, drop, firstClick, secondClick
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
assignId, canChangeValue, canFocus, contains, containsFocus, drag, drag, dragCancel, dragFrom, dragTo, drop, editComplete, entered, exited, focusLost, focusReceived, getAbsoluteLocation, getBounds, getContent, getFeedbackManager, getId, getLocation, getPadding, getParent, getRequiredSize, getSize, getSpecification, getState, getView, getViewAxis, getViewManager, getWorkspace, hasFocus, identify, keyPressed, keyReleased, keyTyped, limitBoundsWithin, limitBoundsWithin, markDamaged, markDamaged, mouseDown, mouseMoved, mouseUp, objectActionResult, pickupContent, print, replaceOptions, setBounds, setContent, setLocation, setMaximumSize, setParent, setSize, setSpecification, setView, setViewAxis, thirdClick, updateView, viewMenuOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

views

protected java.util.Vector<View> views
Constructor Detail

AbstractCompositeView

public AbstractCompositeView(Content content,
                             ViewSpecification specification,
                             ViewAxis axis)
Method Detail

refresh

public void refresh()
Description copied from interface: View
Refreshes this view by reaccessing its content and redisplaying it.

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

addView

public void addView(View view)
Specified by:
addView in interface View
Overrides:
addView in class AbstractView

add

protected void add(java.util.Vector views,
                   View view)

canDragView

public boolean canDragView()

debug

public void debug(DebugString debug)
Description copied from class: AbstractView
Returns debug details about this view.

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

debugStructure

public void debugStructure(DebugString b)
Specified by:
debugStructure in interface View
Overrides:
debugStructure in class AbstractView

dispose

public void dispose()
Description copied from interface: View
Called when a view is no longer needed and its resources can be disposed of. Dissociates this view from its parent, and removes itself from the list of views that need to be updated.

Specified by:
dispose in interface View
Overrides:
dispose in class AbstractView
See Also:
View.removeView(View)

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 AbstractView

getBaseline

public int getBaseline()
Specified by:
getBaseline in interface View
Overrides:
getBaseline in class AbstractView

getFocusManager

public FocusManager getFocusManager()
Specified by:
getFocusManager in interface View
Overrides:
getFocusManager in class AbstractView

getMaximumSize

public abstract Size getMaximumSize()
Specified by:
getMaximumSize in interface View
Overrides:
getMaximumSize in class AbstractView

getSubviews

public View[] getSubviews()
Specified by:
getSubviews in interface View
Overrides:
getSubviews in class AbstractView

buildView

protected abstract void buildView()

subviews

protected View[] subviews()

invalidateContent

public void invalidateContent()
Description copied from interface: View
Flags that the views do not properly represent the content, and hence it needs rebuilding. Contrast this with invalidateLayout(), which deals with an a complete view, but one that is not showing properly.

Specified by:
invalidateContent in interface View
Overrides:
invalidateContent in class ObjectView
See Also:
View.invalidateLayout()

invalidateLayout

public void invalidateLayout()
Description copied from interface: View
Flags that the views are possibly not displaying the content fully - too small, wrong place etc - although views exists for all the content. Contrast this with invalidateContent(), which deals with an incomplete view.

Specified by:
invalidateLayout in interface View
Overrides:
invalidateLayout in class AbstractView
See Also:
View.invalidateContent()

layout

public void layout(Size maximumSize)
Specified by:
layout in interface View
Overrides:
layout in class AbstractView

doLayout

protected abstract void doLayout(Size maximumSize)

isLayoutInvalid

protected boolean isLayoutInvalid()

subviewFor

public View subviewFor(Location location)
Description copied from interface: View
Identifies the subview that contains the specified location within its bounds. Returns null if no subview exists for that location.

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

pickupView

public View pickupView(Location location)
Description copied from interface: View
Called as the drag of this view starts.

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

removeView

public void removeView(View view)
Description copied from interface: View
Removes the specifed view from the subviews contained by this view.

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

replaceView

public void replaceView(View toReplace,
                        View replacement)
Specified by:
replaceView in interface View
Overrides:
replaceView in class AbstractView

setCanDragView

public void setCanDragView(boolean canDragView)

setFocusManager

public void setFocusManager(FocusManager focusManager)
Specified by:
setFocusManager in interface View
Overrides:
setFocusManager in class AbstractView

toString

public java.lang.String toString()
Overrides:
toString in class AbstractView

update

public void update(NakedObject object)
Description copied from interface: View
notification that the content of this view has changed

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

viewAreaType

public ViewAreaType viewAreaType(Location location)
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:
viewAreaType in interface View
Overrides:
viewAreaType in class AbstractView
Returns:
true if the user is targeting the view itself, false if the user is targeting what is being represented


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