com.realtime.crossfire.jxclient.gui.log
Class AbstractSegment

java.lang.Object
  extended by com.realtime.crossfire.jxclient.gui.log.AbstractSegment
All Implemented Interfaces:
Segment
Direct Known Subclasses:
TextSegment

public abstract class AbstractSegment
extends java.lang.Object
implements Segment

Abstract base class for Segment implementations.


Field Summary
private  int width
          The width of the segment if displayed.
private  int x
          The x-coordinate to display the segment.
private  int y
          The y-coordinate to display the segment.
 
Constructor Summary
AbstractSegment()
           
 
Method Summary
protected  int getWidth()
          Returns the width to display the segment.
protected  int getX()
          Returns the x-coordinate to display the segment.
protected  int getY()
          Returns the y-coordinate to display the segment.
 void setWidth(int width)
          Sets the width to display the segment.
 void setX(int x)
          Sets the x-coordinate to display the segment.
 void setY(int y)
          Sets the y-coordinate to display the segment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.realtime.crossfire.jxclient.gui.log.Segment
draw, getSize, updateAttributes
 

Field Detail

width

private int width
The width of the segment if displayed. Set to -1 if unknown.


x

private int x
The x-coordinate to display the segment. Set to -1 if unknown.


y

private int y
The y-coordinate to display the segment. Set to -1 if unknown.

Constructor Detail

AbstractSegment

public AbstractSegment()
Method Detail

getWidth

protected int getWidth()
Returns the width to display the segment.

Returns:
the width

getX

protected int getX()
Returns the x-coordinate to display the segment.

Returns:
the x-coordinate

getY

protected int getY()
Returns the y-coordinate to display the segment.

Returns:
the y-coordinate

setWidth

public void setWidth(int width)
Sets the width to display the segment.

Specified by:
setWidth in interface Segment
Parameters:
width - the width

setX

public void setX(int x)
Sets the x-coordinate to display the segment.

Specified by:
setX in interface Segment
Parameters:
x - the x-coordinate

setY

public void setY(int y)
Sets the y-coordinate to display the segment.

Specified by:
setY in interface Segment
Parameters:
y - the y-coordinate