Skip to content

Commit 5ae7ff4

Browse files
committed
feat: Create ui form for CodeXP challenge item
1 parent 5f4b8fa commit 5ae7ff4

File tree

2 files changed

+148
-0
lines changed

2 files changed

+148
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.github.ilovegamecoding.intellijcodexp.form.CodeXPChallengeForm">
3+
<grid id="27dc6" binding="pChallenge" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
4+
<margin top="0" left="0" bottom="0" right="0"/>
5+
<constraints>
6+
<xy x="20" y="20" width="400" height="117"/>
7+
</constraints>
8+
<properties/>
9+
<border type="none"/>
10+
<children>
11+
<component id="24948" class="javax.swing.JLabel" binding="lblChallengeName">
12+
<constraints>
13+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
14+
<preferred-size width="385" height="17"/>
15+
</grid>
16+
</constraints>
17+
<properties>
18+
<font name="Noto Sans SemiBold" size="14" style="0"/>
19+
<text value="Challenge Title"/>
20+
</properties>
21+
</component>
22+
<grid id="74276" layout-manager="GridBagLayout">
23+
<constraints>
24+
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="1" fill="1" indent="0" use-parent-layout="false"/>
25+
</constraints>
26+
<properties/>
27+
<border type="none"/>
28+
<children>
29+
<component id="ff2ca" class="javax.swing.JProgressBar" binding="pbChallengeProgress">
30+
<constraints>
31+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
32+
<gridbag top="0" left="0" bottom="0" right="4" weightx="1.0" weighty="1.0"/>
33+
</constraints>
34+
<properties>
35+
<stringPainted value="false"/>
36+
</properties>
37+
</component>
38+
<grid id="e1ea5" layout-manager="GridBagLayout">
39+
<constraints>
40+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
41+
<gridbag top="0" left="0" bottom="0" right="8" weightx="0.0" weighty="0.0"/>
42+
</constraints>
43+
<properties/>
44+
<border type="none"/>
45+
<children>
46+
<component id="4ea00" class="javax.swing.JLabel" binding="lblChallengeProgress">
47+
<constraints>
48+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
49+
<gridbag weightx="0.0" weighty="0.0"/>
50+
</constraints>
51+
<properties>
52+
<font name="Noto Sans Medium" size="12" style="0"/>
53+
<horizontalAlignment value="4"/>
54+
<horizontalTextPosition value="0"/>
55+
<preferredSize width="32" height="20"/>
56+
<text value="100"/>
57+
</properties>
58+
</component>
59+
<component id="58862" class="javax.swing.JLabel" binding="lblChallengePercentageIcon">
60+
<constraints>
61+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
62+
<gridbag top="0" left="4" bottom="0" right="0" weightx="0.0" weighty="0.0"/>
63+
</constraints>
64+
<properties>
65+
<font name="Noto Sans Medium" size="12" style="0"/>
66+
<horizontalAlignment value="2"/>
67+
<text resource-bundle="messages/CodeXPBundle" key="TEXT_%"/>
68+
</properties>
69+
</component>
70+
</children>
71+
</grid>
72+
</children>
73+
</grid>
74+
<grid id="37efc" layout-manager="GridBagLayout">
75+
<constraints>
76+
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false">
77+
<preferred-size width="385" height="24"/>
78+
</grid>
79+
</constraints>
80+
<properties/>
81+
<border type="none"/>
82+
<children>
83+
<component id="dffc2" class="javax.swing.JLabel" binding="lblChallengeDescription">
84+
<constraints>
85+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
86+
<gridbag weightx="1.0" weighty="1.0"/>
87+
</constraints>
88+
<properties>
89+
<font name="Noto Sans Medium" size="12" style="0"/>
90+
<text value="This is a challenge description"/>
91+
</properties>
92+
</component>
93+
<grid id="5e072" layout-manager="GridBagLayout">
94+
<constraints>
95+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="4" fill="2" indent="0" use-parent-layout="false"/>
96+
<gridbag weightx="0.0" weighty="0.0"/>
97+
</constraints>
98+
<properties/>
99+
<border type="none"/>
100+
<children>
101+
<component id="8f47b" class="javax.swing.JLabel">
102+
<constraints>
103+
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
104+
<gridbag weightx="0.0" weighty="0.0"/>
105+
</constraints>
106+
<properties>
107+
<text resource-bundle="messages/CodeXPBundle" key="TEXT_+"/>
108+
</properties>
109+
</component>
110+
<component id="3ed92" class="javax.swing.JLabel" binding="lblChallengeReward">
111+
<constraints>
112+
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
113+
<gridbag weightx="0.0" weighty="0.0"/>
114+
</constraints>
115+
<properties>
116+
<text value="100"/>
117+
</properties>
118+
</component>
119+
<component id="10c9f" class="javax.swing.JLabel">
120+
<constraints>
121+
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
122+
<gridbag top="0" left="4" bottom="0" right="0" weightx="0.0" weighty="0.0"/>
123+
</constraints>
124+
<properties>
125+
<text resource-bundle="messages/CodeXPBundle" key="TEXT_XP"/>
126+
</properties>
127+
</component>
128+
</children>
129+
</grid>
130+
</children>
131+
</grid>
132+
</children>
133+
</grid>
134+
</form>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.github.ilovegamecoding.intellijcodexp.form;
2+
3+
import javax.swing.*;
4+
5+
public class CodeXPChallengeForm {
6+
public String challengeID;
7+
public JProgressBar pbChallengeProgress;
8+
public JLabel lblChallengeDescription;
9+
public JLabel lblChallengeName;
10+
public JLabel lblChallengeProgress;
11+
public JLabel lblChallengeReward;
12+
public JPanel pChallenge;
13+
public JLabel lblChallengePercentageIcon;
14+
}

0 commit comments

Comments
 (0)