c408h006
Class User

java.lang.Object
  extended byc408h006.User

public class User
extends java.lang.Object

A user editing a file in the OmniEditor system.


Constructor Summary
User(int id)
          Constructs an instance of this class.
 
Method Summary
 int getID()
          Returns the user's ID.
 boolean getMarkActive()
          Returns true if the user has completed making a selection in the file.
 int getMarkedPos()
          Returns the user's current marked position for the beginning of a selection within the file (-1 if no position is marked).
 int getPosition()
          Returns the user's current position within the file (-1 if the user has not specified a position).
 int getSelectionEnd()
          Returns the user's current marked position for the end of a selection within the file (-1 if no selection end position is marked.
 void setMarkedPos(int markedPos)
          Set the position the user has specified to be marked for the beginning of a selection within the file.
 void setPosition(int position)
          Set the position of the user's cursor within the file.
 void setSelectionEnd(int selectionEnd)
          Set the position which marks the end of a text selection within the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User(int id)
Constructs an instance of this class.

Parameters:
id - The user's id
Method Detail

setPosition

public void setPosition(int position)
Set the position of the user's cursor within the file.

Parameters:
position - The user's new position within the file

setMarkedPos

public void setMarkedPos(int markedPos)
Set the position the user has specified to be marked for the beginning of a selection within the file.

Parameters:
markedPos - The position the user has specified to be marked for the beginning of a selection within the file

setSelectionEnd

public void setSelectionEnd(int selectionEnd)
Set the position which marks the end of a text selection within the file. The beginning of the selection must be marked before the end of the selection can be marked.

Parameters:
selectionEnd - The position which marks the end of a text selection within the file.

getID

public int getID()
Returns the user's ID.

Returns:
The user's ID

getPosition

public int getPosition()
Returns the user's current position within the file (-1 if the user has not specified a position).

Returns:
The user's current position within the file

getMarkedPos

public int getMarkedPos()
Returns the user's current marked position for the beginning of a selection within the file (-1 if no position is marked).

Returns:
The user's current marked for the beginning of a selection position within the file

getSelectionEnd

public int getSelectionEnd()
Returns the user's current marked position for the end of a selection within the file (-1 if no selection end position is marked.

Returns:
The user's current marked position for the end of a selection within the file

getMarkActive

public boolean getMarkActive()
Returns true if the user has completed making a selection in the file. This occurs which the user has marked the beginning and the end of the selection.

Returns:
true if the user has completed making a selection in the file