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

java.lang.Object
  extended by org.nakedobjects.plugins.dnd.viewer.builder.AbstractViewBuilder
      extended by org.nakedobjects.plugins.dnd.viewer.basic.ApplicationWorkspaceBuilder
All Implemented Interfaces:
ViewBuilder

public class ApplicationWorkspaceBuilder
extends AbstractViewBuilder

WorkspaceBuilder builds a workspace view for an ObjectContent view by finding a collection of classes from a field called 'classes' and adding an icon for each element. Similarly, if there is a collection called 'objects' its elements are also added to the display.

During lay-out any icons that have an UNPLACED location (-1, -1) are given a location. Objects of type NakedClass are added to the left-hand side, while all other icons are placed on the right-hand side of the workspace view. Open windows are displayed in the centre.


Field Summary
static Location UNPLACED
           
 
Constructor Summary
ApplicationWorkspaceBuilder()
           
 
Method Summary
 void build(View view1)
           
 boolean canDisplay(NakedObject object)
           
 View createCompositeView(Content content, CompositeViewSpecification specification, ViewAxis axis)
          Creates the composite view that this builder will create child views for, ie a table, list or form
 java.lang.String getName()
           
 Size getRequiredSize(View view)
           
 void layout(View view1, Size maximumSize)
           
 
Methods inherited from class org.nakedobjects.plugins.dnd.viewer.builder.AbstractViewBuilder
createViewAxis, decorateSubview, getReference, isOpen, isReplaceable, isSubView, setReference, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNPLACED

public static final Location UNPLACED
Constructor Detail

ApplicationWorkspaceBuilder

public ApplicationWorkspaceBuilder()
Method Detail

build

public void build(View view1)
Specified by:
build in interface ViewBuilder
Specified by:
build in class AbstractViewBuilder

canDisplay

public boolean canDisplay(NakedObject object)

getRequiredSize

public Size getRequiredSize(View view)
Specified by:
getRequiredSize in interface ViewBuilder
Overrides:
getRequiredSize in class AbstractViewBuilder

getName

public java.lang.String getName()

layout

public void layout(View view1,
                   Size maximumSize)
Specified by:
layout in interface ViewBuilder
Overrides:
layout in class AbstractViewBuilder

createCompositeView

public View createCompositeView(Content content,
                                CompositeViewSpecification specification,
                                ViewAxis axis)
Description copied from interface: ViewBuilder
Creates the composite view that this builder will create child views for, ie a table, list or form



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