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

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.border.AbstractViewDecorator
      extended by org.nakedobjects.plugins.dnd.viewer.border.AbstractBorder
All Implemented Interfaces:
java.lang.Cloneable, View
Direct Known Subclasses:
AbstractWindowBorder, BackgroundBorder, ButtonBorder, CalendarBorder, DebugBorder, DisposedObjectBorder, DragViewBorder, EmptyBorder, ExpandableViewBorder, IconBorder, InternalCollectionBorder, LabelBorder, LineBorder, ObjectBorder, OpenDropDownBorder, ResizeBorder, SelectedBorder, ServiceBorder, TableRowBorder, TextFieldBorder, TreeNodeBorder

public class AbstractBorder
extends AbstractViewDecorator


Field Summary
protected  int bottom
           
protected  int left
           
protected  int right
           
protected  int 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
protected AbstractBorder(View view)
           
 
Method Summary
protected  Bounds contentArea()
           
protected  void debugDetails(DebugString debug)
           
 View dragFrom(Location location)
           
 void dragIn(ContentDrag drag)
          Called as the content being dragged is dragged into this view.
 void dragOut(ContentDrag drag)
          Called as the content being dragged is dragged out of this view.
 Drag dragStart(DragStart drag)
           
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 void drop(ContentDrag drag)
          Called as another view's contents (the source) is dropped on this view's contents (the target).
 void drop(ViewDrag drag)
          Called as another view (the source) is dropped on this view (the target).
 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()
           
protected  int getBottom()
           
protected  int getLeft()
           
 Padding getPadding()
           
 Size getRequiredSize(Size maximumSize)
           
protected  int getRight()
           
 Size getSize()
          Determines the size of this view.
protected  int getTop()
           
 View identify(Location location)
           
protected  boolean isOnBorder()
           
 void mouseDown(Click click)
          Called as the mouse button is pressed down within this view.
 void mouseMoved(Location at)
          Called as the mouse is moved around within this view.
 void mouseUp(Click click)
          Called as the mouse button is released within this view (assuming that it was pressed in this view).
protected  boolean overBorder(Location location)
           
protected  boolean overContent(Location location)
           
 View pickupContent(Location location)
          Called as the drag of this view's content starts.
 View pickupView(Location location)
          Called as the drag of this view starts.
 void secondClick(Click click)
          Called when the user double-clicked this view.
 void setBounds(Bounds bounds)
           
 void setMaximumSize(Size size)
           
 void setSize(Size size)
           
 void thirdClick(Click click)
          Called when the user triple-clicks the mouse buttone within this view.
 ViewAreaType viewAreaType(Location mouseLocation)
          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.border.AbstractViewDecorator
addView, canChangeValue, canFocus, contains, containsFocus, contentMenuOptions, debug, debugStructure, dispose, drag, drag, dragCancel, dragTo, editComplete, entered, 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, objectActionResult, print, refresh, removeView, replaceView, setFocusManager, setLocation, setParent, setView, subviewFor, toString, update, updateView, viewMenuOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bottom

protected int bottom

left

protected int left

right

protected int right

top

protected int top
Constructor Detail

AbstractBorder

protected AbstractBorder(View view)
Method Detail

contentArea

protected Bounds contentArea()

dragFrom

public View dragFrom(Location location)
Specified by:
dragFrom in interface View
Overrides:
dragFrom in class AbstractViewDecorator

dragIn

public void dragIn(ContentDrag drag)
Description copied from interface: View
Called as the content being dragged is dragged into this view. This only occurs when view contents are being dragged, and not when views themselves are being dragged.

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

dragOut

public void dragOut(ContentDrag drag)
Description copied from interface: View
Called as the content being dragged is dragged out of this view. This only occurs when view contents are being dragged, and not when views themselves are being dragged.

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

dragStart

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

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 AbstractViewDecorator

drop

public void drop(ContentDrag drag)
Description copied from interface: View
Called as another view's contents (the source) is dropped on this view's contents (the target). The source view can be obtained from the ViewDrag object.

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

drop

public void drop(ViewDrag drag)
Description copied from interface: View
Called as another view (the source) is dropped on this view (the target). The source view can be obtained from the ViewDrag object.

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

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 AbstractViewDecorator
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 AbstractViewDecorator

getBottom

protected int getBottom()

getLeft

protected int getLeft()

getPadding

public Padding getPadding()
Specified by:
getPadding in interface View
Overrides:
getPadding in class AbstractViewDecorator

getRequiredSize

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

getRight

protected int getRight()

getSize

public Size getSize()
Description copied from interface: View
Determines the size of this view.

Specified by:
getSize in interface View
Overrides:
getSize in class AbstractViewDecorator
See Also:
View.getBounds()

getTop

protected int getTop()

debugDetails

protected void debugDetails(DebugString debug)
Overrides:
debugDetails in class AbstractViewDecorator

overBorder

protected boolean overBorder(Location location)

overContent

protected boolean overContent(Location location)

isOnBorder

protected boolean isOnBorder()

identify

public View identify(Location location)
Specified by:
identify in interface View
Overrides:
identify in class AbstractViewDecorator

mouseDown

public void mouseDown(Click click)
Description copied from interface: View
Called as the mouse button is pressed down within this view. Does nothing; should be overriden when needed. the position relative to the top-left of this view

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

mouseMoved

public void mouseMoved(Location at)
Description copied from interface: View
Called as the mouse is moved around within this view. Does nothing; should be overriden when needed.

Specified by:
mouseMoved in interface View
Overrides:
mouseMoved in class AbstractViewDecorator
Parameters:
at - the position relative to the top-left of this view

mouseUp

public void mouseUp(Click click)
Description copied from interface: View
Called as the mouse button is released within this view (assuming that it was pressed in this view). Does nothing; should be overriden when needed.

Specified by:
mouseUp in interface View
Overrides:
mouseUp 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 AbstractViewDecorator

pickupContent

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

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

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 AbstractViewDecorator

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 AbstractViewDecorator

setMaximumSize

public void setMaximumSize(Size size)
Specified by:
setMaximumSize in interface View
Overrides:
setMaximumSize in class AbstractViewDecorator

setSize

public void setSize(Size size)
Specified by:
setSize in interface View
Overrides:
setSize in class AbstractViewDecorator

setBounds

public void setBounds(Bounds bounds)
Specified by:
setBounds in interface View
Overrides:
setBounds in class AbstractViewDecorator

thirdClick

public void thirdClick(Click click)
Description copied from interface: View
Called when the user triple-clicks the mouse buttone within this view. This method will have been preceded by a call to doubleClick.

Specified by:
thirdClick in interface View
Overrides:
thirdClick 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 AbstractViewDecorator
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.