net.sf.latexdraw.glib.views.Java2D.impl
Class LStandardGridView<S extends IStandardGrid>

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<S>
All Implemented Interfaces:
IAbstractView, IViewShape, Pickable
Direct Known Subclasses:
LAxesView, LGridView

abstract class LStandardGridView<S extends IStandardGrid>
extends LShapeView<S>

Defines an abstract view of the LAbstractGrid 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.FontMetrics fontMetrics
          The current font metrics of the text
protected  java.awt.geom.Path2D pathLabels
          The path containing the labels.
 
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 LStandardGridView(S grid)
          Creates and initialises an abstract grid view
 
Method Summary
 boolean contains(IPoint p)
          Allows to know if the point pt is in (or not) the shape.
 void flush()
          Removes and flushes the used resources and temporary documents.
 boolean intersects(java.awt.geom.Rectangle2D r)
           
 void update()
          Updates the view.
protected  void updateDblePathInside()
          Updates the borders of the double boundary when position is inside.
protected  void updateDblePathMiddle()
          Updates the borders of the double boundary when position is middle.
protected  void updateDblePathOutside()
          Updates the borders of the double boundary when position is outside.
protected  void updateFonts()
          Updates the font and the fontMetrics.
protected  void updateGeneralPathInside()
          Updates the borders of the shape as inside borders.
protected  void updateGeneralPathMiddle()
          Updates the borders of the shape as middle borders.
protected  void updateGeneralPathOutside()
          Updates the borders of the shape as outside borders.
protected  void updateText(java.lang.String text, float x, float y, java.awt.Font font, java.awt.font.FontRenderContext frc)
           
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
beginRotation, contains, endRotation, getBorder, getPath, getPicker, getRotatedShape2D, getRotatedShape2D, getStroke, getStrokeThickness, paint, paintArrows, paintBorders, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines, updateBorder, updatePath, 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

fontMetrics

protected java.awt.FontMetrics fontMetrics
The current font metrics of the text


pathLabels

protected java.awt.geom.Path2D pathLabels
The path containing the labels.

Constructor Detail

LStandardGridView

protected LStandardGridView(S grid)
Creates and initialises an abstract grid view

Parameters:
grid - The abstract grid to view.
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 LShapeView<S extends IStandardGrid>

updateText

protected void updateText(java.lang.String text,
                          float x,
                          float y,
                          java.awt.Font font,
                          java.awt.font.FontRenderContext frc)

update

public void update()
Description copied from interface: IAbstractView
Updates the view.

Specified by:
update in interface IAbstractView
Overrides:
update in class LShapeView<S extends IStandardGrid>

intersects

public boolean intersects(java.awt.geom.Rectangle2D r)
Specified by:
intersects in interface IViewShape
Overrides:
intersects in class LShapeView<S extends IStandardGrid>
Parameters:
r - The rectangle used to check the intersection.
Returns:
True if the given rectangle intersects the view.

contains

public boolean contains(IPoint p)
Description copied from interface: IViewShape
Allows to know if the point pt is in (or not) the shape.

Specified by:
contains in interface IViewShape
Overrides:
contains in class LShapeView<S extends IStandardGrid>
Parameters:
p - The point.
Returns:
True if the point is in the shape.

updateFonts

protected void updateFonts()
Updates the font and the fontMetrics.


updateGeneralPathInside

protected void updateGeneralPathInside()
Description copied from class: LShapeView
Updates the borders of the shape as inside borders.

Specified by:
updateGeneralPathInside in class LShapeView<S extends IStandardGrid>

updateGeneralPathMiddle

protected void updateGeneralPathMiddle()
Description copied from class: LShapeView
Updates the borders of the shape as middle borders.

Specified by:
updateGeneralPathMiddle in class LShapeView<S extends IStandardGrid>

updateDblePathMiddle

protected void updateDblePathMiddle()
Description copied from class: LShapeView
Updates the borders of the double boundary when position is middle.

Specified by:
updateDblePathMiddle in class LShapeView<S extends IStandardGrid>

updateDblePathOutside

protected void updateDblePathOutside()
Description copied from class: LShapeView
Updates the borders of the double boundary when position is outside.

Specified by:
updateDblePathOutside in class LShapeView<S extends IStandardGrid>

updateGeneralPathOutside

protected void updateGeneralPathOutside()
Description copied from class: LShapeView
Updates the borders of the shape as outside borders.

Specified by:
updateGeneralPathOutside in class LShapeView<S extends IStandardGrid>

updateDblePathInside

protected void updateDblePathInside()
Description copied from class: LShapeView
Updates the borders of the double boundary when position is inside.

Specified by:
updateDblePathInside in class LShapeView<S extends IStandardGrid>