org.nakedobjects.viewer.classic.view
Class DisplayMechanism

java.lang.Object
  extended byorg.nakedobjects.viewer.classic.view.DisplayMechanism

public class DisplayMechanism
extends java.lang.Object


Constructor Summary
DisplayMechanism(Display display)
           
DisplayMechanism(Display display, ObjectViewer viewer)
           
 
Method Summary
 void cancel(DragDropEvent event)
           
 void copy(DragDropEvent event)
           
 java.lang.String debugDetails()
           
 void dispose()
           
 void doubleClicked(ObjectActionEvent event)
           
 void drag(DragDropEvent event)
           
 void dragEnter(DragDropEvent event)
           
 void dragExit(DragDropEvent event)
           
 void dragging(DragDropEvent event)
           
 void drop(DragDropEvent event)
           
 java.awt.Color getBackground()
          Returns the default background color.
 java.awt.Dimension getBorderSize()
           
 java.awt.Insets getInsets(java.awt.Insets insets)
           
 java.awt.Dimension getMinimumSize()
           
 ObjectViewer getViewer()
           
 void menuOptions(MenuOptionSet menuOptionSet)
           
 void move(DragDropEvent event)
           
 void paint(java.awt.Graphics g, java.awt.Insets insets)
          Renders the object by washing the background with the background color, and then getting the View, is one is registered, to draw the border and contents.
 void paintContent(java.awt.Graphics g, java.awt.Insets insets)
          Asks the viewers current view to draw the border, background and contents
 void processMouseEvent(java.awt.event.MouseEvent evt)
           
 void processMouseMotionEvent(java.awt.event.MouseEvent evt)
           
 void setupHandler()
           
 void showPopup(MenuOptionTarget target, java.awt.Point at, boolean developerMenu)
           
 java.lang.String toString()
           
 void useViewer(ObjectViewer viewer)
           
 void vacantDrop(DragDropEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplayMechanism

public DisplayMechanism(Display display)

DisplayMechanism

public DisplayMechanism(Display display,
                        ObjectViewer viewer)
Method Detail

cancel

public void cancel(DragDropEvent event)

copy

public void copy(DragDropEvent event)

debugDetails

public java.lang.String debugDetails()

dispose

public void dispose()

doubleClicked

public void doubleClicked(ObjectActionEvent event)

drag

public void drag(DragDropEvent event)

dragEnter

public void dragEnter(DragDropEvent event)

dragExit

public void dragExit(DragDropEvent event)

dragging

public void dragging(DragDropEvent event)

drop

public void drop(DragDropEvent event)

getBackground

public java.awt.Color getBackground()
Returns the default background color. Uses the value windowBackground in ViewColor.

Returns:
background color

getBorderSize

public java.awt.Dimension getBorderSize()

getInsets

public java.awt.Insets getInsets(java.awt.Insets insets)

getMinimumSize

public java.awt.Dimension getMinimumSize()

getViewer

public ObjectViewer getViewer()

menuOptions

public void menuOptions(MenuOptionSet menuOptionSet)

move

public void move(DragDropEvent event)

paint

public void paint(java.awt.Graphics g,
                  java.awt.Insets insets)
Renders the object by washing the background with the background color, and then getting the View, is one is registered, to draw the border and contents.

Parameters:
g - Graphics to paint with
insets - the insets to use when drawing

paintContent

public void paintContent(java.awt.Graphics g,
                         java.awt.Insets insets)
Asks the viewers current view to draw the border, background and contents

See Also:
View.drawBorder(Graphics, Rectangle, ObjectViewer), View.drawBackground(Graphics, Rectangle, ObjectViewer), View.drawContent(Graphics, Rectangle, ObjectViewer)

processMouseEvent

public void processMouseEvent(java.awt.event.MouseEvent evt)

processMouseMotionEvent

public void processMouseMotionEvent(java.awt.event.MouseEvent evt)

setupHandler

public void setupHandler()

showPopup

public void showPopup(MenuOptionTarget target,
                      java.awt.Point at,
                      boolean developerMenu)

toString

public java.lang.String toString()

useViewer

public void useViewer(ObjectViewer viewer)

vacantDrop

public void vacantDrop(DragDropEvent event)