haifa.shopsim.UI.shopanim
Class ShopAnimIcon
java.lang.Object
|
+--haifa.shopsim.UI.shopanim.ShopAnimIcon
- All Implemented Interfaces:
- javax.swing.Icon, ShopAnimConstants
- Direct Known Subclasses:
- MachineAnimIcon, RouteAnimIcon
- public abstract class ShopAnimIcon
- extends java.lang.Object
- implements javax.swing.Icon, ShopAnimConstants
An icon that is to be drawn in the shop animation area.
- Version:
- 1.1
Field Summary |
protected int |
height
|
(package private) static int |
JOB_CROSS_SIZE
|
protected int |
orientation
May have values NORTH,EAST, SOUTH or WEST or NOT_SET. |
protected static java.util.Random |
random
|
protected int |
width
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
width
protected int width
height
protected int height
random
protected static java.util.Random random
JOB_CROSS_SIZE
static final int JOB_CROSS_SIZE
orientation
protected int orientation
- May have values NORTH,EAST, SOUTH or WEST or NOT_SET.
ShopAnimIcon
public ShopAnimIcon()
getOrientation
public int getOrientation()
setOrientation
public void setOrientation(int orientation_)
getIconWidth
public int getIconWidth()
- Specified by:
getIconWidth
in interface javax.swing.Icon
getIconHeight
public int getIconHeight()
- Specified by:
getIconHeight
in interface javax.swing.Icon
setIconWidth
public void setIconWidth(int width_)
setIconHeight
public void setIconHeight(int height_)
paintIcon
public abstract void paintIcon(java.awt.Component p1,
java.awt.Graphics p2,
int x,
int y)
- Should be implemented by the baseclasses. Must not paint outside of the range (x,y) -- (x+width-1,y+height-1).
- Specified by:
paintIcon
in interface javax.swing.Icon
drawCross
protected void drawCross(int xx,
int yy,
java.awt.Graphics g)
getRandomPoint
protected java.awt.Point getRandomPoint(int xx,
int yy,
int width,
int height)