refactor(renderer): remove unused getter methods from various control implementations

This commit is contained in:
extio-de
2026-01-04 13:52:23 +01:00
parent 904855ee3e
commit 034604c1d8
10 changed files with 0 additions and 79 deletions

View File

@@ -35,10 +35,6 @@ public abstract class G2DAbstractToggleButtonControlImpl extends G2DButtonContro
}
}
private boolean isToggled() {
return this.control.isToggled();
}
private void setToggled(final boolean toggled) {
if (this.control != null && toggled != this.control.isToggled()) {
this.control.setToggled(toggled);
@@ -46,10 +42,6 @@ public abstract class G2DAbstractToggleButtonControlImpl extends G2DButtonContro
}
}
private boolean isDrawBorder() {
return this.drawBorder;
}
private void setDrawBorder(final boolean draw) {
this.modified |= draw != this.drawBorder;
this.drawBorder = draw;

View File

@@ -106,14 +106,6 @@ public class G2DButtonControlImpl extends G2DBaseControlImpl implements ButtonCo
this.iconResource = iconResource;
}
private StaticResource getIconResource() {
return this.iconResource;
}
private RgbaColor getBackgroundColor() {
return this.backgroundColor;
}
private void setBackgroundColor(final RgbaColor backgroundColor) {
this.modified |= !Objects.equals(this.backgroundColor, backgroundColor);
this.backgroundColor = backgroundColor;

View File

@@ -27,19 +27,11 @@ public class G2DLabelControlImpl extends G2DBaseControlImpl implements LabelCont
}
}
private RgbaColor getBackgroundColor() {
return this.backgroundColor;
}
private void setBackgroundColor(final RgbaColor color) {
this.modified |= (color == null) ? this.backgroundColor != null : !color.equals(this.backgroundColor);
this.backgroundColor = color;
}
private RgbaColor getForegroundColor() {
return this.foregroundColor;
}
private void setForegroundColor(final RgbaColor color) {
this.modified |= (color != null) && !color.equals(this.foregroundColor);
this.foregroundColor = color;

View File

@@ -15,10 +15,6 @@ public class G2DSetFocusControl extends G2DBaseControlImpl implements SetFocusCo
}
}
private String getFocusId() {
return this.focusId;
}
private void setFocusId(final String id) {
this.focusId = id;
}

View File

@@ -1,6 +1,5 @@
package de.extio.game_engine.renderer.g2d.control.impl;
import java.awt.Color;
import java.awt.Component;
import java.awt.EventQueue;
import java.awt.Font;
@@ -258,36 +257,20 @@ public class G2DTableControlImpl extends G2DBaseControlImpl implements TableCont
return super.setControlId(id);
}
private List<Object> getData() {
return this.data;
}
private void setData(final List<Object> data) {
this.data = data;
}
private int getRows() {
return this.rows;
}
private void setRows(final int rows) {
this.rows = rows;
}
private long getVersion() {
return this.version;
}
private void setVersion(final long version) {
this.modified |= version != this.version;
this.dataModified |= version != this.version;
this.version = version;
}
private boolean isFirstColDoubleSize() {
return this.firstColDoubleSize;
}
private void setFirstColDoubleSize(final boolean firstColDoubleSize) {
this.firstColDoubleSize = firstColDoubleSize;
}

View File

@@ -35,10 +35,6 @@ public class G2DTextfieldControlImpl extends G2DBaseControlImpl implements Textf
}
}
private boolean isMultiLine() {
return this.multiLine;
}
private void setMultiLine(final boolean multiLine) {
if (this.textComponent != null) {
throw new UnsupportedOperationException("Multiline property is read-only after initial control creation");
@@ -173,18 +169,10 @@ public class G2DTextfieldControlImpl extends G2DBaseControlImpl implements Textf
}
}
private RgbaColor getBackgroundColor() {
return null;
}
private void setBackgroundColor(final RgbaColor color) {
}
private boolean isReadonly() {
return false;
}
private void setReadonly(final boolean readonly) {
}

View File

@@ -58,19 +58,11 @@ public class G2DTextfieldControlImpl2 extends G2DBaseControlImpl implements Text
});
}
private RgbaColor getBackgroundColor() {
return this.backgroundColor;
}
private void setBackgroundColor(final RgbaColor color) {
this.modified |= (color == null) ? this.backgroundColor != null : !color.equals(this.backgroundColor);
this.backgroundColor = color;
}
private boolean isMultiLine() {
return this.multiLine;
}
private void setMultiLine(final boolean multiLine) {
if (this.textComponent == null) {
this.multiLine = multiLine;
@@ -80,10 +72,6 @@ public class G2DTextfieldControlImpl2 extends G2DBaseControlImpl implements Text
}
}
private boolean isReadonly() {
return this.readonly;
}
private void setReadonly(final boolean readonly) {
this.modified |= readonly != this.readonly;
this.readonly = readonly;

View File

@@ -1,6 +1,5 @@
package de.extio.game_engine.renderer.g2d.control.impl;
import de.extio.game_engine.renderer.g2d.G2DRenderer;
import de.extio.game_engine.renderer.g2d.control.components.CustomButton;
import de.extio.game_engine.renderer.g2d.theme.G2DThemeManager;
import de.extio.game_engine.renderer.model.bo.ControlRenderingBo.ToggleButtonData;

View File

@@ -1,6 +1,5 @@
package de.extio.game_engine.renderer.g2d.control.impl;
import de.extio.game_engine.renderer.g2d.G2DRenderer;
import de.extio.game_engine.renderer.g2d.control.components.CustomWindowCloseButton;
import de.extio.game_engine.renderer.g2d.theme.G2DThemeManager;
import de.extio.game_engine.renderer.model.bo.ControlRenderingBo.WindowCloseButtonControl;

View File

@@ -23,19 +23,11 @@ public class G2DWindowPanelControlImpl extends G2DBaseControlImpl implements Win
}
}
private boolean isThickBorder() {
return this.thickBorder;
}
private void setThickBorder(final boolean thickBorder) {
this.modified |= thickBorder != this.thickBorder;
this.thickBorder = thickBorder;
}
private RgbaColor getColor() {
return this.color;
}
private void setColor(final RgbaColor color) {
this.modified |= (color == null) ? this.color != null : !color.equals(this.color);
this.color = color;