org.nakedobjects.plugins.dnd.viewer.tree
Class TreeNodeBorder

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.border.AbstractViewDecorator
      extended by org.nakedobjects.plugins.dnd.viewer.border.AbstractBorder
          extended by org.nakedobjects.plugins.dnd.viewer.tree.TreeNodeBorder
All Implemented Interfaces:
java.lang.Cloneable, View

public class TreeNodeBorder
extends AbstractBorder


Field Summary
 
Fields inherited from class org.nakedobjects.plugins.dnd.viewer.border.AbstractBorder
bottom, left, right, top
 
Fields inherited from class org.nakedobjects.plugins.dnd.viewer.border.AbstractViewDecorator
wrappedView
 
Fields inherited from interface org.nakedobjects.plugins.dnd.View
HPADDING, VPADDING
 
Constructor Summary
TreeNodeBorder(View wrappedView, ViewSpecification replaceWith)
           
 
Method Summary
protected  Bounds contentArea()
           
 void debugDetails(DebugString debug)
           
 Drag dragStart(DragStart drag)
           
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 void entered()
          Called as the mouse crosses the bounds, and ends up inside, of this view.
 void exited()
          Called as the mouse crosses the bounds, and ends up outside, of this view.
 void firstClick(Click click)
          Called when the user clicks the mouse buttone within this view.
 int getBaseline()
           
 Size getRequiredSize(Size maximumSize)
           
 void objectActionResult(NakedObject result, Location at)
          Called when an action generates a result, allowing this view to decide what to do with it.
 void secondClick(Click click)
          Called when the user double-clicked this view.
 java.lang.String toString()
           
 ViewAreaType viewAreaType(Location mouseLocation)
          Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.
 void viewMenuOptions(UserActionSet options)
          Called when the popup menu is being populated for this view.
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.border.AbstractBorder
dragFrom, dragIn, dragOut, drop, drop, getBottom, getLeft, getPadding, getRight, getSize, getTop, identify, isOnBorder, mouseDown, mouseMoved, mouseUp, overBorder, overContent, pickupContent, pickupView, setBounds, setMaximumSize, setSize, thirdClick
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.border.AbstractViewDecorator
addView, canChangeValue, canFocus, contains, containsFocus, contentMenuOptions, debug, debugStructure, dispose, drag, drag, dragCancel, dragTo, editComplete, focusLost, focusReceived, getAbsoluteLocation, getBounds, getContent, getFeedbackManager, getFocusManager, getId, getLocation, getMaximumSize, getParent, getSpecification, getState, getSubviews, getView, getViewAxis, getViewManager, getWorkspace, hasFocus, invalidateContent, invalidateLayout, keyPressed, keyReleased, keyTyped, layout, limitBoundsWithin, markDamaged, markDamaged, print, refresh, removeView, replaceView, setFocusManager, setLocation, setParent, setView, subviewFor, update, updateView
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeNodeBorder

public TreeNodeBorder(View wrappedView,
                      ViewSpecification replaceWith)
Method Detail

contentArea

protected Bounds contentArea()
Overrides:
contentArea in class AbstractBorder

debugDetails

public void debugDetails(DebugString debug)
Overrides:
debugDetails in class AbstractBorder

dragStart

public Drag dragStart(DragStart drag)
Specified by:
dragStart in interface View
Overrides:
dragStart in class AbstractBorder

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 AbstractBorder

entered

public void entered()
Description copied from interface: View
Called as the mouse crosses the bounds, and ends up inside, of this view. Is also called as the mouse returns into this view from a contained view.

Specified by:
entered in interface View
Overrides:
entered in class AbstractViewDecorator

exited

public void exited()
Description copied from interface: View
Called as the mouse crosses the bounds, and ends up outside, of this view.

Specified by:
exited in interface View
Overrides:
exited in class AbstractBorder

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 AbstractBorder
Parameters:
click - the location within the current view where the mouse click took place

getBaseline

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

getRequiredSize

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

objectActionResult

public void objectActionResult(NakedObject result,
                               Location at)
Description copied from interface: View
Called when an action generates a result, allowing this view to decide what to do with it.

Specified by:
objectActionResult in interface View
Overrides:
objectActionResult in class AbstractViewDecorator
at - the location where the action took place

secondClick

public void secondClick(Click click)
Description copied from interface: View
Called when the user double-clicked this view. This method will have been preceded by a call to click.

Specified by:
secondClick in interface View
Overrides:
secondClick in class AbstractBorder

toString

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

viewAreaType

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

viewMenuOptions

public void viewMenuOptions(UserActionSet options)
Description copied from interface: View
Called when the popup menu is being populated for this view. Any view options that need to appear on the menu should be added to the menuOptions object.

Specified by:
viewMenuOptions in interface View
Overrides:
viewMenuOptions in class AbstractViewDecorator


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