Skip to content

Commit 93f8a11

Browse files
committed
[Build] Remove lomok from imgui-app
1 parent 423612c commit 93f8a11

File tree

6 files changed

+64
-13
lines changed

6 files changed

+64
-13
lines changed

config/checkstyle/suppressions.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
<suppress checks="ParameterNumber" files="[\\/]imgui[\\/]"/>
1313
<suppress checks="FileLength" files="[\\/]imgui[\\/]"/>
1414
<suppress checks="FinalParameters" files="ImGui.java"/>
15+
<suppress checks="DesignForExtension" files="[\\/]imgui[\\/]app[\\/]"/>
1516
</suppressions>

imgui-app/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
plugins {
22
id 'java-library'
3-
id 'io.freefair.lombok' version '6.0.0-m2'
43
id 'checkstyle'
54
id 'maven-publish'
65
id 'signing'

imgui-app/lombok.config

Lines changed: 0 additions & 2 deletions
This file was deleted.

imgui-app/src/main/java/imgui/app/Color.java

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package imgui.app;
22

3-
import lombok.Data;
4-
import lombok.NoArgsConstructor;
3+
import java.util.Arrays;
54

65
/**
76
* Object for color data.
87
*/
9-
@Data
10-
@NoArgsConstructor
118
public class Color implements Cloneable {
129
private final float[] data = new float[4];
1310

11+
public Color() {
12+
}
13+
1414
public Color(final float[] color) {
1515
set(color);
1616
}
@@ -49,6 +49,30 @@ public final float getAlpha() {
4949
return data[3];
5050
}
5151

52+
@Override
53+
public boolean equals(final Object o) {
54+
if (this == o) {
55+
return true;
56+
}
57+
if (o == null || getClass() != o.getClass()) {
58+
return false;
59+
}
60+
final Color color = (Color) o;
61+
return Arrays.equals(data, color.data);
62+
}
63+
64+
@Override
65+
public int hashCode() {
66+
return Arrays.hashCode(data);
67+
}
68+
69+
@Override
70+
public String toString() {
71+
return "Color{"
72+
+ "data=" + Arrays.toString(data)
73+
+ '}';
74+
}
75+
5276
/**
5377
* Method to clone Color instance.
5478
*

imgui-app/src/main/java/imgui/app/Configuration.java

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
package imgui.app;
22

3-
import lombok.Data;
4-
53
/**
64
* Data class to provide basic information about the window. Like, the title name etc.
75
*/
8-
@Data
96
public class Configuration {
107
/**
118
* Application title.
@@ -23,4 +20,36 @@ public class Configuration {
2320
* When true, application will be maximized by default.
2421
*/
2522
private boolean fullScreen = false;
23+
24+
public String getTitle() {
25+
return title;
26+
}
27+
28+
public void setTitle(final String title) {
29+
this.title = title;
30+
}
31+
32+
public int getWidth() {
33+
return width;
34+
}
35+
36+
public void setWidth(final int width) {
37+
this.width = width;
38+
}
39+
40+
public int getHeight() {
41+
return height;
42+
}
43+
44+
public void setHeight(final int height) {
45+
this.height = height;
46+
}
47+
48+
public boolean isFullScreen() {
49+
return fullScreen;
50+
}
51+
52+
public void setFullScreen(final boolean fullScreen) {
53+
this.fullScreen = fullScreen;
54+
}
2655
}

imgui-app/src/main/java/imgui/app/Window.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public abstract class Window {
4242
*
4343
* @param config configuration object with basic window information
4444
*/
45-
protected final void init(final Configuration config) {
45+
protected void init(final Configuration config) {
4646
initWindow(config);
4747
initImGui(config);
4848
imGuiGlfw.init(handle, true);
@@ -52,7 +52,7 @@ protected final void init(final Configuration config) {
5252
/**
5353
* Method to dispose all used application resources and destroy its window.
5454
*/
55-
protected final void dispose() {
55+
protected void dispose() {
5656
imGuiGl3.dispose();
5757
imGuiGlfw.dispose();
5858
disposeImGui();
@@ -139,7 +139,7 @@ protected void postProcess() {
139139
/**
140140
* Main application loop.
141141
*/
142-
protected final void run() {
142+
protected void run() {
143143
while (!GLFW.glfwWindowShouldClose(handle)) {
144144
startFrame();
145145
preProcess();

0 commit comments

Comments
 (0)