Interface Segment
-
- All Known Implementing Classes:
AbstractSegment,TextSegment
public interface SegmentOne segment of aLinewhich should be displayed without changing text attributes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddraw(@NotNull java.awt.Graphics g, int y, @NotNull Fonts fonts)Draws this segment to aGraphicsinstance.@NotNull java.awt.geom.RectangularShapegetSize(@NotNull Fonts fonts, @NotNull java.awt.font.FontRenderContext context)Returns the size of this segment in pixels.voidsetWidth(int width)Sets the width to display the segment.voidsetX(int x)Sets the x-coordinate to display the segment.voidsetY(int y)Sets the y-coordinate to display the segment.voidupdateAttributes(@NotNull Fonts fonts, @NotNull java.awt.font.FontRenderContext context)Updates the cached attributes of this segment.
-
-
-
Method Detail
-
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
-
setWidth
void setWidth(int width)
Sets the width to display the segment.- Parameters:
width- the width
-
draw
void draw(@NotNull @NotNull java.awt.Graphics g, int y, @NotNull @NotNull Fonts fonts)Draws this segment to aGraphicsinstance.- Parameters:
g- the graphics to draw toy- the y-coordinate to draw tofonts- the fonts to use
-
updateAttributes
void updateAttributes(@NotNull @NotNull Fonts fonts, @NotNull @NotNull java.awt.font.FontRenderContext context)Updates the cached attributes of this segment.- Parameters:
fonts- the fonts instance to usecontext- the font render context to use
-
getSize
@NotNull @NotNull java.awt.geom.RectangularShape getSize(@NotNull @NotNull Fonts fonts, @NotNull @NotNull java.awt.font.FontRenderContext context)Returns the size of this segment in pixels.- Parameters:
fonts- the fonts instance to usecontext- the font render context to use- Returns:
- the size
-
-