|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLogEntry
public class LogEntry
Each instance of this class defines a single entry in a log file. Log entries can be of a variety of different types as defined by the final static vars in this class.
Field Summary | |
---|---|
(package private) static int |
ADD_BLANK_TILE
Defines an Add Blank Tile to TileBin log entry |
(package private) static int |
ADD_BLANK_TILE_TO_GRID
Defines an Add Blank Tile to Grid log entry |
(package private) java.lang.String |
blankDesc
Description for blank tile |
(package private) java.lang.String |
blankName
Name for blank tile |
(package private) static int |
CHANGE_TILEBIN_WIDTH
Defines a Change TileBin Width log entry |
(package private) static int |
EDIT_BLANK_TILE
Defines an Edit Blank Tile log entry |
(package private) long |
eTime
End time of arrangement (save time) |
(package private) static int |
GRID_TO_GRID
Defines a Grid to Grid move log entry |
(package private) static int |
GRID_TO_TILEBIN
Defines a Grid to TileBin move log entry |
(package private) int |
hours
Elapsed time at this entry: Hours |
(package private) int |
initialX
Initial X position of the tile |
(package private) int |
initialY
Initial Y position of the tile |
(package private) static int |
LOAD_LOG
Defines a Load Log log entry |
(package private) int |
minutes
Elapsed time at this entry: Minutes |
(package private) int |
newX
New X position of the tile |
(package private) int |
newY
New Y position of the tile |
(package private) static int |
NULL_ENTRY
Defines a null log entry |
(package private) java.lang.String |
oldBlankDesc
Old description for blank tile |
(package private) java.lang.String |
oldBlankName
Old name for blank tile |
(package private) int |
prevHours
Time since previous move: Hours |
(package private) int |
prevMinutes
Time since previous move: Minutes |
(package private) int |
prevSeconds
Time since previous move: Seconds |
(package private) static int |
REMOVE_BLANK_FROM_GRID
Defines a Remove Blank Tile from Grid log entry |
(package private) static int |
REMVOE_BLANK_FROM_TILEBIN
Defines a Remove Blank Tile from TileBin log entry |
(package private) static int |
SAVE_LOG
Defines a Save Log log entry |
(package private) int |
seconds
Elapsed time at this entry: Seconds |
(package private) static long |
serialVersionUID
|
(package private) long |
sTime
Start time of arrangement |
(package private) static int |
TILEBIN_TO_GRID
Defines a TileBin to Grid move log entry |
(package private) static int |
TILEBIN_TO_TILEBIN
Defines a TileBin to TileBin move log entry |
(package private) int |
tileID
ID of the tile |
(package private) int |
type
Type of move |
Constructor Summary | |
---|---|
LogEntry()
The constructor for a log entry initializes all values to defaults. |
Method Summary | |
---|---|
void |
initAddBlankTile(int id,
java.lang.String name,
java.lang.String desc)
Initializes the entry to an 'add blank tile' entry. |
void |
initAddBlankTileToGrid(int id,
java.lang.String name,
java.lang.String desc,
int x,
int y)
Initializes the entry to an 'add blank tile to grid' entry. |
void |
initEditBlankTile(int id,
java.lang.String name,
java.lang.String desc,
java.lang.String oName,
java.lang.String oDesc)
Initializes the entry to an 'edit blank tile' entry. |
void |
initLoadLog()
Initializes the entry to a 'load log' entry. |
void |
initMoveEntry(int theType,
int id,
int iX,
int iY,
int nX,
int nY)
Initializes the entry to a 'move' entry. |
void |
initRemoveBlankTile(int theType,
int id,
java.lang.String name,
java.lang.String desc,
int x,
int y)
Initializes the entry to a 'remove blank tile' entry. |
void |
initSaveLog(long st,
long et)
Initializes the entry to a 'save log' entry. |
void |
initTileBinWidthChange(int oX,
int nX)
Initializes the entry to a 'tilebin width change' entry. |
void |
print()
Debug function that prints out all class vars to the console (seperated by commas). |
void |
printLong()
Debug function that prints out all class vars to the console (comma separated, with var labels). |
void |
setTimes(int h,
int m,
int s,
int lh,
int lm,
int ls)
Sets the Elapsed and previous times for the entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
static final int NULL_ENTRY
static final int TILEBIN_TO_TILEBIN
static final int TILEBIN_TO_GRID
static final int GRID_TO_GRID
static final int GRID_TO_TILEBIN
static final int ADD_BLANK_TILE
static final int EDIT_BLANK_TILE
static final int REMOVE_BLANK_FROM_GRID
static final int REMVOE_BLANK_FROM_TILEBIN
static final int CHANGE_TILEBIN_WIDTH
static final int ADD_BLANK_TILE_TO_GRID
static final int SAVE_LOG
static final int LOAD_LOG
int type
int tileID
int initialX
int initialY
int newX
int newY
int hours
int minutes
int seconds
int prevHours
int prevMinutes
int prevSeconds
long sTime
long eTime
java.lang.String blankName
java.lang.String blankDesc
java.lang.String oldBlankName
java.lang.String oldBlankDesc
Constructor Detail |
---|
public LogEntry()
Method Detail |
---|
public void setTimes(int h, int m, int s, int lh, int lm, int ls)
h
- Elapsed hoursm
- Elapsed minutess
- Elapsed secondslh
- previous hourslm
- previous minutesls
- previous secondspublic void initMoveEntry(int theType, int id, int iX, int iY, int nX, int nY)
theType
- The type of moveid
- The ID of the moved tileiX
- The initial X position of the moved tileiY
- The initial Y position of the moved tilenX
- The new X position of the moved tilenY
- The new Y position of the moved tilepublic void initAddBlankTile(int id, java.lang.String name, java.lang.String desc)
id
- Tile ID of the added tilename
- Name of the added tiledesc
- Description of the added tilepublic void initAddBlankTileToGrid(int id, java.lang.String name, java.lang.String desc, int x, int y)
id
- ID of the added tilename
- Name of the added tiledesc
- Description of the added tilex
- Grid's X location of added tiley
- Grid's Y location of added tilepublic void initEditBlankTile(int id, java.lang.String name, java.lang.String desc, java.lang.String oName, java.lang.String oDesc)
id
- ID of the edited tilename
- Name of the edited tiledesc
- Description of the edited tileoName
- Old name of the edited tileoDesc
- Old description of the edited tilepublic void initRemoveBlankTile(int theType, int id, java.lang.String name, java.lang.String desc, int x, int y)
theType
- Type of removal (from grid or tilebin)id
- ID of removed tilename
- Name of removed tiledesc
- Description of removed tilex
- X location of removed tiley
- Y location of removed tilepublic void initTileBinWidthChange(int oX, int nX)
oX
- Old tile bin widthnX
- New tile bin widthpublic void initSaveLog(long st, long et)
st
- Start time of the loget
- End time of the log (save time)public void initLoadLog()
public void print()
public void printLong()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |