org.nakedobjects.plugins.dnd.viewer.border
Class ObjectBorder

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.border.ObjectBorder
All Implemented Interfaces:
java.lang.Cloneable, View

public class ObjectBorder
extends AbstractBorder

A border for objects providing

  1. Ability to drag out a new view of the object.
  2. State change when moving over object.
  3. Feedback of the state of the view, eg drop valid, identified etc.


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
ObjectBorder(int size, View wrappedView)
           
ObjectBorder(View wrappedView)
           
 
Method Summary
protected  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.
 void keyPressed(KeyboardAction key)
          Called when the user presses any key on the keyboard while this view has the focus.
 java.lang.String toString()
           
 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
contentArea, dragFrom, dragIn, dragOut, drop, drop, getBaseline, getBottom, getLeft, getPadding, getRequiredSize, getRight, getSize, getTop, identify, isOnBorder, mouseDown, mouseMoved, mouseUp, overBorder, overContent, pickupContent, pickupView, secondClick, setBounds, setMaximumSize, setSize, thirdClick, viewAreaType
 
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, keyReleased, keyTyped, layout, limitBoundsWithin, markDamaged, markDamaged, objectActionResult, 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

ObjectBorder

public ObjectBorder(int size,
                    View wrappedView)

ObjectBorder

public ObjectBorder(View wrappedView)
Method Detail

debugDetails

protected 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

keyPressed

public void keyPressed(KeyboardAction key)
Description copied from interface: View
Called when the user presses any key on the keyboard while this view has the focus.

Specified by:
keyPressed in interface View
Overrides:
keyPressed in class AbstractViewDecorator
Parameters:
key - TODO

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

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

toString

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


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