org.nakedobjects.viewer.lightweight.view
Class SimpleBorder

java.lang.Object
  extended byorg.nakedobjects.viewer.lightweight.view.SimpleBorder
All Implemented Interfaces:
Border
Direct Known Subclasses:
IconBorder, OpenFieldBorder, RootBorder

public abstract class SimpleBorder
extends java.lang.Object
implements Border


Constructor Summary
SimpleBorder(int borderWidth)
           
 
Method Summary
protected  void addControl(Control control)
           
 java.lang.String debug(View view)
          Determines the mininum widths of top and bottom borders, and heights of the left and right borders.
 void draw(View view, Canvas canvas)
           
 void firstClick(View view, Click click)
          Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.
protected  Color getInBackground()
           
protected  Color getObjectIdentified()
           
 Padding getPadding(View view)
          Determines the size of border in terms of it left and right widths, and top and bottom heights.
protected  Color getRootViewIdentified()
           
protected  Color getViewIdentified()
           
 void secondClick(View view, Click click)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.viewer.lightweight.Border
viewMenuOptions
 

Constructor Detail

SimpleBorder

public SimpleBorder(int borderWidth)
Method Detail

getPadding

public Padding getPadding(View view)
Description copied from interface: Border
Determines the size of border in terms of it left and right widths, and top and bottom heights.

Specified by:
getPadding in interface Border
Parameters:
view - the view this border is being placed around

debug

public java.lang.String debug(View view)
Description copied from interface: Border
Determines the mininum widths of top and bottom borders, and heights of the left and right borders.

Specified by:
debug in interface Border
Parameters:
view - the view this border is being placed around

draw

public void draw(View view,
                 Canvas canvas)
Specified by:
draw in interface Border

getInBackground

protected Color getInBackground()

getObjectIdentified

protected Color getObjectIdentified()

getViewIdentified

protected Color getViewIdentified()

getRootViewIdentified

protected Color getRootViewIdentified()

firstClick

public void firstClick(View view,
                       Click click)
Description copied from interface: Border
Determines if the user is invoking an action relating to this view, rather than to whatever this view represents.

Specified by:
firstClick in interface Border
Returns:
true if the user is targeting the view itself, false if the user is targeting what is being represented

secondClick

public void secondClick(View view,
                        Click click)
Specified by:
secondClick in interface Border

toString

public java.lang.String toString()

addControl

protected void addControl(Control control)