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

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

public class ButtonBorder
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
ButtonBorder(ButtonAction[] actions, View view)
           
 
Method Summary
 void draw(Canvas canvas)
          Called by the frame, or the parent view, when this view must redraw itself.
 void firstClick(Click click)
          Called when the user clicks the mouse buttone within this view.
 AbstractControlView[] getButtons()
           
 Size getRequiredSize(Size maximumSize)
           
 View identify(Location location)
           
 void keyPressed(KeyboardAction key)
          Called when the user presses any key on the keyboard while this view has the focus.
 void layout(int width)
           
 void mouseDown(Click click)
          Called as the mouse button is pressed down 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).
 void secondClick(Click click)
          Called when the user double-clicked this view.
 void setBounds(Bounds bounds)
           
 void setSize(Size size)
           
 void thirdClick(Click click)
          Called when the user triple-clicks the mouse buttone within this view.
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.border.AbstractBorder
contentArea, debugDetails, dragFrom, dragIn, dragOut, dragStart, drop, drop, exited, getBaseline, getBottom, getLeft, getPadding, getRight, getSize, getTop, isOnBorder, mouseMoved, overBorder, overContent, pickupContent, pickupView, setMaximumSize, 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, entered, 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, toString, update, updateView, viewMenuOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ButtonBorder

public ButtonBorder(ButtonAction[] actions,
                    View view)
Method Detail

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

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

getButtons

public AbstractControlView[] getButtons()

getRequiredSize

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

identify

public View identify(Location location)
Specified by:
identify in interface View
Overrides:
identify 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

layout

public void layout(int width)

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 AbstractBorder

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 AbstractBorder

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

setBounds

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

setSize

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

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 AbstractBorder


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