Files
VisualSapfor/src/_VisualDVM/Visual/Windows/ArraysForm.java

135 lines
4.9 KiB
Java
Raw Normal View History

2024-10-09 22:15:56 +03:00
package _VisualDVM.Visual.Windows;
2024-10-09 20:35:18 +03:00
import Common.Visual.TextField.StyledTextField;
import _VisualDVM.Global;
2024-10-22 13:54:56 +03:00
import _VisualDVM.ProjectData.SapforData.Arrays.UI.ProjectArraysForm;
2024-10-09 22:01:19 +03:00
import _VisualDVM.Visual.Interface.ArraysWindow;
2023-09-17 22:13:42 +03:00
import javax.swing.*;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
public class ArraysForm implements ArraysWindow {
2024-10-14 15:19:13 +03:00
public JSplitPane SC8;
2023-09-17 22:13:42 +03:00
private JPanel content;
private JPanel arraysPanel;
private JPanel savedArraysPanel;
private JTextField filterName;
private JLabel arraysMatchesLabel;
private JTextField filterLocationName;
private JTextField filterLocation;
private JTextField filterFile;
private JTextField filterRegion;
private JPanel savedArraysBackground;
2024-10-14 15:19:13 +03:00
public ArraysForm() {
2023-09-17 22:13:42 +03:00
LoadSplitters();
Global.mainModule.getProject().declaratedArrays.mountUI(arraysPanel);
Global.mainModule.getProject().db.savedArrays.mountUI(savedArraysPanel);
2023-09-17 22:13:42 +03:00
//--
2024-10-22 13:54:56 +03:00
filterName.setText(ProjectArraysForm.filterName);
2023-09-17 22:13:42 +03:00
filterName.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterName = filterName.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void removeUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterName = filterName.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void changedUpdate(DocumentEvent e) {
}
});
//-
2024-10-22 13:54:56 +03:00
filterLocation.setText(ProjectArraysForm.filterLocation);
2023-09-17 22:13:42 +03:00
filterLocation.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterLocation = filterLocation.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void removeUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterLocation = filterLocation.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void changedUpdate(DocumentEvent e) {
}
});
//-
2024-10-22 13:54:56 +03:00
filterLocationName.setText(ProjectArraysForm.filterLocationName);
2023-09-17 22:13:42 +03:00
filterLocationName.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterLocationName = filterLocationName.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void removeUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterLocationName = filterLocationName.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void changedUpdate(DocumentEvent e) {
}
});
//-
2024-10-22 13:54:56 +03:00
filterFile.setText(ProjectArraysForm.filterFile);
2023-09-17 22:13:42 +03:00
filterFile.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterFile = filterFile.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void removeUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterFile = filterFile.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void changedUpdate(DocumentEvent e) {
}
});
//-
2024-10-22 13:54:56 +03:00
filterRegion.setText(ProjectArraysForm.filterRegion);
2023-09-17 22:13:42 +03:00
filterRegion.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterRegion = filterRegion.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void removeUpdate(DocumentEvent e) {
2024-10-22 13:54:56 +03:00
ProjectArraysForm.filterRegion = filterRegion.getText();
2023-09-17 22:13:42 +03:00
ShowArrays();
}
@Override
public void changedUpdate(DocumentEvent e) {
}
2024-10-14 15:19:13 +03:00
});
}
2023-09-17 22:13:42 +03:00
@Override
public JPanel getContent() {
return content;
}
@Override
public void ShowArrays() {
Global.mainModule.getProject().declaratedArrays.ShowUI();
Global.mainModule.getProject().db.savedArrays.ShowUI();
2023-09-17 22:13:42 +03:00
}
@Override
public void ShowNoArrays() {
Global.mainModule.getProject().declaratedArrays.ClearUI();
Global.mainModule.getProject().db.savedArrays.ClearUI();
2023-09-17 22:13:42 +03:00
}
private void createUIComponents() {
// TODO: place custom component creation code here
filterName = new StyledTextField();
filterLocationName = new StyledTextField();
filterLocation = new StyledTextField();
filterFile = new StyledTextField();
filterRegion = new StyledTextField();
}
}