public void display(Element listBoxItem, ListBoxMessages_Bucket item) {
    final Element index = listBoxItem.findElementByName(CHAT_LINE_INDEX);
    if (index == null) return;
    final TextRenderer indexRenderer = index.getRenderer(TextRenderer.class);

    final Element unit = listBoxItem.findElementByName(CHAT_LINE_UNIT);
    if (unit == null) return;
    final TextRenderer unitRenderer = unit.getRenderer(TextRenderer.class);

    final Element sizeCapacity = listBoxItem.findElementByName(CHAT_LINE_SIZECAPACITY);
    if (sizeCapacity == null) return;
    final TextRenderer sizeCapacityRenderer = sizeCapacity.getRenderer(TextRenderer.class);

    final Element partAssigned = listBoxItem.findElementByName(CHAT_LINE_PARTASSIGNED);
    if (partAssigned == null) return;
    final TextRenderer partAssignedRenderer = partAssigned.getRenderer(TextRenderer.class);

    final Element unitsToArriveRemove =
        listBoxItem.findElementByName(CHAT_LINE_UNITSTOARRIVEREMOVE);
    if (unitsToArriveRemove == null) return;
    final TextRenderer unitsToArriveRemoveRenderer =
        unitsToArriveRemove.getRenderer(TextRenderer.class);

    if (item != null) {
      indexRenderer.setText(item.getIndex());
      unitRenderer.setText(item.getUnit());
      sizeCapacityRenderer.setText(item.getSizeCapacity());
      partAssignedRenderer.setText(item.getPartAssigned());
      unitsToArriveRemoveRenderer.setText(item.getUnitsToArriveRemove());
    } else {
      indexRenderer.setText("");
      unitRenderer.setText("");
      sizeCapacityRenderer.setText("");
      partAssignedRenderer.setText("");
      unitsToArriveRemoveRenderer.setText("");
    }
  }
Exemplo n.º 2
0
 /** clears the command menu UI */
 private void clearCommandMenu() {
   for (int i = 0; i < commandTexts.length; i++) {
     TextRenderer textRenderer = commandTexts[i];
     textRenderer.setText("");
   }
 }
Exemplo n.º 3
0
 /** clears the selection menu ui */
 private void clearSelectionMenu() {
   for (int i = 0; i < selectionTexts.length; i++) {
     TextRenderer textRenderer = selectionTexts[i];
     textRenderer.setText("");
   }
 }