aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech/api/gui')
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container.java6
-rw-r--r--src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java3
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java3
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container_BasicTank.java3
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java10
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java4
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java2
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUICover.java4
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIScreen.java10
-rw-r--r--src/main/java/gregtech/api/gui/GT_Slot_Holo.java6
-rw-r--r--src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java3
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java12
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java2
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java6
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java2
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java2
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java20
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java55
-rw-r--r--src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java16
19 files changed, 85 insertions, 84 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java
index e2ef6fd658..851e1f6461 100644
--- a/src/main/java/gregtech/api/gui/GT_Container.java
+++ b/src/main/java/gregtech/api/gui/GT_Container.java
@@ -18,9 +18,9 @@ import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * Main Container-Class, used for all my GUIs
+ * The main Container class. It is used for all GregTech GUIs.
+ * <p>
+ * Never include this file in your mod - it will break your modpack.
*/
public class GT_Container extends Container {
diff --git a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
index af1393cbfb..a77f376e00 100644
--- a/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
+++ b/src/main/java/gregtech/api/gui/GT_ContainerMetaTile_Machine.java
@@ -93,8 +93,7 @@ public class GT_ContainerMetaTile_Machine extends GT_Container {
mActive = mTileEntity.isActive() ? 1 : 0;
mTimer++;
- for (ICrafting crafter : this.crafters) {
- ICrafting player = crafter;
+ for (ICrafting player : this.crafters) {
if (mTimer % 500 == 10 || oEnergy != mEnergy) {
player.sendProgressBarUpdate(this, 0, mEnergy & 65535);
player.sendProgressBarUpdate(this, 1, mEnergy >>> 16);
diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java
index 479c021d89..5d6c1c4126 100644
--- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java
+++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java
@@ -251,8 +251,7 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank {
mItemTransfer = getMachine().mItemTransfer;
mStuttering = getMachine().mStuttering;
- for (ICrafting crafter : this.crafters) {
- ICrafting player = crafter;
+ for (ICrafting player : this.crafters) {
player.sendProgressBarUpdate(this, 102, mFluidTransfer ? 1 : 0);
player.sendProgressBarUpdate(this, 103, mItemTransfer ? 1 : 0);
player.sendProgressBarUpdate(this, 104, mStuttering ? 1 : 0);
diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
index 08e8e6eb00..403de4bab5 100644
--- a/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
+++ b/src/main/java/gregtech/api/gui/GT_Container_BasicTank.java
@@ -77,8 +77,7 @@ public class GT_Container_BasicTank extends GT_ContainerMetaTile_Machine {
}
public void sendProgressBar() {
- for (ICrafting crafter : this.crafters) {
- ICrafting player = crafter;
+ for (ICrafting player : this.crafters) {
if (mTimer % 500 == 0 || oContent != mContent) {
player.sendProgressBarUpdate(this, 100, mContent & 65535);
player.sendProgressBarUpdate(this, 101, mContent >>> 16);
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
index a72e9737ee..df395858a9 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
@@ -15,10 +15,14 @@ import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GT_Values;
-import gregtech.api.gui.widgets.*;
+import gregtech.api.gui.widgets.GT_GuiCoverTabLine;
+import gregtech.api.gui.widgets.GT_GuiIcon;
+import gregtech.api.gui.widgets.GT_GuiSlotTooltip;
import gregtech.api.gui.widgets.GT_GuiTabLine.DisplayStyle;
import gregtech.api.gui.widgets.GT_GuiTabLine.GT_GuiTabIconSet;
import gregtech.api.gui.widgets.GT_GuiTabLine.GT_ITabRenderer;
+import gregtech.api.gui.widgets.GT_GuiTooltip;
+import gregtech.api.gui.widgets.GT_GuiTooltipManager;
import gregtech.api.gui.widgets.GT_GuiTooltipManager.GT_IToolTipRenderer;
import gregtech.api.interfaces.IConfigurationCircuitSupport;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -38,8 +42,8 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer implements
public final GT_ContainerMetaTile_Machine mContainer;
- protected GT_GuiTooltipManager mTooltipManager = new GT_GuiTooltipManager();
- protected GT_TooltipDataCache mTooltipCache = new GT_TooltipDataCache();
+ protected final GT_GuiTooltipManager mTooltipManager = new GT_GuiTooltipManager();
+ protected final GT_TooltipDataCache mTooltipCache = new GT_TooltipDataCache();
private static final String GHOST_CIRCUIT_TOOLTIP = "GT5U.machines.select_circuit.tooltip";
private final int guiTint;
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
index f610f6cf14..8873152137 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_BasicMachine.java
@@ -2,7 +2,7 @@ package gregtech.api.gui;
import static gregtech.api.enums.Mods.GregTech;
-import java.awt.*;
+import java.awt.Rectangle;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.StatCollector;
@@ -137,7 +137,7 @@ public class GT_GUIContainer_BasicMachine extends GT_GUIContainerMetaTile_Machin
/**
* Apply proper coloration to a machine's power tier short name
*
- * @param machineTier
+ * @param machineTier machine tier
* @return colored power tier short name
*/
private String powerTierName(byte machineTier) {
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
index 66c5156190..3d9515b19a 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
@@ -20,7 +20,7 @@ import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbin
@Deprecated
public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
- String mName;
+ final String mName;
private final int textColor = this.getTextColorOrDefault("text", 0xFAFAFF),
textColorTitle = this.getTextColorOrDefault("title", 0xFAFAFF);
diff --git a/src/main/java/gregtech/api/gui/GT_GUICover.java b/src/main/java/gregtech/api/gui/GT_GUICover.java
index 791bcc0c73..5729ada685 100644
--- a/src/main/java/gregtech/api/gui/GT_GUICover.java
+++ b/src/main/java/gregtech/api/gui/GT_GUICover.java
@@ -28,8 +28,8 @@ public abstract class GT_GUICover extends GT_GUIScreen {
/**
* The parent GUI to exit to. -1 is ignored.
- *
- * @param parentGuiId
+ *
+ * @param parentGuiId parent GUI ID
*/
public void setParentGuiId(int parentGuiId) {
this.parentGuiId = parentGuiId;
diff --git a/src/main/java/gregtech/api/gui/GT_GUIScreen.java b/src/main/java/gregtech/api/gui/GT_GUIScreen.java
index 4f15e2e607..2ff2973792 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIScreen.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIScreen.java
@@ -26,13 +26,13 @@ import gregtech.api.interfaces.IGuiScreen;
@Deprecated
public abstract class GT_GUIScreen extends GuiScreen implements GT_IToolTipRenderer, IGuiScreen {
- protected GT_GuiTooltipManager ttManager = new GT_GuiTooltipManager();
+ protected final GT_GuiTooltipManager ttManager = new GT_GuiTooltipManager();
protected int gui_width = 176;
protected int gui_height = 107;
protected int guiTop, guiLeft;
- protected boolean drawButtons = true;
- protected ResourceLocation mGUIbackgroundLocation;
+ protected final boolean drawButtons = true;
+ protected final ResourceLocation mGUIbackgroundLocation;
private GuiButton selectedButton;
private final GT_GUIColorOverride colorOverride;
@@ -42,8 +42,8 @@ public abstract class GT_GUIScreen extends GuiScreen implements GT_IToolTipRende
public String header;
public GT_GuiFakeItemButton headerIcon;
- protected List<IGuiElement> elements = new ArrayList<>();
- protected List<GT_GuiIntegerTextBox> textBoxes = new ArrayList<>();
+ protected final List<IGuiElement> elements = new ArrayList<>();
+ protected final List<GT_GuiIntegerTextBox> textBoxes = new ArrayList<>();
public GT_GUIScreen(int width, int height, String header) {
this.gui_width = width;
diff --git a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java
index 47bd5ceef3..9b7b75f0b2 100644
--- a/src/main/java/gregtech/api/gui/GT_Slot_Holo.java
+++ b/src/main/java/gregtech/api/gui/GT_Slot_Holo.java
@@ -51,9 +51,9 @@ public class GT_Slot_Holo extends Slot {
}
/**
- * Whether this slot should be ignored in event processing, for example highlight the slot on mouseOver
- *
- * @param enabled
+ * Sets if this slot should be ignored in event-processing. For example, highlight the slot on mouseOver.
+ *
+ * @param enabled if the slot should be enabled
*/
public void setEnabled(boolean enabled) {
mEnabled = enabled;
diff --git a/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java b/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java
index 87833da7b3..393b8431e2 100644
--- a/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java
+++ b/src/main/java/gregtech/api/gui/modularui/IDataFollowerWidget.java
@@ -15,7 +15,7 @@ import gregtech.common.gui.modularui.widget.DataControllerWidget;
* recipe mode. <br>
* No widgets implementing this interface should not sync; Instead, {@link DataControllerWidget} will sync data, either
* when this widget triggers update on client or data update is detected on server.
- *
+ *
* @param <T> Data type stored in the parent widget
* @param <U> State type stored in this widget
* @see DataControllerWidget
@@ -45,5 +45,6 @@ public interface IDataFollowerWidget<T, U> {
/**
* Called on {@link Widget#onPostInit}.
*/
+ @SuppressWarnings("OverrideOnly") // So IntelliJ doesn't warn about the Widget#onPostInit link in the javadoc
default void onPostInit() {}
}
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
index d52b09b9d5..6f4eb0e2c2 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiCoverTabLine.java
@@ -103,8 +103,8 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
/**
* Add the cover on this side of the IGregTechTileEntity to the tabs
*
- * @param side
- * @param cover
+ * @param side side to apply the cover to
+ * @param cover cover to add
*/
private void addCoverToTabs(ForgeDirection side, ItemStack cover) {
final boolean enabled = this.tile.getCoverBehaviorAtSideNew(side)
@@ -117,9 +117,9 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
/**
* Decorate the cover's tooltips according to the side it's on and on whether the tab is enabled or not
*
- * @param side
- * @param cover
- * @param enabled
+ * @param side side
+ * @param cover cover which tooltip to decorate
+ * @param enabled if the tab is enabled
* @return This cover tab's tooltip
*/
private String[] getTooltipForCoverTab(ForgeDirection side, ItemStack cover, boolean enabled) {
@@ -135,7 +135,7 @@ public class GT_GuiCoverTabLine extends GT_GuiTabLine {
/**
* Get the translated name for a side of the IGregTechTileEntity
*
- * @param side
+ * @param side side of the entity
* @return translated name for a side of the IGregTechTileEntity
*/
private String getSideDescription(ForgeDirection side) {
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java
index b534359cac..9f4287a65b 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiFakeItemButton.java
@@ -1,6 +1,6 @@
package gregtech.api.gui.widgets;
-import java.awt.*;
+import java.awt.Rectangle;
import java.util.List;
import net.minecraft.client.Minecraft;
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java
index 46d213f0f6..66ab27356e 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIcon.java
@@ -113,16 +113,16 @@ public enum GT_GuiIcon implements IGuiIcon {
/**
* This is intended to enable addon mods to register additional textures. They can then add to this enum using
- * EnumHelper.addEnum or by creating your their enum that implements IGuiIcon (still requires adding a texture here)
+ * EnumHelper.addEnum or by creating their enum that implements IGuiIcon (still requires adding a texture here)
*
- * @param location
+ * @param location location of the texture to add
*/
public static void addTextures(ResourceLocation... location) {
if (location == null || location.length == 0) return;
int startIndex = TEXTURES.length;
TEXTURES = Arrays.copyOf(TEXTURES, location.length);
- System.arraycopy(location, 0, TEXTURES, startIndex + 0, location.length);
+ System.arraycopy(location, 0, TEXTURES, startIndex, location.length);
}
@Override
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java
index 62d6648e73..d4bfe31404 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIconButton.java
@@ -17,7 +17,7 @@ public class GT_GuiIconButton extends GuiButton implements IGuiScreen.IGuiElemen
protected GT_GuiIcon icon;
private final int x0;
private final int y0;
- protected IGuiScreen gui;
+ protected final IGuiScreen gui;
private GT_GuiTooltip tooltip;
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
index ef5348cf77..2d3c7374bd 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiIntegerTextBox.java
@@ -1,6 +1,6 @@
package gregtech.api.gui.widgets;
-import java.awt.*;
+import java.awt.Rectangle;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiTextField;
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java
index 151eba2936..d06c2bd2eb 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTab.java
@@ -34,7 +34,7 @@ public class GT_GuiTab {
* A tab to be attached to a tab line
*
* @param gui IGregTechTileEntity the tab line this tab belongs to is attached to
- * @param id both the ID and position in the tab line of this tab
+ * @param id both the ID and position in the tab line of this tab. Not used, kept for compatibility.
* @param bounds bounds of this tab
* @param tabBackground set of background textures
* @param item item to draw atop the background texture, not colored
@@ -62,7 +62,7 @@ public class GT_GuiTab {
/**
* Set this tab's tooltip text
*
- * @param text
+ * @param text text to set
* @return This tab for chaining
*/
public GT_GuiTab setTooltipText(String... text) {
@@ -85,9 +85,9 @@ public class GT_GuiTab {
/**
* Draw the background texture for this tab
*
- * @param mouseX
- * @param mouseY
- * @param parTicks
+ * @param mouseX not used, likely kept for backward compatibility
+ * @param mouseY not used, likely kept for backward compatibility
+ * @param parTicks not used, likely kept for backward compatibility
*/
public void drawBackground(int mouseX, int mouseY, float parTicks) {
if (this.visible) {
@@ -106,9 +106,9 @@ public class GT_GuiTab {
/**
* Draw overlay textures and items atop the background texture
*
- * @param mouseX
- * @param mouseY
- * @param parTicks
+ * @param mouseX X mouse coordinate
+ * @param mouseY Y mouse coordinate
+ * @param parTicks not used, likely kept for backward compatibility
*/
public void drawOverlays(int mouseX, int mouseY, float parTicks) {
this.mousedOver = bounds.contains(mouseX, mouseY);
@@ -165,8 +165,8 @@ public class GT_GuiTab {
/**
* Reposition this tab on the screen
*
- * @param xPos
- * @param yPos
+ * @param xPos X tab coordinate
+ * @param yPos Y tab coordinate
*/
public void setPosition(int xPos, int yPos) {
this.bounds = new Rectangle(xPos, yPos, bounds.width, bounds.height);
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java
index 74145463b3..950478cdfa 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTabLine.java
@@ -86,7 +86,8 @@ public class GT_GuiTabLine {
private final DisplayStyle yDir;
// Whether to display on the right side of the GT_ITabRenderer instead of left
- protected boolean flipHorizontally, visible;
+ protected final boolean flipHorizontally;
+ protected final boolean visible;
private final GT_GuiTabIconSet tabBackground;
private final GT_ITabRenderer gui;
@@ -128,10 +129,10 @@ public class GT_GuiTabLine {
/**
* Creates a new tab at the specified position with the given parameters. This class handles the positioning.
*
- * @param tabId
- * @param item
- * @param overlay
- * @param text
+ * @param tabId tab ID
+ * @param item item to draw atop the background texture, not colored
+ * @param overlay texture to draw atop the background texture, not colored
+ * @param text tooltip of this tab
*/
public void setTab(int tabId, ItemStack item, IGuiIcon overlay, String[] text) {
mTabs[tabId] = new GT_GuiTab(
@@ -148,8 +149,8 @@ public class GT_GuiTabLine {
/**
* Get the bounds a given tab should occupy
*
- * @param tabId
- * @return
+ * @param tabId tab ID
+ * @return tab bounds
*/
protected Rectangle getBoundsForTab(int tabId) {
return new Rectangle(getTabX(tabId), getTabY(tabId), this.tabWidth, this.tabHeight);
@@ -158,12 +159,12 @@ public class GT_GuiTabLine {
/**
* Enable or disable a tab. Disabled tabs have a dark background.
*
- * @param tabId
- * @param value
+ * @param tabId tab ID
+ * @param enable true to enable, false to disable
*/
- public void setTabEnabled(int tabId, boolean value) {
+ public void setTabEnabled(int tabId, boolean enable) {
if (mTabs[tabId] != null) {
- mTabs[tabId].enabled = value;
+ mTabs[tabId].enabled = enable;
}
}
@@ -172,8 +173,6 @@ public class GT_GuiTabLine {
* drawScreen.
*
* @param parTicks
- * @param mouseX
- * @param mouseY
*/
public void drawTabs(float parTicks, int mouseX, int mouseY) {
if (this.visible) {
@@ -189,9 +188,9 @@ public class GT_GuiTabLine {
/**
* Draw the tab's backgrounds first
*
- * @param parTicks
- * @param mouseX
- * @param mouseY
+ * @param parTicks not used, likely kept for compatibility
+ * @param mouseX mouse X position
+ * @param mouseY mouse Y position
*/
protected void drawOverlays(float parTicks, int mouseX, int mouseY) {
for (GT_GuiTab mTab : mTabs) {
@@ -204,9 +203,9 @@ public class GT_GuiTabLine {
/**
* Draw anything that overlays the tab's background texture
*
- * @param parTicks
- * @param mouseX
- * @param mouseY
+ * @param parTicks not used, likely kept for compatibility
+ * @param mouseX mouse X position
+ * @param mouseY mouse Y position
*/
protected void drawBackground(float parTicks, int mouseX, int mouseY) {
for (GT_GuiTab mTab : mTabs) {
@@ -219,9 +218,9 @@ public class GT_GuiTabLine {
/**
* Call tabClick for every tab that was clicked. GT_ITabRenderer must call this method on mouseClicked.
*
- * @param mouseX
- * @param mouseY
- * @param mouseButton
+ * @param mouseX mouse X position
+ * @param mouseY mouse Y position
+ * @param mouseButton which mouse button was used to click
*/
public void onMouseClicked(int mouseX, int mouseY, int mouseButton) {
for (int tabId = 0; tabId < mTabs.length; tabId++) {
@@ -236,8 +235,8 @@ public class GT_GuiTabLine {
/**
* Act on a tab being clicked.
*
- * @param tabId
- * @param mouseButton
+ * @param tabId tab ID
+ * @param mouseButton which mouse button was used to click
*/
protected void tabClicked(int tabId, int mouseButton) {}
@@ -255,8 +254,8 @@ public class GT_GuiTabLine {
/**
* Get the proper X position for a given tab
*
- * @param tabId
- * @return
+ * @param tabId tab ID
+ * @return X position of the tab
*/
private int getTabX(int tabId) {
return this.gui.getGuiLeft() + (flipHorizontally ? (gui.getXSize() - tabLineLeft - tabWidth) : tabLineLeft)
@@ -266,8 +265,8 @@ public class GT_GuiTabLine {
/**
* Get the proper Y position for a given tab
*
- * @param tabId
- * @return
+ * @param tabId tab ID
+ * @return Y position of the tab
*/
private int getTabY(int tabId) {
return this.gui.getGuiTop() + tabLineTop + (tabId * (tabHeight + tabSpacing) * yDir.getValue());
diff --git a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java
index 326e744382..fe20b2b57a 100644
--- a/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java
+++ b/src/main/java/gregtech/api/gui/widgets/GT_GuiTooltip.java
@@ -11,7 +11,7 @@ import gregtech.api.util.GT_TooltipDataCache.TooltipData;
public class GT_GuiTooltip {
- protected Rectangle bounds;
+ protected final Rectangle bounds;
protected TooltipData data;
private List<String> displayedText;
public boolean enabled = true;
@@ -20,8 +20,8 @@ public class GT_GuiTooltip {
* Used to create a tooltip that will appear over the specified bounds. This will initially be a "static" tooltip
* that doesn't respect verbosity levels or respond to the shift key.
*
- * @param bounds
- * @param text
+ * @param bounds tooltip bounds
+ * @param text tooltip text
*/
public GT_GuiTooltip(Rectangle bounds, String... text) {
this.bounds = bounds;
@@ -32,8 +32,8 @@ public class GT_GuiTooltip {
* Used to create a tooltip that will appear over the specified bounds. This will initially be a "dynamic" tooltip
* that respects verbosity levels and responds to the shift key.
*
- * @param bounds
- * @param data
+ * @param bounds tooltip bounds
+ * @param data tooltip data
*/
public GT_GuiTooltip(Rectangle bounds, TooltipData data) {
this.bounds = bounds;
@@ -69,7 +69,7 @@ public class GT_GuiTooltip {
/**
* Used to set a "static" tooltip that doesn't respect verbosity levels or respond to the shift key
*
- * @param text
+ * @param text tooltip text
*/
public void setToolTipText(String... text) {
this.data = formatTooltip(text);
@@ -79,7 +79,7 @@ public class GT_GuiTooltip {
/**
* Used to set a "dynamic" tooltip that respects verbosity levels and responds to the shift key
*
- * @param data
+ * @param data tooltip data
*/
public void setToolTipText(TooltipData data) {
// Trust that the tooltips have already been formatted and colored, just make sure it has no nulls
@@ -89,7 +89,7 @@ public class GT_GuiTooltip {
/**
* Apply tooltip colors in case the text doesn't contain them and return as tooltip data
*
- * @param text
+ * @param text text to apply the colors to
* @return colored tooltip lines as list
*/
protected TooltipData formatTooltip(String[] text) {