Example #1
0
 public void resetPolygonChanges() {
   // split model polygon string into separate polygons
   polygons.removeAllElements();
   if (model.getPolygons().length() > 0) {
     for (String polygon : model.getPolygons().split("\\|"))
       polygons.addElement(new RelativePolygon(polygon, scaleX, scaleY));
   }
 }
Example #2
0
  public HILayer(HiLayer model, int scaleX, int scaleY) {
    this.model = model;
    this.scaleX = scaleX;
    this.scaleY = scaleY;
    this.layerColour =
        new Color(
            model.getRed(), model.getGreen(), model.getBlue(), (int) (model.getOpacity() * 255));

    // split model polygon string into separate polygons
    if (model.getPolygons().length() > 0) {
      for (String polygon : model.getPolygons().split("\\|"))
        polygons.addElement(new RelativePolygon(polygon, scaleX, scaleY));
    }
  }
Example #3
0
 public boolean hasPolygonChanges() {
   if (model.getPolygons().compareTo(serializePolygons()) != 0) return true;
   return false;
 }