1 26 27 package org.nightlabs.editor2d; 28 29 import java.awt.Rectangle ; 30 import java.awt.geom.AffineTransform ; 31 import java.beans.PropertyChangeListener ; 32 import java.util.Enumeration ; 33 34 import org.nightlabs.editor2d.render.RenderModeManager; 35 import org.nightlabs.editor2d.render.Renderer; 36 import org.nightlabs.i18n.I18nText; 37 38 44 public interface DrawComponent 45 extends Cloneable 46 { 47 public static final String TRANSFORM_CHANGED = "transform changed"; 48 49 public static final int ROTATION_X_DEFAULT = Integer.MAX_VALUE; 51 public static final int ROTATION_Y_DEFAULT = Integer.MAX_VALUE; 52 public static final long ID_EDEFAULT = 0L; 53 public static final int X_EDEFAULT = 0; 54 public static final int Y_EDEFAULT = 0; 55 public static final int WIDTH_EDEFAULT = 0; 56 public static final int HEIGHT_EDEFAULT = 0; 57 public static final Rectangle BOUNDS_EDEFAULT = new Rectangle (X_EDEFAULT, Y_EDEFAULT, WIDTH_EDEFAULT, HEIGHT_EDEFAULT); 58 public static final double ROTATION_EDEFAULT = 0.0; 59 public static final int TMP_ROTATION_X_EDEFAULT = ROTATION_X_DEFAULT; 60 public static final int TMP_ROTATION_Y_EDEFAULT = ROTATION_Y_DEFAULT; 61 public static final int RENDER_MODE_EDEFAULT = RenderModeManager.DEFAULT_MODE; 62 public static final String DEFAULT_LANGUAGE_ID = I18nText.DEFAULT_LANGUAGEID; 63 64 public static final String PROP_AFFINE_TRANSFORM = "affineTransform"; 66 public static final String PROP_BOUNDS = "bounds"; 67 public static final String PROP_HEIGHT = "height"; 68 public static final String PROP_WIDTH = "width"; 69 public static final String PROP_NAME = "name"; 70 public static final String PROP_ID = "id"; 71 public static final String PROP_PARENT = "parent"; 72 public static final String PROP_RENDERER = "renderer"; 73 public static final String PROP_RENDER_MODE = "renderMode"; 74 public static final String PROP_ROTATION = "rotation"; 75 public static final String PROP_ROTATION_X = "rotationX"; 76 public static final String PROP_ROTATION_Y = "rotationY"; 77 public static final String PROP_X = "x"; 78 public static final String PROP_Y = "y"; 79 public static final String PROP_HORIZONTAL_GUIDE = "horizontalGuide"; 80 public static final String PROP_VERTICAL_GUIDE = "verticalGuide"; 81 public static final String PROP_TMP_ROTATION_X = "tmpRotationX"; 82 public static final String PROP_TMP_ROTATION_Y = "tmpRotationY"; 83 public static final String PROP_LANGUAGE_ID = "languageID"; 84 85 90 void addPropertyChangeListener(PropertyChangeListener pcl); 91 92 96 void removePropertyChangeListener(PropertyChangeListener pcl); 97 98 102 long getId(); 103 104 108 void setId(long value); 109 110 115 String getName(); 116 117 122 void setName(String name); 123 124 128 void setLanguageId(String languageId); 129 130 134 String getLanguageId(); 135 136 141 I18nText getI18nText(); 142 143 148 void setI18nText(I18nText text); 149 150 154 int getX(); 155 156 160 void setX(int value); 161 162 166 int getY(); 167 168 172 void setY(int value); 173 174 178 int getWidth(); 179 180 184 void setWidth(int value); 185 186 190 int getHeight(); 191 192 196 void setHeight(int value); 197 198 202 double getRotation(); 203 204 208 void setRotation(double value); 209 210 215 EditorGuide getHorizontalGuide(); 216 217 222 void setHorizontalGuide(EditorGuide value); 223 224 229 EditorGuide getVerticalGuide(); 230 231 236 void setVerticalGuide(EditorGuide value); 237 238 242 int getRotationX(); 243 244 248 void setRotationX(int value); 249 250 254 int getRotationY(); 255 256 260 void setRotationY(int value); 261 262 266 Rectangle getBounds(); 267 268 272 void setBounds(Rectangle bounds); 273 274 278 AffineTransform getAffineTransform(); 279 280 284 void setAffineTransform(AffineTransform at); 285 286 295 void setTmpRotationX(int newTmpRotationX); 296 297 302 int getTmpRotationX(); 303 304 313 void setTmpRotationY(int newTmpRotationY); 314 315 320 int getTmpRotationY(); 321 322 327 void setRenderMode(int mode); 328 329 334 int getRenderMode(); 335 336 343 Renderer getRenderer(); 344 345 352 void setRenderModeManager(RenderModeManager man); 353 354 359 RenderModeManager getRenderModeManager(); 360 361 366 String getTypeName(); 367 368 373 MultiLayerDrawComponent getRoot(); 374 375 380 void setLocation(int x, int y); 381 382 387 DrawComponentContainer getParent(); 388 389 394 void setParent(DrawComponentContainer value); 395 396 406 void setRotationMember(double value); 407 408 420 void transform(AffineTransform at); 421 422 439 void transform(AffineTransform at, boolean fromParent); 440 441 444 void clearBounds(); 445 446 452 public Object clone(); 453 454 public Object clone(DrawComponentContainer parent); 455 461 } | Popular Tags |