com.realtime.crossfire.jxclient.gui.log
Interface Segment

All Known Implementing Classes:
AbstractSegment, TextSegment

public interface Segment

One segment of a Line which should be displayed without changing text attributes.


Method Summary
 void draw(java.awt.Graphics g, int y, Fonts fonts)
          Draws this segment to a Graphics instance.
 java.awt.geom.RectangularShape getSize(Fonts fonts, java.awt.font.FontRenderContext context)
          Returns the size of this segment in pixels.
 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.
 void updateAttributes(Fonts fonts, java.awt.font.FontRenderContext context)
          Updates the cached attributes of this segment.
 

Method Detail

draw

void draw(@NotNull
          java.awt.Graphics g,
          int y,
          @NotNull
          Fonts fonts)
Draws this segment to a Graphics instance.

Parameters:
g - the graphics to draw to
y - the y-coordinate to draw to
fonts - the fonts to use

getSize

@NotNull
java.awt.geom.RectangularShape getSize(@NotNull
                                               Fonts fonts,
                                               @NotNull
                                               java.awt.font.FontRenderContext context)
Returns the size of this segment in pixels.

Parameters:
fonts - the fonts instance to use
context - the font render context to use
Returns:
the size

setWidth

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

Parameters:
width - the width

setX

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

Parameters:
x - the x-coordinate

setY

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

Parameters:
y - the y-coordinate

updateAttributes

void updateAttributes(@NotNull
                      Fonts fonts,
                      @NotNull
                      java.awt.font.FontRenderContext context)
Updates the cached attributes of this segment.

Parameters:
fonts - the fonts instance to use
context - the font render context to use