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

java.lang.Object
  extended by net.sf.latexdraw.glib.views.AbstractView<S>
      extended by net.sf.latexdraw.glib.views.Java2D.impl.LShapeView<S>
          extended by net.sf.latexdraw.glib.views.Java2D.impl.LStandardGridView<IGrid>
              extended by net.sf.latexdraw.glib.views.Java2D.impl.LGridView
All Implemented Interfaces:
IAbstractView, IViewShape, Pickable

 class LGridView
extends LStandardGridView<IGrid>

Defines a view of the IGrid model.

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.

04/12/2008

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
protected  java.awt.geom.Path2D pathSubGrid
          The Java2D path used to draw the sub-grid.
 
Fields inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LStandardGridView
fontMetrics, pathLabels
 
Fields inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
arrows, border, path
 
Fields inherited from class net.sf.latexdraw.glib.views.AbstractView
shape
 
Constructor Summary
protected LGridView(IGrid grid)
          Initialises the grid view.
 
Method Summary
 void flush()
          Removes and flushes the used resources and temporary documents.
protected  java.awt.geom.Rectangle2D getGridBounds(double posX, double posY)
           
 void paint(java.awt.Graphics2D g)
          Draws the shape within a Java2D graphics.
 void updateBorder()
          Update the border of the shape view.
 void updatePath()
          Updates the path of the shape.
protected  void updatePathLabels(double minX, double maxX, double minY, double maxY, double posX, double posY, double xStep, double yStep, double tlx, double tly, double absStep)
           
protected  void updatePathMainGrid(double unit, double minX, double maxX, double minY, double maxY, double posX, double posY, double xStep, double yStep, double tlx, double tly, double brx, double bry, double absStep)
           
private  void updatePathMainGridDots(double unit, double minX, double maxX, double minY, double maxY, double posX, double posY, double xStep, double yStep, double tlx, double tly, double brx, double bry, double absStep)
           
protected  void updatePathSubGrid(double unit, double minX, double maxX, double minY, double maxY, double posX, double posY, double xStep, double yStep, double tlx, double tly, double brx, double bry)
           
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LStandardGridView
contains, intersects, update, updateDblePathInside, updateDblePathMiddle, updateDblePathOutside, updateFonts, updateGeneralPathInside, updateGeneralPathMiddle, updateGeneralPathOutside, updateText
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
beginRotation, contains, endRotation, getBorder, getPath, getPicker, getRotatedShape2D, getRotatedShape2D, getStroke, getStrokeThickness, paintArrows, paintBorders, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines, updatePathArrows
 
Methods inherited from class net.sf.latexdraw.glib.views.AbstractView
getShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.latexdraw.glib.views.IAbstractView
getShape
 

Field Detail

pathSubGrid

protected java.awt.geom.Path2D pathSubGrid
The Java2D path used to draw the sub-grid.

Constructor Detail

LGridView

protected LGridView(IGrid grid)
Initialises the grid view.

Parameters:
grid - The model of the grid.
Since:
3.0
Method Detail

flush

public void flush()
Description copied from interface: IViewShape
Removes and flushes the used resources and temporary documents.

Specified by:
flush in interface IViewShape
Overrides:
flush in class LStandardGridView<IGrid>

paint

public void paint(java.awt.Graphics2D g)
Description copied from interface: IViewShape
Draws the shape within a Java2D graphics.

Specified by:
paint in interface IViewShape
Overrides:
paint in class LShapeView<IGrid>
Parameters:
g - The graphics where the shape must be drawn.

updateBorder

public void updateBorder()
Description copied from interface: IViewShape
Update the border of the shape view.

Specified by:
updateBorder in interface IViewShape
Overrides:
updateBorder in class LShapeView<IGrid>

updatePathMainGridDots

private void updatePathMainGridDots(double unit,
                                    double minX,
                                    double maxX,
                                    double minY,
                                    double maxY,
                                    double posX,
                                    double posY,
                                    double xStep,
                                    double yStep,
                                    double tlx,
                                    double tly,
                                    double brx,
                                    double bry,
                                    double absStep)

updatePathMainGrid

protected void updatePathMainGrid(double unit,
                                  double minX,
                                  double maxX,
                                  double minY,
                                  double maxY,
                                  double posX,
                                  double posY,
                                  double xStep,
                                  double yStep,
                                  double tlx,
                                  double tly,
                                  double brx,
                                  double bry,
                                  double absStep)

updatePathSubGrid

protected void updatePathSubGrid(double unit,
                                 double minX,
                                 double maxX,
                                 double minY,
                                 double maxY,
                                 double posX,
                                 double posY,
                                 double xStep,
                                 double yStep,
                                 double tlx,
                                 double tly,
                                 double brx,
                                 double bry)

updatePathLabels

protected void updatePathLabels(double minX,
                                double maxX,
                                double minY,
                                double maxY,
                                double posX,
                                double posY,
                                double xStep,
                                double yStep,
                                double tlx,
                                double tly,
                                double absStep)

updatePath

public void updatePath()
Description copied from interface: IViewShape
Updates the path of the shape.

Specified by:
updatePath in interface IViewShape
Overrides:
updatePath in class LShapeView<IGrid>

getGridBounds

protected java.awt.geom.Rectangle2D getGridBounds(double posX,
                                                  double posY)