X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d-demos.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fexamples%2FTextEditorDemo.java;h=71395c846174b59fb7f20ea01a299442be85f62c;hp=e50c27f398f80f5f58474ddd7b1a7a9f6294de90;hb=63b799f7add2ebb5cd30b50c2581bc246f6e7b82;hpb=8699433dbd9238c4d926d78bd2e50f892fc51324 diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java b/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java index e50c27f..71395c8 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/examples/TextEditorDemo.java @@ -1,7 +1,6 @@ /* - * Sixth - System for data storage, computation, exploration and interaction. - * Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu - * + * Sixth 3D engine demos. Copyright ©2012-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * * This program is free software; you can redistribute it and/or * modify it under the terms of version 3 of the GNU Lesser General Public License * or later as published by the Free Software Foundation. @@ -12,10 +11,10 @@ package eu.svjatoslav.sixth.e3d.examples; import eu.svjatoslav.sixth.e3d.geometry.Point2D; import eu.svjatoslav.sixth.e3d.geometry.Point3D; import eu.svjatoslav.sixth.e3d.geometry.Rectangle; -import eu.svjatoslav.sixth.e3d.geometry.Transform; -import eu.svjatoslav.sixth.e3d.gui.ViewContext; import eu.svjatoslav.sixth.e3d.gui.ViewFrame; +import eu.svjatoslav.sixth.e3d.gui.ViewPanel; import eu.svjatoslav.sixth.e3d.gui.textEditorComponent.TextEditComponent; +import eu.svjatoslav.sixth.e3d.math.Transform; import eu.svjatoslav.sixth.e3d.renderer.raster.Color; import eu.svjatoslav.sixth.e3d.renderer.raster.ShapeCollection; import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance; @@ -37,10 +36,10 @@ public class TextEditorDemo { public static void main(final String[] args) { final ViewFrame viewFrame = new ViewFrame(); - final ViewContext viewContext = viewFrame.getView().getContext(); + final ViewPanel viewPanel = viewFrame.getViewPanel(); - final ShapeCollection shapeCollection = viewFrame.getView() - .getContext().getRootShapeCollection(); + final ShapeCollection shapeCollection = viewFrame.getViewPanel() + .getRootShapeCollection(); shapeCollection.addShape(createGrid()); @@ -49,15 +48,15 @@ public class TextEditorDemo { for (double x = -500 * m; x <= (500 * m); x += 250 * m) { final TextEditComponent textEditor = new TextEditComponent( - new Transform(new Point3D(x, 0, z)), viewContext, + new Transform(new Point3D(x, 0, z)), viewPanel, new Point2D(200, 120)); shapeCollection.addShape(textEditor); } - viewContext.getAvatar().setLocation(new Point3D(500, -300, -800)); - viewContext.getAvatar().setAngleXZ(0.6); - viewContext.getAvatar().setAngleYZ(-0.5); + viewPanel.getAvatar().setLocation(new Point3D(500, -300, -800)); + viewPanel.getAvatar().setAngleXZ(0.6); + viewPanel.getAvatar().setAngleYZ(-0.5); } }