Examples of MapObjectType


Examples of net.sf.myway.map.da.entities.MapObjectType

  public CoordinateSystem getCoordianteSystem() {
    return _coordianteSystem;
  }

  public void render(final MapObject object, final GC gc) {
    final MapObjectType type = object.getType();
    final int bcol = _profile.getBorderColor(type);
    final Color border = new Color(gc.getDevice(), (bcol & 0xff0000) >> 16,
      (bcol & 0xff00) >> 8, bcol & 0xff);
    final int fcol = _profile.getColor(type);
    final Color bgcolor = new Color(gc.getDevice(), (fcol & 0xff0000) >> 16,
      (fcol & 0xff00) >> 8, fcol & 0xff);
    final int[] poly = new int[object.getNodes().size() * 2];
    int idx = 0;
    Point p;
    for (final MapNodeRef point : object.getNodes()) {
      p = calcPos(point.getNode().getLatitude(), point.getNode().getLongitude());
      gc.setForeground(border);
      gc.setBackground(bgcolor);
      poly[idx++] = p.getX();
      poly[idx++] = p.getY();
    }
    if (type.isClosed()) {
      gc.fillPolygon(poly);
      gc.drawPolygon(poly);
    }
    else {
      gc.setLineWidth(5);
View Full Code Here

Examples of net.sf.myway.map.da.entities.MapObjectType

  @Override
  public Image getColumnImage(final Object element, final int columnIndex) {
    if (element instanceof MapObjectType)
      switch (columnIndex) {
        case 0:
          final MapObjectType type = (MapObjectType) element;
          final String ico = _profile.getIcon(type);
          final Image icon = _icons.get(ico);
          if (icon == null) {
            final ImageDescriptor desc = EditUIPlugin.getImageDescriptor("icons/" + ico //$NON-NLS-1$
              + ".png"); //$NON-NLS-1$
View Full Code Here

Examples of net.sf.myway.map.da.entities.MapObjectType

          final TreeItem[] sel = getViewer().getTree().getSelection();
          if (sel.length == 0)
            return;
          final Object data = sel[0].getData();
          if (data instanceof MapObjectType) {
            final MapObjectType type = (MapObjectType) data;
            System.out.println("create " + type.name()); //$NON-NLS-1$
            final MapObject obj = new MapObject();
            final Position p = new Position();
            // p.setLatitude(new Angle(_centerLatitude.getVal()));
            // p.setLongitude(new Angle(_centerLongitude.getVal()));
            // obj.setCenter(p);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.