import(utils)
import(grDevices)
import(lattice)
import(grid)
importMethodsFrom(sp, coordinates, "[", coerce, over, bbox)
importFrom(sp, sp.points, sp.polygons, sp.lines, sp.grid, sppanel, SpatialGrid, GridTopology, SpatialPolygons, Polygons, Polygon)
importClassesFrom(sp, Spatial, SpatialGrid, SpatialGridDataFrame, SpatialLines, SpatialLinesDataFrame, SpatialPoints, SpatialPointsDataFrame, SpatialPolygons, SpatialPolygonsDataFrame)
importFrom(graphics, plot)
importFrom(stats, biplot, screeplot)
importFrom(ade4, covfacwt, covwt, meanfacwt, varfacwt, varwt, scatter, score, kplot, dudi.pca, inertia.dudi)
importFrom(KernSmooth, bkde2D, bkde)
importFrom(methods, show)
importFrom(RColorBrewer, brewer.pal)

S3method("biplot", "dudi")
S3method("kplot", "foucart")
S3method("kplot", "mbpcaiv")
S3method("kplot", "mcoa")
S3method("kplot", "mfa")
S3method("kplot", "pta")
S3method("kplot", "sepan")
S3method("kplot", "statis")  
S3method("plot", "acm")
S3method("plot", "betcoi")
S3method("plot", "betdpcoa")
S3method("plot", "betwitdpcoa")
S3method("plot", "betrlq")
S3method("plot", "between")
S3method("plot", "coinertia")
S3method("plot", "discrimin")
S3method("plot", "dpcoa")
S3method("plot", "fca")
S3method("plot", "foucart")
S3method("plot", "krandboot")
S3method("plot", "krandxval")
S3method("plot", "mcoa")
S3method("plot", "mfa")
S3method("plot", "multiblock")
S3method("plot", "multispati")
S3method("plot", "niche") 
S3method("plot", "pcaiv")
S3method("plot", "procuste")
S3method("plot", "randboot")
S3method("plot", "randxval")
S3method("plot", "rlq")
S3method("plot", "pta")
S3method("plot", "sepan")
S3method("plot", "statis")
S3method("plot", "witcoi")
S3method("plot", "witdpcoa")
S3method("plot", "within")
S3method("plot", "witrlq")
S3method("scatter", "coa")
S3method("scatter", "dudi")
S3method("scatter", "nipals")
S3method("scatter", "pco")
S3method("score", "acm")
S3method("score", "mix")
S3method("score", "pca")
S3method("screeplot", "dudi")

export(
  adegpar,
  adeg.panel.label,
  adeg.panel.edges,
  adeg.panel.nb,
  adeg.panel.Spatial,
  adeg.panel.values,
  layout2position,
  as.raster.pixmapRGB, 	 
  as.raster.pixmapGrey,
  changelatticetheme,
  sortparamADEg,
  sortparamADEgS,
  setlimits2D,
  setlimits1D,
  plotEig,
  ADEgS,
  s.label,
  s.corcircle,
  s.arrow,
  s.class,
  s.distri,
  s.value,
  s.image,
  s.logo,
  s.density,
  s.match,
  s.Spatial,
  s.traject,
  table.value,
  table.image,
  triangle.label,
  triangle.match,
  triangle.class,
  triangle.traject,
  s1d.label,
  s1d.class,
  s1d.curve,
  s1d.density,
  s1d.distri,
  s1d.dotplot,
  s1d.gauss,
  s1d.hist,
  s1d.barchart,
  s1d.interval,
  s1d.match,
  s1d.boxplot,
  kplot,
  kplotsepan.coa,
  biplot,
  plot,
  scatter,
  score,
  screeplot
  )

exportMethods(
  "[",
  "[[",
  "[[<-",
  "+",
  "$",
  "length",
  "names",
  "names<-",
  "cbindADEg",
  "rbindADEg",
  "add.ADEg",
  "addhist",
  "getcall",
  "getgraphics",
  "getlatticecall",
  "getparameters",
  "getpositions",
  "getstats",
  "gettrellis",
  "insert",
  "panel",
  "panelbase",
  "plot",
  "prepare",
  "print",
  "printSuperpose",
  "setlatticecall",
  "show",
  "superpose",
  "update",
  "zoom"
  )

exportClasses(
  "ADEg",
  "ADEgS",
  "ADEg.C1",
  "ADEg.S1",
  "ADEg.S2",
  "ADEg.T",
  "ADEg.Tr",
  "C1.barchart",
  "C1.curve",
  "C1.density",
  "C1.dotplot",
  "C1.gauss",
  "C1.hist",
  "C1.interval",
  "S1.boxplot",
  "S1.class",
  "S1.distri",
  "S1.label",
  "S1.match",
  "S2.arrow",
  "S2.class",
  "S2.corcircle",
  "S2.density",
  "S2.distri",
  "S2.image",
  "S2.label",
  "S2.logo",
  "S2.match",
  "S2.traject",
  "S2.value",
  "T.cont",
  "T.image",
  "T.value",
  "Tr.class",
  "Tr.label",
  "Tr.match",
  "Tr.traject"
  )
