File tree Expand file tree Collapse file tree 6 files changed +64
-13
lines changed Expand file tree Collapse file tree 6 files changed +64
-13
lines changed Original file line number Diff line number Diff line change 12
12
<suppress checks =" ParameterNumber" files =" [\\/]imgui[\\/]" />
13
13
<suppress checks =" FileLength" files =" [\\/]imgui[\\/]" />
14
14
<suppress checks =" FinalParameters" files =" ImGui.java" />
15
+ <suppress checks =" DesignForExtension" files =" [\\/]imgui[\\/]app[\\/]" />
15
16
</suppressions >
Original file line number Diff line number Diff line change 1
1
plugins {
2
2
id ' java-library'
3
- id ' io.freefair.lombok' version ' 6.0.0-m2'
4
3
id ' checkstyle'
5
4
id ' maven-publish'
6
5
id ' signing'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
package imgui .app ;
2
2
3
- import lombok .Data ;
4
- import lombok .NoArgsConstructor ;
3
+ import java .util .Arrays ;
5
4
6
5
/**
7
6
* Object for color data.
8
7
*/
9
- @ Data
10
- @ NoArgsConstructor
11
8
public class Color implements Cloneable {
12
9
private final float [] data = new float [4 ];
13
10
11
+ public Color () {
12
+ }
13
+
14
14
public Color (final float [] color ) {
15
15
set (color );
16
16
}
@@ -49,6 +49,30 @@ public final float getAlpha() {
49
49
return data [3 ];
50
50
}
51
51
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
+
52
76
/**
53
77
* Method to clone Color instance.
54
78
*
Original file line number Diff line number Diff line change 1
1
package imgui .app ;
2
2
3
- import lombok .Data ;
4
-
5
3
/**
6
4
* Data class to provide basic information about the window. Like, the title name etc.
7
5
*/
8
- @ Data
9
6
public class Configuration {
10
7
/**
11
8
* Application title.
@@ -23,4 +20,36 @@ public class Configuration {
23
20
* When true, application will be maximized by default.
24
21
*/
25
22
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
+ }
26
55
}
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public abstract class Window {
42
42
*
43
43
* @param config configuration object with basic window information
44
44
*/
45
- protected final void init (final Configuration config ) {
45
+ protected void init (final Configuration config ) {
46
46
initWindow (config );
47
47
initImGui (config );
48
48
imGuiGlfw .init (handle , true );
@@ -52,7 +52,7 @@ protected final void init(final Configuration config) {
52
52
/**
53
53
* Method to dispose all used application resources and destroy its window.
54
54
*/
55
- protected final void dispose () {
55
+ protected void dispose () {
56
56
imGuiGl3 .dispose ();
57
57
imGuiGlfw .dispose ();
58
58
disposeImGui ();
@@ -139,7 +139,7 @@ protected void postProcess() {
139
139
/**
140
140
* Main application loop.
141
141
*/
142
- protected final void run () {
142
+ protected void run () {
143
143
while (!GLFW .glfwWindowShouldClose (handle )) {
144
144
startFrame ();
145
145
preProcess ();
You can’t perform that action at this time.
0 commit comments