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

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

 class LDotView
extends LShapeView<IDot>
implements IViewDot

Defines a view of the IDot 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/04/2008

Since:
3.0
Author:
Arnaud BLOUIN

Field Summary
 
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 LDotView(IDot model)
          Initialises the view of the dot.
 
Method Summary
 java.awt.BasicStroke getStroke()
          Creates and returns a stroke corresponding to the current parameters of the shape model.
 void paint(java.awt.Graphics2D g)
          Draws the shape within a Java2D graphics.
 void paintBorders(java.awt.Graphics2D g)
          Draws the borders of the shape within a Java2D graphics.
private  void paintDotShape(java.awt.Graphics2D g, boolean toFill, java.awt.Color fillCol)
           
protected  void setDotPath()
           
protected  void setPathAsterisk()
           
protected  void setPathBar()
           
protected  void setPathDiamond()
          Creates a diamond (one of the possibles shapes of a dot).
protected  void setPathO()
           
private  void setPathOLikeDot(double dec)
           
protected  void setPathOPlus()
           
protected  void setPathOTime()
           
protected  void setPathPentagon()
          Creates a pentagon (one of the possibles shapes of a dot)
protected  void setPathPlus()
           
protected  void setPathSquare()
           
protected  void setPathTriangle()
          Creates a triangle (one of the possibles shapes of a dot).
protected  void setPathX()
           
 void updateBorder()
          Update the border of the shape 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 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.
 void updatePath()
          Updates the path of the shape.
 
Methods inherited from class net.sf.latexdraw.glib.views.Java2D.impl.LShapeView
beginRotation, contains, contains, endRotation, flush, getBorder, getPath, getPicker, getRotatedShape2D, getRotatedShape2D, getStrokeThickness, intersects, paintArrows, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines, update, 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.Java2D.interfaces.IViewShape
contains, contains, flush, getBorder, getPath, getRotatedShape2D, intersects, paintFilling, paintShadow, paintShowPointsDots, paintShowPointsLines
 
Methods inherited from interface net.sf.latexdraw.glib.views.IAbstractView
getShape, update
 
Methods inherited from interface org.malai.picking.Pickable
getPicker
 

Constructor Detail

LDotView

protected LDotView(IDot model)
Initialises the view of the dot.

Parameters:
model - The dot model.
Since:
3.0
Method Detail

getStroke

public java.awt.BasicStroke getStroke()
Description copied from interface: IViewShape
Creates and returns a stroke corresponding to the current parameters of the shape model.

Specified by:
getStroke in interface IViewShape
Overrides:
getStroke in class LShapeView<IDot>
Returns:
The stroke based on the thickness, the double borders and so on, of the shape. Returns null if the line style is NONE.

paintBorders

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

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

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<IDot>
Parameters:
g - The graphics where the shape must be drawn.

paintDotShape

private void paintDotShape(java.awt.Graphics2D g,
                           boolean toFill,
                           java.awt.Color fillCol)

setPathOTime

protected void setPathOTime()

setPathOPlus

protected void setPathOPlus()

setPathO

protected void setPathO()

setPathOLikeDot

private void setPathOLikeDot(double dec)

setDotPath

protected void setDotPath()

setPathBar

protected void setPathBar()

setPathPlus

protected void setPathPlus()

setPathSquare

protected void setPathSquare()

setPathX

protected void setPathX()

setPathAsterisk

protected void setPathAsterisk()

setPathDiamond

protected void setPathDiamond()
Creates a diamond (one of the possibles shapes of a dot).


setPathPentagon

protected void setPathPentagon()
Creates a pentagon (one of the possibles shapes of a dot)


setPathTriangle

protected void setPathTriangle()
Creates a triangle (one of the possibles shapes of a dot).


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<IDot>

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<IDot>

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<IDot>

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<IDot>

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<IDot>

updateGeneralPathInside

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

Specified by:
updateGeneralPathInside in class LShapeView<IDot>

updateGeneralPathMiddle

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

Specified by:
updateGeneralPathMiddle in class LShapeView<IDot>

updateGeneralPathOutside

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

Specified by:
updateGeneralPathOutside in class LShapeView<IDot>