org.nakedobjects.plugins.dnd.viewer.content
Class OneToManyFieldImpl

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.content.AbstractContent
      extended by org.nakedobjects.plugins.dnd.viewer.content.AbstractCollectionContent
          extended by org.nakedobjects.plugins.dnd.viewer.content.OneToManyFieldImpl
All Implemented Interfaces:
CollectionContent, Content, FieldContent, OneToManyField

public class OneToManyFieldImpl
extends AbstractCollectionContent
implements OneToManyField


Constructor Summary
OneToManyFieldImpl(NakedObject parent, NakedObject object, OneToManyAssociation association)
           
 
Method Summary
 Consent canClear()
           
 Consent canDrop(Content sourceContent)
          Determines if the specified content can be drop on this content.
 Consent canSet(NakedObject dragSource)
           
 void clear()
           
 void contentMenuOptions(UserActionSet options)
          Allows this content to add menu options to the set of menu options the user will see for this content.
 void debugDetails(DebugString debug)
           
 NakedObject drop(Content sourceContent)
          Implements the response to the dropping of the specified content onto this content.
 NakedObject getCollection()
           
 java.lang.String getDescription()
           
 NakedObjectAssociation getField()
           
 java.lang.String getFieldName()
           
 java.lang.String getHelp()
           
 java.lang.String getIconName()
          The name of the icon to use to respresent the object represented by this content.
 Image getIconPicture(int iconHeight)
          The icon to use to respresent the object represented by this content.
 java.lang.String getId()
           
 NakedObject getNaked()
          The object represented by this content.
 OneToManyAssociation getOneToManyAssociation()
           
 NakedObject getParent()
           
 NakedObjectSpecification getSpecification()
          The specification of the object represented by this content.
 boolean isCollection()
          Returns true if this content represents a NakedCollection.
 Consent isEditable()
           
 boolean isMandatory()
           
 boolean isTransient()
          Returns true if the object represented by this content is transient; has not been persisted yet.
 void setObject(NakedObject object)
           
 java.lang.String title()
           
 java.lang.String toString()
           
 java.lang.String windowTitle()
           
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.content.AbstractCollectionContent
allElements, elements, getElementSpecification, getFieldSortOrder, getOptions, getOrderByElement, getReverseSortOrder, isOptionEnabled, parseTextEntry, setOrder, setOrderByElement, setOrderByField, viewMenuOptions
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.content.AbstractContent
isObject, isPersistable, isTextParseable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.nakedobjects.plugins.dnd.Content
getOptions, isObject, isOptionEnabled, isPersistable, isTextParseable, parseTextEntry, viewMenuOptions
 
Methods inherited from interface org.nakedobjects.plugins.dnd.CollectionContent
allElements, elements, getElementSpecification, getFieldSortOrder, getOptions, getOrderByElement, getReverseSortOrder, isOptionEnabled, parseTextEntry, setOrder, setOrderByElement, setOrderByField, viewMenuOptions
 

Constructor Detail

OneToManyFieldImpl

public OneToManyFieldImpl(NakedObject parent,
                          NakedObject object,
                          OneToManyAssociation association)
Method Detail

canClear

public Consent canClear()

canDrop

public Consent canDrop(Content sourceContent)
Description copied from interface: Content
Determines if the specified content can be drop on this content.

Specified by:
canDrop in interface Content

canSet

public Consent canSet(NakedObject dragSource)

clear

public void clear()

contentMenuOptions

public void contentMenuOptions(UserActionSet options)
Description copied from interface: Content
Allows this content to add menu options to the set of menu options the user will see for this content.

Specified by:
contentMenuOptions in interface CollectionContent
Specified by:
contentMenuOptions in interface Content
Overrides:
contentMenuOptions in class AbstractCollectionContent
See Also:
Content.viewMenuOptions(UserActionSet)

debugDetails

public void debugDetails(DebugString debug)
Specified by:
debugDetails in interface CollectionContent
Specified by:
debugDetails in interface Content
Overrides:
debugDetails in class AbstractCollectionContent

drop

public NakedObject drop(Content sourceContent)
Description copied from interface: Content
Implements the response to the dropping of the specified content onto this content.

Specified by:
drop in interface Content

getCollection

public NakedObject getCollection()
Specified by:
getCollection in interface CollectionContent
Specified by:
getCollection in class AbstractCollectionContent

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface Content
Overrides:
getDescription in class AbstractCollectionContent

getField

public NakedObjectAssociation getField()
Specified by:
getField in interface FieldContent

getFieldName

public java.lang.String getFieldName()
Specified by:
getFieldName in interface FieldContent

getHelp

public java.lang.String getHelp()
Specified by:
getHelp in interface Content

getIconName

public java.lang.String getIconName()
Description copied from interface: Content
The name of the icon to use to respresent the object represented by this content.

Specified by:
getIconName in interface Content

getIconPicture

public Image getIconPicture(int iconHeight)
Description copied from interface: Content
The icon to use to respresent the object represented by this content.

Specified by:
getIconPicture in interface CollectionContent
Specified by:
getIconPicture in interface Content
Overrides:
getIconPicture in class AbstractCollectionContent

getId

public java.lang.String getId()
Specified by:
getId in interface Content

getNaked

public NakedObject getNaked()
Description copied from interface: Content
The object represented by this content.

Specified by:
getNaked in interface Content

getOneToManyAssociation

public OneToManyAssociation getOneToManyAssociation()
Specified by:
getOneToManyAssociation in interface OneToManyField

getParent

public NakedObject getParent()
Specified by:
getParent in interface FieldContent

getSpecification

public NakedObjectSpecification getSpecification()
Description copied from interface: Content
The specification of the object represented by this content.

Specified by:
getSpecification in interface Content

isCollection

public boolean isCollection()
Description copied from interface: Content
Returns true if this content represents a NakedCollection.

Specified by:
isCollection in interface Content
Overrides:
isCollection in class AbstractContent

isEditable

public Consent isEditable()
Specified by:
isEditable in interface FieldContent

isMandatory

public boolean isMandatory()
Specified by:
isMandatory in interface FieldContent

isTransient

public boolean isTransient()
Description copied from interface: Content
Returns true if the object represented by this content is transient; has not been persisted yet.

Specified by:
isTransient in interface Content

setObject

public void setObject(NakedObject object)

title

public final java.lang.String title()
Specified by:
title in interface Content

toString

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

windowTitle

public java.lang.String windowTitle()
Specified by:
windowTitle in interface Content
Overrides:
windowTitle in class AbstractContent


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