net.sf.latexdraw.glib.views.Java2D.impl
Class LViewsFactory

java.lang.Object
  extended by net.sf.latexdraw.glib.views.Java2D.impl.LViewsFactory
All Implemented Interfaces:
IViewsFactory

public class LViewsFactory
extends java.lang.Object
implements IViewsFactory

The factory that creates views from given models.

This file is part of LaTeXDraw
Copyright (c) 2005-2012 Arnaud BLOUIN

LaTeXDraw is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

LaTeXDraw is distributed without any warranty; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

03/10/08

Since:
3.0
Version:
3.0
Author:
Arnaud BLOUIN

Nested Class Summary
private  class LViewsFactory.CreateView2DCmd
          This class is a mix of the design patterns Command and Chain of responsibility.
 
Field Summary
private  LViewsFactory.CreateView2DCmd createCmd
          The chain of responsibility used to reduce the complexity of the factory.
 
Constructor Summary
LViewsFactory()
          Creates the factory.
 
Method Summary
 IViewShape createView(IShape shape)
          Creates a view from a shape.
private  void initCommands()
          Initialises the chain of responsibility.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

createCmd

private LViewsFactory.CreateView2DCmd createCmd
The chain of responsibility used to reduce the complexity of the factory.

Constructor Detail

LViewsFactory

public LViewsFactory()
Creates the factory.

Method Detail

createView

public IViewShape createView(IShape shape)
Description copied from interface: IViewsFactory
Creates a view from a shape.

Specified by:
createView in interface IViewsFactory
Parameters:
shape - The shape used to create the view.
Returns:
The created view or null.

initCommands

private void initCommands()
Initialises the chain of responsibility.