jsynoptic.base
Class GridShapesTemplate

java.lang.Object
  extended by jsynoptic.base.Template
      extended by jsynoptic.base.GridShapesTemplate
Direct Known Subclasses:
AsyncTemplate, PlotTemplate

public abstract class GridShapesTemplate
extends Template

An abstract template dedicated to create grid of shapes

Author:
zxpletran007

Nested Class Summary
protected  class GridShapesTemplate.GridShapesTemplatePanel
           
 
Nested classes/interfaces inherited from class jsynoptic.base.Template
Template.EmptySheetTemplate, Template.TemplatePanel
 
Field Summary
protected static int BORDER_X_MARGIN
           
protected static int BORDER_Y_MARGIN
           
protected  int colMargin
           
protected static int DEFAULT_COLUMN_MARGIN
           
protected static int DEFAULT_COLUMN_NUMBER
           
protected static int DEFAULT_ROW_MARGIN
           
protected static int DEFAULT_ROW_NUMBER
           
protected  GridShapesTemplate.GridShapesTemplatePanel gridShapePanel
           
protected  int nbColumns
           
protected  int nbRows
           
static MenuResourceBundle resources
           
protected  int rowMargin
           
 
Fields inherited from class jsynoptic.base.Template
currentTemplate, defaultTemplate, templates
 
Constructor Summary
GridShapesTemplate()
           
 
Method Summary
protected abstract  AbstractShape createShape(int ox, int oy, int width, int height)
          Shall be overwriten in subclasses Create and set a shape to be added into the grid
 void setShapeContainer(ShapesContainer sc)
          Set the shape container.
 
Methods inherited from class jsynoptic.base.Template
createShapeContainer, getCurrentTemplate, getIcon, getName, getOptionPanelForTemplate, getTemplateFromId, getTemplateInformation, getTemplates, setCurrentTemplate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

resources

public static MenuResourceBundle resources

DEFAULT_COLUMN_NUMBER

protected static final int DEFAULT_COLUMN_NUMBER
See Also:
Constant Field Values

DEFAULT_ROW_NUMBER

protected static final int DEFAULT_ROW_NUMBER
See Also:
Constant Field Values

DEFAULT_COLUMN_MARGIN

protected static final int DEFAULT_COLUMN_MARGIN
See Also:
Constant Field Values

DEFAULT_ROW_MARGIN

protected static final int DEFAULT_ROW_MARGIN
See Also:
Constant Field Values

BORDER_X_MARGIN

protected static final int BORDER_X_MARGIN
See Also:
Constant Field Values

BORDER_Y_MARGIN

protected static final int BORDER_Y_MARGIN
See Also:
Constant Field Values

nbRows

protected int nbRows

nbColumns

protected int nbColumns

rowMargin

protected int rowMargin

colMargin

protected int colMargin

gridShapePanel

protected GridShapesTemplate.GridShapesTemplatePanel gridShapePanel
Constructor Detail

GridShapesTemplate

public GridShapesTemplate()
Method Detail

setShapeContainer

public void setShapeContainer(ShapesContainer sc)
Description copied from class: Template
Set the shape container. Shall be overloaded

Overrides:
setShapeContainer in class Template

createShape

protected abstract AbstractShape createShape(int ox,
                                             int oy,
                                             int width,
                                             int height)
Shall be overwriten in subclasses Create and set a shape to be added into the grid

Parameters:
ox -
oy -
width -
height -
Returns:
a new shape to be added into the grid