no message

This commit is contained in:
2024-10-09 22:21:57 +03:00
parent 54c80c516b
commit 6252af944e
699 changed files with 2634 additions and 1997 deletions

View File

@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="_VisualDVM.GlobalData.Machine.UI.MachineFields">
<grid id="27dc6" binding="content" layout-manager="GridLayoutManager" row-count="5" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="20" y="20" width="500" height="400"/>
</constraints>
<properties/>
<border type="none"/>
<children>
<component id="1bb3c" class="javax.swing.JTextField" binding="tfName" custom-create="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<vspacer id="aac20">
<constraints>
<grid row="4" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="44036" class="javax.swing.JTextField" binding="tfAddress" custom-create="true">
<constraints>
<grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="a00bb" class="javax.swing.JSpinner" binding="sPort">
<constraints>
<grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties/>
</component>
<component id="ee3e1" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="имя"/>
</properties>
</component>
<component id="22dab" class="javax.swing.JLabel">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="адрес"/>
</properties>
</component>
<component id="2dde3" class="javax.swing.JLabel">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="порт"/>
</properties>
</component>
<component id="9d873" class="javax.swing.JLabel">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<font name="Times New Roman" size="16" style="2"/>
<text value="тип"/>
</properties>
</component>
<component id="7aab4" class="javax.swing.JComboBox" binding="cbMachineType" custom-create="true">
<constraints>
<grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<toolTipText value="выберите тип машины"/>
</properties>
</component>
</children>
</grid>
</form>

View File

@@ -0,0 +1,43 @@
package _VisualDVM.GlobalData.Machine.UI;
import Common.Visual.TextField.StyledTextField;
import Common.Visual.Windows.Dialog.DialogFields;
import _VisualDVM.GlobalData.Machine.MachineType;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class MachineFields implements DialogFields {
private static final String localName = "этот компьютер";
public JTextField tfName;
public JTextField tfAddress;
public JSpinner sPort;
public JPanel content;
public JComboBox<MachineType> cbMachineType;
public MachineFields() {
sPort.setModel(new SpinnerNumberModel(22, 1, 65535, 1));
cbMachineType.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if ((cbMachineType.getSelectedItem() != null) && (cbMachineType.getSelectedItem().equals(MachineType.Local))) {
tfName.setText(localName);
tfAddress.setText(localName);
}
}
});
}
private void createUIComponents() {
// TODO: place custom component creation code here
tfName = new StyledTextField();
tfAddress = new StyledTextField();
//-
cbMachineType = new JComboBox<>();
cbMachineType.addItem(MachineType.Server);
cbMachineType.addItem(MachineType.MVS_cluster);
cbMachineType.addItem(MachineType.Local);
}
@Override
public Component getContent() {
return content;
}
}