Appearance.java
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright (c) 2012 Stefan Profanter. All rights reserved. This program and the accompanying
00003  * materials are made available under the terms of the GNU Public License v3.0 which accompanies
00004  * this distribution, and is available at http://www.gnu.org/licenses/gpl.html
00005  * 
00006  * Contributors: Stefan Profanter - initial API and implementation, Year: 2012; Andrei Stoica -
00007  * refactored implementation during Google Summer of Code 2014
00008  ******************************************************************************/
00009 package edu.tum.cs.vis.model.util;
00010 
00011 import java.awt.Color;
00012 import java.io.Serializable;
00013 
00014 import processing.core.PImage;
00015 
00022 public class Appearance implements Serializable {
00026         private static final long       serialVersionUID        = 3878380145216484383L;
00027 
00031         private String                          imageFileName;
00032 
00036         private PImage                          imageReference;
00037 
00041         private Color                           colorFill;
00042 
00046         private Color                           colorLine;
00047 
00051         private int                                     strokeWeight;
00052 
00056         public Appearance() {
00057                 imageFileName = null;
00058                 imageReference = null;
00059                 colorFill = null;
00060                 colorLine = null;
00061                 strokeWeight = 2;
00062         };
00063 
00071         public Appearance(final Appearance toCopy) {
00072                 if (toCopy.colorFill != null) {
00073                         this.colorFill = toCopy.colorFill;
00074                 }
00075                 if (toCopy.colorLine != null) {
00076                         this.colorLine = toCopy.colorLine;
00077                 }
00078                 if (toCopy.imageFileName != null) {
00079                         this.imageFileName = toCopy.imageFileName;
00080                 }
00081                 if (toCopy.imageReference != null) {
00082                         this.imageReference = toCopy.imageReference;
00083                 }
00084                 if (toCopy.strokeWeight != 2) {
00085                         this.strokeWeight = toCopy.strokeWeight;
00086                 }
00087         }
00088 
00092         public Color getColorFill() {
00093                 return colorFill;
00094         }
00095 
00099         public Color getColorLine() {
00100                 return colorLine;
00101         }
00102 
00106         public String getImageFileName() {
00107                 return imageFileName;
00108         }
00109 
00113         public PImage getImageReference() {
00114                 return imageReference;
00115         }
00116 
00120         public int getStrokeWeight() {
00121                 return strokeWeight;
00122         }
00123 
00128         public void setColorFill(Color colorFill) {
00129                 this.colorFill = colorFill;
00130         }
00131 
00136         public void setColorLine(Color colorLine) {
00137                 this.colorLine = colorLine;
00138         }
00139 
00144         public void setImageFileName(String imageFileName) {
00145                 this.imageFileName = imageFileName;
00146         }
00147 
00152         public void setImageReference(PImage imageReference) {
00153                 this.imageReference = imageReference;
00154         }
00155 
00160         public void setStrokeWeight(int strokeWeight) {
00161                 this.strokeWeight = strokeWeight;
00162         }
00163 }


knowrob_cad_parser
Author(s): Stefan Profanter
autogenerated on Mon Oct 6 2014 01:29:56