// automatically generated by the FlatBuffers compiler, do not modify

package AllWatchSerialize;

import java.nio.*;
import java.lang.*;
import java.util.*;
import com.google.flatbuffers.*;

@SuppressWarnings("unused")
public final class TextAttributes extends Table {
  public static TextAttributes getRootAsTextAttributes(ByteBuffer _bb) { return getRootAsTextAttributes(_bb, new TextAttributes()); }
  public static TextAttributes getRootAsTextAttributes(ByteBuffer _bb, TextAttributes obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); }
  public void __init(int _i, ByteBuffer _bb) { bb_pos = _i; bb = _bb; }
  public TextAttributes __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }

  public short fontSize() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) : 0; }
  public String fontFamily() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; }
  public ByteBuffer fontFamilyAsByteBuffer() { return __vector_as_bytebuffer(6, 1); }
  public ByteBuffer fontFamilyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); }
  public String text() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; }
  public ByteBuffer textAsByteBuffer() { return __vector_as_bytebuffer(8, 1); }
  public ByteBuffer textInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); }
  public int color() { int o = __offset(10); return o != 0 ? bb.getInt(o + bb_pos) : 0; }

  public static int createTextAttributes(FlatBufferBuilder builder,
      short fontSize,
      int fontFamilyOffset,
      int textOffset,
      int color) {
    builder.startObject(4);
    TextAttributes.addColor(builder, color);
    TextAttributes.addText(builder, textOffset);
    TextAttributes.addFontFamily(builder, fontFamilyOffset);
    TextAttributes.addFontSize(builder, fontSize);
    return TextAttributes.endTextAttributes(builder);
  }

  public static void startTextAttributes(FlatBufferBuilder builder) { builder.startObject(4); }
  public static void addFontSize(FlatBufferBuilder builder, short fontSize) { builder.addShort(0, fontSize, 0); }
  public static void addFontFamily(FlatBufferBuilder builder, int fontFamilyOffset) { builder.addOffset(1, fontFamilyOffset, 0); }
  public static void addText(FlatBufferBuilder builder, int textOffset) { builder.addOffset(2, textOffset, 0); }
  public static void addColor(FlatBufferBuilder builder, int color) { builder.addInt(3, color, 0); }
  public static int endTextAttributes(FlatBufferBuilder builder) {
    int o = builder.endObject();
    return o;
  }
}

