Codota Logo
TextData
Code IndexAdd Codota to your IDE (free)

How to use
TextData
in
slimeknights.mantle.client.book.data.element

Best Java code snippets using slimeknights.mantle.client.book.data.element.TextData (Showing top 16 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: SlimeKnights/TinkersConstruct

public void addEntry(String text, PageData link) {
 TextData data = new TextData(text);
 if(link != null) {
  data.action = ProtocolGoToPage.GO_TO_RTN + ":" + link.parent.name + "." + link.name;
 }
 entries.add(data);
}
origin: SlimeKnights/TinkersConstruct

public void addEntry(String text, PageData link) {
 TextData data = new TextData(text);
 if(link != null) {
  data.action = ProtocolGoToPage.GO_TO_RTN + ":" + link.parent.name + "." + link.name;
 }
 entries.add(data);
}
origin: SlimeKnights/TinkersConstruct

public ElementListingCentered(int x, int y, int width, int height, TextData... text) {
 super(x, y, width, height, text);
 this.originalX = this.x;
 this.text = Lists.asList(new TextData(), this.text).toArray(new TextData[this.text.length + 2]);
 this.text[this.text.length - 1] = new TextData();
 this.text[0].color = "dark red";
 this.text[this.text.length - 1].color = "dark red";
}
origin: SlimeKnights/TinkersConstruct

public ElementListingLeft(int x, int y, int width, int height, TextData... text) {
 super(x, y, width, height, text);
 this.text = Lists.asList(new TextData(), this.text).toArray(new TextData[this.text.length + 1]);
 this.text[0].color = "dark red";
}
origin: SlimeKnights/TinkersConstruct

 public void addTitle(ArrayList<BookElement> list, String titleText, boolean dropShadow, int y) {
  TextData title = new TextData(titleText);
  title.scale = 1.2f;
  title.underlined = true;
  title.dropshadow = dropShadow;

  int w = (int) Math.ceil(parent.parent.parent.fontRenderer.getStringWidth(titleText) * title.scale);
  int x = (GuiBook.PAGE_WIDTH - w) / 2;

  list.add(new ElementText(x, y, w, 24, title));
 }
}
origin: SlimeKnights/TinkersConstruct

public static List<TextData> getStatLines(IMaterialStats stats) {
 List<TextData> lineData = new ArrayList<>();
 for(int i = 0; i < stats.getLocalizedInfo().size(); i++) {
  TextData text = new TextData(stats.getLocalizedInfo().get(i));
  text.tooltip = LocUtils.convertNewlines(stats.getLocalizedDesc().get(i)).split("\n");
  lineData.add(text);
  lineData.add(new TextData("\n"));
 }
 return lineData;
}
origin: SlimeKnights/TinkersConstruct

public static List<TextData> getTraitLines(List<ITrait> traits, Material material) {
 List<TextData> lineData = new ArrayList<>();
 for(ITrait trait : traits) {
  TextData text = new TextData(trait.getLocalizedName());
  text.tooltip = LocUtils.convertNewlines(material.getTextColor() + trait.getLocalizedDesc()).split("\n");
  text.color = TextFormatting.DARK_GRAY.getFriendlyName();
  text.underlined = true;
  lineData.add(text);
  lineData.add(new TextData("\n"));
 }
 return lineData;
}
origin: SlimeKnights/TinkersConstruct

TextData head = new TextData(parent.translate("tool.properties"));
head.underlined = true;
list.add(new ElementText(padding, y, 86 - padding, GuiBook.PAGE_HEIGHT - h - 20, head));
 effectData.add(new TextData("\u25CF "));
 effectData.add(new TextData(e));
 effectData.add(new TextData("\n"));
origin: SlimeKnights/TinkersConstruct

TextData head = new TextData(parent.translate("modifier.effect"));
head.underlined = true;
list.add(new ElementText(10, 20 + h, GuiBook.PAGE_WIDTH / 2 - 5, GuiBook.PAGE_HEIGHT - h - 20, head));
 effectData.add(new TextData("\u25CF "));
 effectData.add(new TextData(e));
 effectData.add(new TextData("\n"));
origin: SlimeKnights/TinkersConstruct

@Override
public void build(BookData book, ArrayList<BookElement> list, boolean rightSide) {
 addTitle(list, material.getLocalizedNameColored(), true);
 // the cool tools to the left/right
 addDisplayItems(list, rightSide ? GuiBook.PAGE_WIDTH - 18 : 0);
 int col_margin = 22;
 int top = 15;
 int left = rightSide ? 0 : col_margin;
 int y = top + 10;
 int x = left + 10;
 int w = GuiBook.PAGE_WIDTH / 2 - 10;
 LinkedHashSet<ITrait> allTraits = new LinkedHashSet<>();
 // head stats
 addStatsDisplay(x, y, w, list, allTraits, MaterialTypes.HEAD);
 // handle
 addStatsDisplay(x + w, y, w - 10, list, allTraits, MaterialTypes.HANDLE);
 // extra
 y += 65 + 10 * material.getAllTraitsForStats(MaterialTypes.HEAD).size();
 addStatsDisplay(x, y, w, list, allTraits, MaterialTypes.EXTRA);
 // inspirational quote
 String flavour = parent.parent.parent.strings.get(String.format("%s.flavour", material.getIdentifier()));
 //flavour = "How much wood could a woodchuck chuck if a woodchuck could chuck wood?";
 if(flavour != null) {
  TextData flavourData = new TextData("\"" + flavour + "\"");
  flavourData.italic = true;
  list.add(new ElementText(x + w, y, w - 16, 60, flavourData));
 }
}
origin: SlimeKnights/Mantle

public ElementText(int x, int y, int width, int height, String text) {
 this(x, y, width, height, new TextData(text));
}
origin: SlimeKnights/Mantle

public void addTitle(ArrayList<BookElement> list, String title) {
 TextData tdTitle = new TextData(title);
 tdTitle.underlined = true;
 addTitle(list, new TextData[]{tdTitle});
}
origin: SlimeKnights/Mantle

 @Override
 public void build(BookData book, ArrayList<BookElement> list, boolean rightSide) {
  addTitle(list, "Error");

  TextData[] text = new TextData[1 + (exception != null ? 2 : 0)];
  text[0] = new TextData(errorStage);
  text[0].color = "dark_red";
  text[0].underlined = true;

  if(exception != null) {
   text[1] = new TextData("The following error has occured: ");
   text[1].color = "dark_red";
   text[1].paragraph = true;

   text[2] = new TextData(exception.getMessage() != null ? exception.getMessage() : exception.getClass()
                                                .getSimpleName());
   text[2].color = "dark_red";
   text[2].paragraph = true;
  }

  list.add(new ElementText(0, TITLE_HEIGHT, GuiBook.PAGE_WIDTH, GuiBook.PAGE_HEIGHT - TITLE_HEIGHT, text));
 }
}
origin: SlimeKnights/Mantle

@Override
public void build(BookData book, ArrayList<BookElement> list, boolean rightSide) {
 int x = GuiBook.PAGE_WIDTH / 2 - IMG_SMELTING.width / 2;
 int y = TITLE_HEIGHT;
 TextData tdTitle = new TextData(title);
 tdTitle.underlined = true;
 list.add(new ElementText(0, 0, GuiBook.PAGE_WIDTH, 9, new TextData[]{tdTitle}));
 list.add(new ElementImage(x, y, IMG_SMELTING.width, IMG_SMELTING.height, IMG_SMELTING, book.appearance.slotColor));
 if(input != null && !input.id.equals("")) {
  list.add(new ElementItem(x + INPUT_X, y + INPUT_Y, ITEM_SCALE, input.getItems(), input.action));
 }
 if(result != null && !result.id.equals("")) {
  list.add(new ElementItem(x + RESULT_X, y + RESULT_Y, ITEM_SCALE, result.getItems(), result.action));
 }
 list.add(new ElementItem(x + FUEL_X, y + FUEL_Y, ITEM_SCALE, getFuelsList()));
 if(description != null && description.length > 0) {
  list.add(new ElementText(0, IMG_SMELTING.height + y + 5, GuiBook.PAGE_WIDTH, GuiBook.PAGE_HEIGHT - y - 5, description));
 }
}
origin: SlimeKnights/Mantle

                                       .getPageCount() - (genPages - 1) * ENTRIES_PER_PAGE];
for(int j = 0; j < text.length; j++) {
 text[j] = new TextData((i * ENTRIES_PER_PAGE + j + 1) + ". " + section.pages.get(i * ENTRIES_PER_PAGE + j)
                                       .getTitle());
 text[j].action = "go-to-page-rtn:" + section.name + "." + section.pages.get(i * ENTRIES_PER_PAGE + j).name;
origin: SlimeKnights/Mantle

int resultY = 50;
TextData tdTitle = new TextData(title);
tdTitle.underlined = true;
list.add(new ElementText(0, 0, GuiBook.PAGE_WIDTH, 9, new TextData[]{tdTitle}));
slimeknights.mantle.client.book.data.elementTextData

Most used methods

  • <init>

Popular in Java

  • Updating database using SQL prepared statement
  • runOnUiThread (Activity)
  • getSystemService (Context)
  • onRequestPermissionsResult (Fragment)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • String (java.lang)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JCheckBox (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now