本文整理汇总了Java中edu.tamu.core.sketch.Point类的典型用法代码示例。如果您正苦于以下问题:Java Point类的具体用法?Java Point怎么用?Java Point使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Point类属于edu.tamu.core.sketch包,在下文中一共展示了Point类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RecognizeController
import edu.tamu.core.sketch.Point; //导入依赖的package包/类
public RecognizeController(Pane pDrawPane, AbstractDiagramController pController) {
aDrawPane = pDrawPane;
diagramController = pController;
graph = diagramController.getGraphModel();
//TODO Find a nicer solution for this:
//This is to load the recognizer when starting app, not when starting to draw.
recognizer = new PaleoSketchRecognizer(PaleoConfig.allOn());
Stroke init = new Stroke();
init.addPoint(new Point(0,1));
recognizer.setStroke(init);
recognizer.recognize().getBestShape();
}
示例2: addPoint
import edu.tamu.core.sketch.Point; //导入依赖的package包/类
public void addPoint(double x, double y) {
path.getElements()
.add(new LineTo(x, y));
stroke.addPoint(new Point(x, y));
changes.firePropertyChange(Constants.changeSketchPoint, null, new Point2D(x,y));
}
示例3: addPointRemote
import edu.tamu.core.sketch.Point; //导入依赖的package包/类
public void addPointRemote(double x, double y) {
path.getElements()
.add(new LineTo(x, y));
stroke.addPoint(new Point(x, y));
}
示例4: parseSocketData
import edu.tamu.core.sketch.Point; //导入依赖的package包/类
public static List<Point> parseSocketData(String socketString) {
List<Point> points = new ArrayList<Point>();
String pointListString[] = socketString.split("\\|");
for(int i=0; i<pointListString.length;i++) {
String pointString = pointListString[i];
String point[] = pointString.split(" ");
float xCoord = Float.valueOf(point[0]).floatValue();
float yCoord = Float.valueOf(point[1]).floatValue();
Point nextPoint = new Point(xCoord,yCoord);
points.add(nextPoint);
}
// points.add(new Point(0, 0));
// points.add(new Point(30, 5));
// points.add(new Point(65, 0));
// points.add(new Point(85, 0));
// points.add(new Point(100, 0));
//
// points.add(new Point(106, 10));
// points.add(new Point(103, 20));
// points.add(new Point(108, 30));
// points.add(new Point(102, 40));
// points.add(new Point(106, 50));
// points.add(new Point(104, 60));
// points.add(new Point(102, 70));
// points.add(new Point(106, 90));
// points.add(new Point(102, 110));
// points.add(new Point(101, 120));
// points.add(new Point(103, 140));
// points.add(new Point(104, 160));
// points.add(new Point(105, 180));
// points.add(new Point(106, 190));
// points.add(new Point(107, 200));
//
// points.add(new Point(100, 200));
// points.add(new Point(90, 200));
// points.add(new Point(80, 200));
// points.add(new Point(70, 200));
// points.add(new Point(50, 200));
// points.add(new Point(40, 200));
// points.add(new Point(30, 200));
// points.add(new Point(12, 200));
// points.add(new Point(10, 200));
// points.add(new Point(-1, 200));
//
// points.add(new Point(0, 160));
// points.add(new Point(5, 120));
// points.add(new Point(3, 100));
// points.add(new Point(2, 40));
// points.add(new Point(1, 20));
// points.add(new Point(7, 10));
// points.add(new Point(10, 0));
return points;
}
示例5: mouseDragged
import edu.tamu.core.sketch.Point; //导入依赖的package包/类
@Override
public void mouseDragged(MouseEvent e) {
currentStroke.addPoint(new Point(e));
repaint();
}