org.nakedobjects.plugins.dnd.viewer.basic
Class PopupMenu

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
      extended by org.nakedobjects.plugins.dnd.viewer.basic.PopupMenu
All Implemented Interfaces:
java.lang.Cloneable, View

public class PopupMenu
extends AbstractView


Field Summary
 
Fields inherited from interface org.nakedobjects.plugins.dnd.View
HPADDING, VPADDING
 
Constructor Summary
PopupMenu(PopupMenuContainer parent)
           
 
Method Summary
protected  Color backgroundColor()
           
 Consent canChangeValue()
          Determines if the user is able to change the held value.
 boolean canFocus()
          Determines whether this view accepts keyboard focus.
protected  Color disabledColor()
           
 void draw(Canvas canvas)
          Draws the popup menu
 void firstClick(Click click)
          Called when the user clicks the mouse buttone within this view.
 void focusLost()
           
 void focusReceived()
           
 FocusManager getFocusManager()
           
 Size getMaximumSize()
           
 int getOption()
           
 int getOptionCount()
           
 int getOptionPostion()
           
 Padding getPadding()
           
 Workspace getWorkspace()
           
 boolean hasFocus()
           
 void keyPressed(KeyboardAction key)
          Called when the user presses any key on the keyboard while this view has the focus.
 void keyReleased(int keyCode, int modifiers)
          Called when the user releases any key on the keyboard while this view has the focus.
 void keyTyped(char keyCode)
          Called when the user presses a non-control key (i.e.
 View makeView(NakedObject object, NakedObjectAssociation field)
           
 void markDamaged()
           
 void mouseMoved(Location at)
          Called as the mouse is moved around within this view.
protected  Color normalColor()
           
protected  Color reversedColor()
           
 void setOption(int option)
           
protected  Text style()
           
 java.lang.String toString()
           
protected  boolean transparentBackground()
           
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.view.simple.AbstractView
addView, assignId, contains, containsFocus, contentMenuOptions, debug, debugStructure, dispose, drag, drag, dragCancel, dragFrom, dragIn, dragOut, dragStart, dragTo, drop, drop, editComplete, entered, exited, getAbsoluteLocation, getBaseline, getBounds, getContent, getFeedbackManager, getId, getLocation, getParent, getRequiredSize, getSize, getSpecification, getState, getSubviews, getView, getViewAxis, getViewManager, identify, invalidateContent, invalidateLayout, layout, limitBoundsWithin, limitBoundsWithin, markDamaged, mouseDown, mouseUp, objectActionResult, pickupContent, pickupView, print, refresh, removeView, replaceOptions, replaceView, secondClick, setBounds, setContent, setFocusManager, setLocation, setMaximumSize, setParent, setSize, setSpecification, setView, setViewAxis, subviewFor, thirdClick, update, updateView, viewAreaType, viewMenuOptions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PopupMenu

public PopupMenu(PopupMenuContainer parent)
Method Detail

backgroundColor

protected Color backgroundColor()

canChangeValue

public Consent canChangeValue()
Description copied from interface: View
Determines if the user is able to change the held value.

Specified by:
canChangeValue in interface View
Overrides:
canChangeValue in class AbstractView

canFocus

public boolean canFocus()
Description copied from interface: View
Determines whether this view accepts keyboard focus. If so focusLost and focusReceived will be called.

Specified by:
canFocus in interface View
Overrides:
canFocus in class AbstractView

disabledColor

protected Color disabledColor()

draw

public void draw(Canvas canvas)
Draws the popup menu

Specified by:
draw in interface View
Overrides:
draw in class AbstractView
See Also:
Component.paint(java.awt.Graphics)

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

focusLost

public void focusLost()
Specified by:
focusLost in interface View
Overrides:
focusLost in class AbstractView

focusReceived

public void focusReceived()
Specified by:
focusReceived in interface View
Overrides:
focusReceived in class AbstractView

getFocusManager

public FocusManager getFocusManager()
Specified by:
getFocusManager in interface View
Overrides:
getFocusManager in class AbstractView

getMaximumSize

public Size getMaximumSize()
Specified by:
getMaximumSize in interface View
Overrides:
getMaximumSize in class AbstractView

getOption

public int getOption()

getOptionPostion

public int getOptionPostion()

getOptionCount

public int getOptionCount()

getPadding

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

getWorkspace

public Workspace getWorkspace()
Specified by:
getWorkspace in interface View
Overrides:
getWorkspace in class AbstractView

hasFocus

public boolean hasFocus()
Specified by:
hasFocus in interface View
Overrides:
hasFocus in class AbstractView

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 AbstractView
Parameters:
key - TODO

keyReleased

public void keyReleased(int keyCode,
                        int modifiers)
Description copied from interface: View
Called when the user releases any key on the keyboard while this view has the focus.

Specified by:
keyReleased in interface View
Overrides:
keyReleased in class AbstractView

keyTyped

public void keyTyped(char keyCode)
Description copied from interface: View
Called when the user presses a non-control key (i.e. data entry keys and not shift, up-arrow etc). Such a key press will result in a prior call to keyPressed and a subsequent call to keyReleased.

Specified by:
keyTyped in interface View
Overrides:
keyTyped in class AbstractView

makeView

public View makeView(NakedObject object,
                     NakedObjectAssociation field)
              throws java.lang.CloneNotSupportedException
Throws:
java.lang.CloneNotSupportedException

markDamaged

public void markDamaged()
Specified by:
markDamaged in interface View
Overrides:
markDamaged in class AbstractView

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 AbstractView
Parameters:
at - the position relative to the top-left of this view

normalColor

protected Color normalColor()

reversedColor

protected Color reversedColor()

setOption

public void setOption(int option)

style

protected Text style()

toString

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

transparentBackground

protected boolean transparentBackground()


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