Package role

Class TextModel

All Implemented Interfaces:
Configuration, Cloneable, Comparable<EntityModel>

public abstract class TextModel extends EntityModel implements Configuration
This class represents text-based entities. The representations are in UNICODE. The visual representation of these entities are rendered graphically.
Author:
Krish Pillai
  • Constructor Details

    • TextModel

      public TextModel(int x, int y)
      Constructor taking the coordinates of the center of the text entity. The origin is at the top left corner of the canvas.
      Parameters:
      x - X coordinate
      y - Y coordinate
    • TextModel

      public TextModel(int x, int y, int layer)
      Constructor taking the coordinates of the center of the text entity and the layer for z-axis. The origin is at the top left corner of the canvas. Lower layer numbers are overlaid by higher ones.
      Parameters:
      x - X coordinate
      y - Y coordinate
      layer - The layer number [greater than or equal to zero]
  • Method Details

    • getColor

      public Color getColor()
      Returns the color setting for this text
      Returns:
      the current color
    • modifyMessage

      public void modifyMessage(String message)
      Change the message contained in this text entity without creating a new object. This call will generate a new view for the entity.
      Parameters:
      message - the new message to be displayed