3. Уборка и красота
This commit is contained in:
parent
7796905b0e
commit
b564eb8ff4
@ -1,9 +1,8 @@
|
||||
import java.awt.*;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
public class Delegator<T extends DrawingArmoredCar> {
|
||||
public class Delegator<T> {
|
||||
private HashMap<Method, Object> methods = new HashMap<>();
|
||||
|
||||
public void add(Method method_ref, Object consumer) {
|
||||
|
@ -42,17 +42,23 @@
|
||||
</component>
|
||||
<component id="ce0c6" class="javax.swing.JLabel" binding="labelBaseColor">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="60" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<text value="Цвет"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="e8476" class="javax.swing.JLabel" binding="labelDopColor">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="60" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<text value="Доп. Цвет"/>
|
||||
</properties>
|
||||
</component>
|
||||
@ -102,6 +108,7 @@
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="11"/>
|
||||
<text value="Скорость:"/>
|
||||
</properties>
|
||||
</component>
|
||||
@ -134,25 +141,34 @@
|
||||
</grid>
|
||||
<component id="486f2" class="javax.swing.JLabel" binding="labelDoubleCaterpillar">
|
||||
<constraints>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="-1" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<text value="Двойные"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="287da" class="javax.swing.JLabel" binding="labelSimpleCaterpillar">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="-1" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<text value="Обычные"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="61c17" class="javax.swing.JLabel" binding="labelCrossCaterpillar">
|
||||
<constraints>
|
||||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="-1" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<text value="Крестики"/>
|
||||
</properties>
|
||||
</component>
|
||||
@ -166,17 +182,24 @@
|
||||
<children>
|
||||
<component id="88d7e" class="javax.swing.JLabel" binding="labelModifiedObject">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false">
|
||||
<minimum-size width="80" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<text value="Продвинутый"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="e9351" class="javax.swing.JLabel" binding="labelSimpleObject">
|
||||
<constraints>
|
||||
<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"/>
|
||||
<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">
|
||||
<minimum-size width="80" height="30"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties>
|
||||
<horizontalAlignment value="0"/>
|
||||
<horizontalTextPosition value="11"/>
|
||||
<text value="Простой"/>
|
||||
</properties>
|
||||
</component>
|
||||
@ -223,7 +246,7 @@
|
||||
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<text value="Количество катков"/>
|
||||
<text value="Количество катков:"/>
|
||||
</properties>
|
||||
</component>
|
||||
</children>
|
||||
|
@ -1,13 +1,9 @@
|
||||
import javax.swing.*;
|
||||
import javax.swing.border.LineBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.datatransfer.UnsupportedFlavorException;
|
||||
import java.awt.dnd.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.MouseAdapter;
|
||||
import java.awt.event.MouseEvent;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class FormArmoredCarConfig extends JDialog{
|
||||
@ -79,7 +75,8 @@ public class FormArmoredCarConfig extends JDialog{
|
||||
|
||||
|
||||
buttonOk.addActionListener(e -> {
|
||||
delegator.invoke(armoredCar);
|
||||
if (delegator != null)
|
||||
delegator.invoke(armoredCar);
|
||||
dispose();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user