net.refractions.udig.project.ui.commands
Class DrawCommandFactory

java.lang.Object
  extended by net.refractions.udig.project.ui.commands.DrawCommandFactory

public class DrawCommandFactory
extends java.lang.Object

Creates draw commands.

Since:
0.3
Author:
jeichar

Method Summary
 IDrawCommand createCompositeDrawCommand(IDrawCommand[] commandsArray)
          Creates a new CompositeDrawCommand
 IDrawCommand createCompositeDrawCommand(java.util.List<? extends IDrawCommand> commandsList)
          Creates a new CompositeDrawCommand
 DrawFeatureCommand createDrawFeatureCommand(SimpleFeature feature)
          Creates a new DrawFeatureCommand
 DrawFeatureCommand createDrawFeatureCommand(SimpleFeature feature, ILayer layer)
          Creates a new DrawFeatureCommand
 DrawShapeCommand createDrawShapeCommand(java.awt.Shape shape)
          Creates a new DrawShapeCommand
 DrawShapeCommand createDrawShapeCommand(java.awt.Shape shape, java.awt.Color paint)
          Creates a new DrawShapeCommand
 DrawShapeCommand createDrawShapeCommand(java.awt.Shape shape, java.awt.Color paint, int lineStyle, int lineWidth)
          Creates a new DrawShapeCommand
 IDrawCommand createEditFeaturesCommand(IViewportModel model)
          Creates a new DrawEditFeatureCommand
 UndoableMapCommand createStartAnimationCommand(IMapDisplay display, java.util.List<IAnimation> animations)
          Creates a new StartAnimationCommand
 UndoableMapCommand createStopAnimationCommand(IMapDisplay display, java.util.List<IAnimation> animations)
          Creates a new StartAnimationCommand
 TranslateCommand createTranslateCommand(int x, int y)
          Creates a new TranslateCommand
 TranslateCommand createTranslateCommand(java.awt.Point offset)
          Creates a new TranslateCommand
 ZoomDrawCommand createZoomDrawCommand(int centerx, int centery, double amount)
          Creates a new TranslateCommand
static DrawCommandFactory getInstance()
          Creates a new DrawCommandFactory object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static DrawCommandFactory getInstance()
Creates a new DrawCommandFactory object

Returns:
a new DrawCommandFactory object

createDrawShapeCommand

public DrawShapeCommand createDrawShapeCommand(java.awt.Shape shape,
                                               java.awt.Color paint,
                                               int lineStyle,
                                               int lineWidth)
Creates a new DrawShapeCommand

Parameters:
shape - The shape to draw
paint - the shape outline color
lineStyle - see ViewportGraphics for line styles
lineWidth - The width of the shape outline
Returns:
a new DrawShapeCommand object
See Also:
DrawShapeCommand

createDrawShapeCommand

public DrawShapeCommand createDrawShapeCommand(java.awt.Shape shape,
                                               java.awt.Color paint)
Creates a new DrawShapeCommand

Parameters:
shape -
paint -
Returns:
a new DrawShapeCommand object
See Also:
DrawShapeCommand

createDrawShapeCommand

public DrawShapeCommand createDrawShapeCommand(java.awt.Shape shape)
Creates a new DrawShapeCommand

Parameters:
shape -
Returns:
a new DrawShapeCommand object

createEditFeaturesCommand

public IDrawCommand createEditFeaturesCommand(IViewportModel model)
Creates a new DrawEditFeatureCommand

Parameters:
model - The viewport model associated with the viewport that will be rendered to.
Returns:
a new DrawFeatureCommand object
See Also:
DrawEditFeatureCommand

createTranslateCommand

public TranslateCommand createTranslateCommand(java.awt.Point offset)
Creates a new TranslateCommand

Parameters:
offset - The amount of translation
Returns:
a new TranslateCommand object
See Also:
TranslateCommand

createTranslateCommand

public TranslateCommand createTranslateCommand(int x,
                                               int y)
Creates a new TranslateCommand

Parameters:
x - the amount of y translation
y - the amount of y translation
Returns:
a new TranslateCommand
See Also:
TranslateCommand

createZoomDrawCommand

public ZoomDrawCommand createZoomDrawCommand(int centerx,
                                             int centery,
                                             double amount)
Creates a new TranslateCommand

Parameters:
x - the amount of y translation
y - the amount of y translation
Returns:
a new ZoomDrawCommand
See Also:
ZoomDrawCommand

createDrawFeatureCommand

public DrawFeatureCommand createDrawFeatureCommand(SimpleFeature feature,
                                                   ILayer layer)
Creates a new DrawFeatureCommand

Parameters:
feature - the feature to draw
layer - the layer that the feature is part of.
model - the ViewportModel that is used to calculate size and position.
Returns:
a new DrawFeatureCommand
See Also:
DrawFeatureCommand

createDrawFeatureCommand

public DrawFeatureCommand createDrawFeatureCommand(SimpleFeature feature)
Creates a new DrawFeatureCommand

Parameters:
feature - the feature to draw
evaluationObject - the layer that the feature is part of.
model - the ViewportModel that is used to calculate size and position.
Returns:
a new DrawFeatureCommand
See Also:
DrawFeatureCommand

createStartAnimationCommand

public UndoableMapCommand createStartAnimationCommand(IMapDisplay display,
                                                      java.util.List<IAnimation> animations)
Creates a new StartAnimationCommand

Returns:
a new StartAnimationCommand
See Also:
StartAnimationCommand

createStopAnimationCommand

public UndoableMapCommand createStopAnimationCommand(IMapDisplay display,
                                                     java.util.List<IAnimation> animations)
Creates a new StartAnimationCommand

Returns:
a new StartAnimationCommand
See Also:
StartAnimationCommand

createCompositeDrawCommand

public IDrawCommand createCompositeDrawCommand(IDrawCommand[] commandsArray)
Creates a new CompositeDrawCommand

Parameters:
commandsArray -
Returns:

createCompositeDrawCommand

public IDrawCommand createCompositeDrawCommand(java.util.List<? extends IDrawCommand> commandsList)
Creates a new CompositeDrawCommand

Parameters:
commandsList -
Returns: