public class CreateRequest extends Request implements DropRequest
Constructor and Description |
---|
CreateRequest()
Creates a CreateRequest with the default type.
|
CreateRequest(java.lang.Object type)
Creates a CreateRequest with the given type.
|
Modifier and Type | Method and Description |
---|---|
protected CreationFactory |
getFactory()
Returns the CreationFactory for this request.
|
Point |
getLocation()
Returns the location of the object to be created.
|
java.lang.Object |
getNewObject()
Gets the new object from the factory and returns that object.
|
java.lang.Object |
getNewObjectType()
Returns the type of the new object.
|
Dimension |
getSize()
Returns the size of the object to be created.
|
boolean |
isSnapToEnabled()
Returns
true if snap-to is enabled |
void |
setFactory(CreationFactory factory)
Sets the factory to be used when creating the new object.
|
void |
setLocation(Point location)
Sets the location where the new object will be placed.
|
void |
setSize(Dimension size)
Sets the size of the new object.
|
void |
setSnapToEnabled(boolean value)
Used to set whether snap-to is being performed.
|
getExtendedData, getType, setExtendedData, setType
public CreateRequest()
public CreateRequest(java.lang.Object type)
type
- The type of request.protected CreationFactory getFactory()
public Point getLocation()
getLocation
in interface DropRequest
public java.lang.Object getNewObject()
public java.lang.Object getNewObjectType()
public Dimension getSize()
public boolean isSnapToEnabled()
true
if snap-to is enabledtrue
if the request is for a creation with snap-to
enabledpublic void setFactory(CreationFactory factory)
factory
- the factorypublic void setLocation(Point location)
location
- the locationpublic void setSize(Dimension size)
size
- the sizepublic void setSnapToEnabled(boolean value)
value
- true
if the request is for a creation with
snap-to enabledCopyright (c) IBM Corp. and others 2000, 2011. All Rights Reserved.