Changeset 286 for trunk/src/org/expeditee/gui/Vector.java
- Timestamp:
- 08/29/08 08:17:54 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/expeditee/gui/Vector.java
r115 r286 2 2 3 3 import java.awt.Color; 4 import java.awt.Dimension; 4 5 import java.awt.Point; 6 import java.text.NumberFormat; 5 7 8 import org.expeditee.items.Item; 6 9 import org.expeditee.items.Permission; 7 10 … … 15 18 16 19 public Color Background; 20 21 public Item Source; 22 23 public Dimension Size; 17 24 18 public Vector(Frame overlay, Permission permission, Point origin,19 Float scale, Color color, Color background) {25 public Vector(Frame overlay, Permission permission, 26 Float scale, Item source) { 20 27 super(overlay, permission); 21 Origin = origin;28 Origin = source.getPosition(); 22 29 Scale = scale; 23 Foreground = color; 24 Background = background; 30 Foreground = source.getColor(); 31 Background = source.getBackgroundColor(); 32 Source = source; 25 33 } 26 34 … … 54 62 return (y - Origin.y) / Scale; 55 63 } 64 65 public void setSize(int maxX, int maxY) { 66 Size = new Dimension(maxX, maxY); 67 } 68 69 public static NumberFormat getNumberFormatter() { 70 NumberFormat nf = NumberFormat.getInstance(); 71 nf.setMaximumFractionDigits(4); 72 return nf; 73 } 56 74 }
Note:
See TracChangeset
for help on using the changeset viewer.