Eclipse GEF
2.1

org.eclipse.gef.requests
Class CreateRequest

java.lang.Object
  |
  +--org.eclipse.gef.Request
        |
        +--org.eclipse.gef.requests.CreateRequest
All Implemented Interfaces:
DropRequest
Direct Known Subclasses:
CreateConnectionRequest

public class CreateRequest
extends Request
implements DropRequest

A Request to create a new object.


Constructor Summary
CreateRequest()
          Creates a CreateRequest with the default type.
CreateRequest(Object type)
          Creates a CreateRequest with the given type.
 
Method Summary
protected  CreationFactory getFactory()
           
 org.eclipse.draw2d.geometry.Point getLocation()
          Returns the location of the object to be created.
 Object getNewObject()
           
 Object getNewObjectType()
           
 org.eclipse.draw2d.geometry.Dimension getSize()
          Returns the size of the object to be created.
 void setFactory(CreationFactory factory)
          Sets the factory to be used when creating the new object.
 void setLocation(org.eclipse.draw2d.geometry.Point location)
          Sets the location where the new object will be placed.
 void setSize(org.eclipse.draw2d.geometry.Dimension size)
          Sets the size of the new object.
 
Methods inherited from class org.eclipse.gef.Request
getType, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateRequest

public CreateRequest()
Creates a CreateRequest with the default type.


CreateRequest

public CreateRequest(Object type)
Creates a CreateRequest with the given type.

Parameters:
type - The type of request.
Method Detail

getFactory

protected CreationFactory getFactory()

getLocation

public org.eclipse.draw2d.geometry.Point getLocation()
Returns the location of the object to be created.

Specified by:
getLocation in interface DropRequest

getNewObject

public Object getNewObject()

getNewObjectType

public Object getNewObjectType()

getSize

public org.eclipse.draw2d.geometry.Dimension getSize()
Returns the size of the object to be created.


setFactory

public void setFactory(CreationFactory factory)
Sets the factory to be used when creating the new object.


setLocation

public void setLocation(org.eclipse.draw2d.geometry.Point location)
Sets the location where the new object will be placed.

Parameters:
location - The location.

setSize

public void setSize(org.eclipse.draw2d.geometry.Dimension size)
Sets the size of the new object.

Parameters:
size - The size.

Eclipse GEF
2.1

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.