Fix GUI compilation
This commit is contained in:
parent
c506e9860b
commit
ad82361755
7 changed files with 253 additions and 24 deletions
15
build.gradle
15
build.gradle
|
@ -5,19 +5,30 @@ plugins {
|
||||||
group 'fr.frt'
|
group 'fr.frt'
|
||||||
version '1.0-SNAPSHOT'
|
version '1.0-SNAPSHOT'
|
||||||
|
|
||||||
|
jar {
|
||||||
|
manifest {
|
||||||
|
attributes 'Main-Class': 'ProjectionPlanning.Main'
|
||||||
|
}
|
||||||
|
from {
|
||||||
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.projectlombok:lombok:1.18.16'
|
compileOnly 'org.projectlombok:lombok:1.18.16'
|
||||||
|
annotationProcessor 'org.projectlombok:lombok:1.18.16'
|
||||||
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.1'
|
implementation 'org.mariadb.jdbc:mariadb-java-client:2.7.1'
|
||||||
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
|
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
|
||||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.6.0'
|
||||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
|
||||||
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.1'
|
implementation 'io.github.vincenzopalazzo:material-ui-swing:1.1.1'
|
||||||
|
implementation 'com.intellij:forms_rt:7.0.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
useJUnitPlatform()
|
useJUnitPlatform()
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class Agenda extends JPanel {
|
||||||
public void refresh() {
|
public void refresh() {
|
||||||
this.agendaPanel.removeAll();
|
this.agendaPanel.removeAll();
|
||||||
int totalPages[] = dayToPage();
|
int totalPages[] = dayToPage();
|
||||||
if (this.currentPage >= totalPages.length) {
|
if (this.currentPage > totalPages.length) {
|
||||||
this.currentPage = totalPages.length - 1;
|
this.currentPage = totalPages.length - 1;
|
||||||
} else if (this.currentPage < 0) {
|
} else if (this.currentPage < 0) {
|
||||||
this.currentPage = 0;
|
this.currentPage = 0;
|
||||||
|
@ -169,6 +169,7 @@ public class Agenda extends JPanel {
|
||||||
ArrayList<Projection> projections = Projection.getAvailable(competition);
|
ArrayList<Projection> projections = Projection.getAvailable(competition);
|
||||||
for (Projection projection : projections) {
|
for (Projection projection : projections) {
|
||||||
addMovie(projection);
|
addMovie(projection);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,26 +190,27 @@ public class Agenda extends JPanel {
|
||||||
|
|
||||||
private void addMovie(Projection projection) {
|
private void addMovie(Projection projection) {
|
||||||
Date startDate = projection.getStartDate();
|
Date startDate = projection.getStartDate();
|
||||||
Time time = projection.getSlot().getStartTime();
|
if (Arrays.asList(((AgendaTableModel) this.table.getModel()).getColumnNames()).contains(startDate.toString())) {
|
||||||
int column = this.table.getColumn(startDate.toString()).getModelIndex();
|
Time time = projection.getSlot().getStartTime();
|
||||||
int row = 0;
|
int column = this.table.getColumn(startDate.toString()).getModelIndex();
|
||||||
for (int i = 0; i < slots.size(); i++) {
|
int row = 0;
|
||||||
if (slots.get(i).getStartTime().toString().equals(time.toString())) {
|
for (int i = 0; i < slots.size(); i++) {
|
||||||
row = i;
|
if (slots.get(i).getStartTime().toString().equals(time.toString())) {
|
||||||
break;
|
row = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Object tableValue = table.getValueAt(row, column);
|
||||||
|
if (tableValue.getClass() == Projection.class) {
|
||||||
|
Projection[] projections = {(Projection) tableValue, projection};
|
||||||
|
table.setValueAt(projections, row, column);
|
||||||
|
} else if (tableValue.getClass() != String.class) {
|
||||||
|
((AgendaTableModel) table.getModel()).addValueAt(projection, row, column);
|
||||||
|
} else {
|
||||||
|
table.setValueAt(projection, row, column);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object tableValue = table.getValueAt(row, column);
|
|
||||||
if (tableValue.getClass() == Projection.class) {
|
|
||||||
Projection[] projections = {(Projection) tableValue, projection};
|
|
||||||
table.setValueAt(projections, row, column);
|
|
||||||
} else if (tableValue.getClass() != String.class) {
|
|
||||||
((AgendaTableModel) table.getModel()).addValueAt(projection, row, column);
|
|
||||||
} else {
|
|
||||||
table.setValueAt(projection, row, column);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCurrentPage() {
|
public int getCurrentPage() {
|
||||||
return this.currentPage;
|
return this.currentPage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ import javax.swing.table.AbstractTableModel;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class AgendaTableModel extends AbstractTableModel {
|
public class AgendaTableModel extends AbstractTableModel {
|
||||||
private LocalDate[] columnNames;
|
private LocalDate[] columnNames;
|
||||||
|
@ -19,7 +20,6 @@ public class AgendaTableModel extends AbstractTableModel {
|
||||||
data = new Object[5][this.day];
|
data = new Object[5][this.day];
|
||||||
|
|
||||||
LocalDate startDate = Config.getStartDate();
|
LocalDate startDate = Config.getStartDate();
|
||||||
|
|
||||||
for (int i = 0; i < this.day; i++) {
|
for (int i = 0; i < this.day; i++) {
|
||||||
this.columnNames[i] = startDate.plusDays(i + 5 * (currentPage));
|
this.columnNames[i] = startDate.plusDays(i + 5 * (currentPage));
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,10 @@ public class AgendaTableModel extends AbstractTableModel {
|
||||||
return columnNames[column].toString();
|
return columnNames[column].toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String[] getColumnNames() {
|
||||||
|
return Arrays.stream(columnNames).map(LocalDate::toString).toArray(String[]::new);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
public Object getValueAt(int rowIndex, int columnIndex) {
|
||||||
Object dataObject = data[rowIndex][columnIndex];
|
Object dataObject = data[rowIndex][columnIndex];
|
||||||
|
|
|
@ -6,10 +6,18 @@ import Exceptions.NotFoundInTable;
|
||||||
import GUI.Agenda.Agenda;
|
import GUI.Agenda.Agenda;
|
||||||
import GUI.Theme.PrimaryContainedButtonUI;
|
import GUI.Theme.PrimaryContainedButtonUI;
|
||||||
import GUI.Types.ProjectionType;
|
import GUI.Types.ProjectionType;
|
||||||
|
import com.intellij.uiDesigner.core.GridConstraints;
|
||||||
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
|
import com.intellij.uiDesigner.core.Spacer;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
import javax.swing.border.TitledBorder;
|
||||||
|
import javax.swing.plaf.FontUIResource;
|
||||||
|
import javax.swing.text.StyleContext;
|
||||||
|
import java.awt.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
public class GUI extends JFrame {
|
public class GUI extends JFrame {
|
||||||
private JPanel mainPanel;
|
private JPanel mainPanel;
|
||||||
|
@ -31,10 +39,11 @@ public class GUI extends JFrame {
|
||||||
private Competition currentCompetition;
|
private Competition currentCompetition;
|
||||||
private HashMap<String, JButton> competitionButtons = new HashMap<String, JButton>();
|
private HashMap<String, JButton> competitionButtons = new HashMap<String, JButton>();
|
||||||
|
|
||||||
public GUI() {
|
public GUI() throws NotFoundInTable {
|
||||||
super();
|
super();
|
||||||
|
$$$setupUI$$$();
|
||||||
try {
|
try {
|
||||||
this.currentCompetition = new Competition("Court Métrage");
|
this.currentCompetition = new Competition("Un Certain Regard");
|
||||||
construct();
|
construct();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
JOptionPane.showMessageDialog(this, e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
|
||||||
|
@ -49,7 +58,7 @@ public class GUI extends JFrame {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void construct() throws NotFoundInTable {
|
private void construct() throws NotFoundInTable {
|
||||||
this.currentPage = 1;
|
this.currentPage = 0;
|
||||||
setTitle("Projection Planning");
|
setTitle("Projection Planning");
|
||||||
setContentPane(mainPanel);
|
setContentPane(mainPanel);
|
||||||
setSize(1280, 800);
|
setSize(1280, 800);
|
||||||
|
@ -104,4 +113,86 @@ public class GUI extends JFrame {
|
||||||
previousButton = new JButton();
|
previousButton = new JButton();
|
||||||
previousButton.setUI(new PrimaryContainedButtonUI());
|
previousButton.setUI(new PrimaryContainedButtonUI());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method generated by IntelliJ IDEA GUI Designer
|
||||||
|
* >>> IMPORTANT!! <<<
|
||||||
|
* DO NOT edit this method OR call it in your code!
|
||||||
|
*
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
private void $$$setupUI$$$() {
|
||||||
|
createUIComponents();
|
||||||
|
mainPanel = new JPanel();
|
||||||
|
mainPanel.setLayout(new GridLayoutManager(4, 5, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
agendaPanel = new JPanel();
|
||||||
|
agendaPanel.setLayout(new BorderLayout(0, 0));
|
||||||
|
mainPanel.add(agendaPanel, new GridConstraints(1, 0, 1, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||||
|
agendaPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(0, 50, 0, 0), null, TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, null, null));
|
||||||
|
final Spacer spacer1 = new Spacer();
|
||||||
|
mainPanel.add(spacer1, new GridConstraints(0, 3, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||||
|
arrowPanel = new JPanel();
|
||||||
|
arrowPanel.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
mainPanel.add(arrowPanel, new GridConstraints(2, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
Font previousButtonFont = this.$$$getFont$$$("JetBrains Mono", Font.PLAIN, -1, previousButton.getFont());
|
||||||
|
if (previousButtonFont != null) previousButton.setFont(previousButtonFont);
|
||||||
|
previousButton.setText("<--");
|
||||||
|
arrowPanel.add(previousButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
Font nextButtonFont = this.$$$getFont$$$("JetBrains Mono", Font.PLAIN, -1, nextButton.getFont());
|
||||||
|
if (nextButtonFont != null) nextButton.setFont(nextButtonFont);
|
||||||
|
nextButton.setText("-->");
|
||||||
|
arrowPanel.add(nextButton, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
final Spacer spacer2 = new Spacer();
|
||||||
|
mainPanel.add(spacer2, new GridConstraints(3, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||||
|
final JPanel panel1 = new JPanel();
|
||||||
|
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
mainPanel.add(panel1, new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
final Spacer spacer3 = new Spacer();
|
||||||
|
panel1.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||||
|
final JPanel panel2 = new JPanel();
|
||||||
|
panel2.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
panel1.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
competitionButtonPanel = new JPanel();
|
||||||
|
competitionButtonPanel.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));
|
||||||
|
panel2.add(competitionButtonPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(284, 61), null, 0, false));
|
||||||
|
final Spacer spacer4 = new Spacer();
|
||||||
|
panel2.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, new Dimension(14, 61), null, 0, false));
|
||||||
|
final JPanel panel3 = new JPanel();
|
||||||
|
panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 50, 0, 0), -1, -1));
|
||||||
|
panel2.add(panel3, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
final JLabel label1 = new JLabel();
|
||||||
|
Font label1Font = this.$$$getFont$$$(null, -1, 22, label1.getFont());
|
||||||
|
if (label1Font != null) label1.setFont(label1Font);
|
||||||
|
label1.setText("Agenda");
|
||||||
|
panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) {
|
||||||
|
if (currentFont == null) return null;
|
||||||
|
String resultName;
|
||||||
|
if (fontName == null) {
|
||||||
|
resultName = currentFont.getName();
|
||||||
|
} else {
|
||||||
|
Font testFont = new Font(fontName, Font.PLAIN, 10);
|
||||||
|
if (testFont.canDisplay('a') && testFont.canDisplay('1')) {
|
||||||
|
resultName = fontName;
|
||||||
|
} else {
|
||||||
|
resultName = currentFont.getName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Font font = new Font(resultName, style >= 0 ? style : currentFont.getStyle(), size >= 0 ? size : currentFont.getSize());
|
||||||
|
boolean isMac = System.getProperty("os.name", "").toLowerCase(Locale.ENGLISH).startsWith("mac");
|
||||||
|
Font fontWithFallback = isMac ? new Font(font.getFamily(), font.getStyle(), font.getSize()) : new StyleContext().getFont(font.getFamily(), font.getStyle(), font.getSize());
|
||||||
|
return fontWithFallback instanceof FontUIResource ? fontWithFallback : new FontUIResource(fontWithFallback);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return mainPanel;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@ import GUI.Theme.DangerContainedButtonUI;
|
||||||
import GUI.Theme.PrimaryContainedButtonUI;
|
import GUI.Theme.PrimaryContainedButtonUI;
|
||||||
import GUI.Theme.SecondaryContainedButtonUI;
|
import GUI.Theme.SecondaryContainedButtonUI;
|
||||||
import GUI.Types.ProjectionType;
|
import GUI.Types.ProjectionType;
|
||||||
|
import com.intellij.uiDesigner.core.GridConstraints;
|
||||||
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -48,6 +50,7 @@ public class ProjectionHandler extends JDialog {
|
||||||
throw new ProjectionNotSpecified();
|
throw new ProjectionNotSpecified();
|
||||||
this.projectionType = projectionType;
|
this.projectionType = projectionType;
|
||||||
this.agenda = agenda;
|
this.agenda = agenda;
|
||||||
|
$$$setupUI$$$();
|
||||||
competitionComboBox.getModel().setSelectedItem(agenda.getCompetition());
|
competitionComboBox.getModel().setSelectedItem(agenda.getCompetition());
|
||||||
createUI();
|
createUI();
|
||||||
if (agenda.getDate() != null || agenda.getSlot() != null) {
|
if (agenda.getDate() != null || agenda.getSlot() != null) {
|
||||||
|
@ -66,6 +69,7 @@ public class ProjectionHandler extends JDialog {
|
||||||
this.projectionType = projectionType;
|
this.projectionType = projectionType;
|
||||||
this.agenda = agenda;
|
this.agenda = agenda;
|
||||||
this.projection = projection;
|
this.projection = projection;
|
||||||
|
$$$setupUI$$$();
|
||||||
createUI();
|
createUI();
|
||||||
competitionComboBox.getModel().setSelectedItem(projection.getCompetition());
|
competitionComboBox.getModel().setSelectedItem(projection.getCompetition());
|
||||||
filmComboBox.getModel().setSelectedItem(projection.getMovie());
|
filmComboBox.getModel().setSelectedItem(projection.getMovie());
|
||||||
|
@ -211,4 +215,68 @@ public class ProjectionHandler extends JDialog {
|
||||||
this.agenda.refresh();
|
this.agenda.refresh();
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method generated by IntelliJ IDEA GUI Designer
|
||||||
|
* >>> IMPORTANT!! <<<
|
||||||
|
* DO NOT edit this method OR call it in your code!
|
||||||
|
*
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
private void $$$setupUI$$$() {
|
||||||
|
createUIComponents();
|
||||||
|
contentPane = new JPanel();
|
||||||
|
contentPane.setLayout(new GridLayoutManager(4, 2, new Insets(10, 10, 10, 10), -1, -1));
|
||||||
|
competitionPanel = new JPanel();
|
||||||
|
competitionPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(competitionPanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
competitionLabel = new JLabel();
|
||||||
|
competitionLabel.setText("Competition");
|
||||||
|
competitionPanel.add(competitionLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
competitionComboBox = new JComboBox();
|
||||||
|
competitionPanel.add(competitionComboBox, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
slotPanel = new JPanel();
|
||||||
|
slotPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(slotPanel, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
slotLabel = new JLabel();
|
||||||
|
slotLabel.setText("Slot");
|
||||||
|
slotPanel.add(slotLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
slotComboBox = new JComboBox();
|
||||||
|
slotPanel.add(slotComboBox, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
dayPanel = new JPanel();
|
||||||
|
dayPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(dayPanel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
dayLabel = new JLabel();
|
||||||
|
dayLabel.setText("Day");
|
||||||
|
dayPanel.add(dayLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
dayComboBox = new JComboBox();
|
||||||
|
dayPanel.add(dayComboBox, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
cancelButton.setText("Cancel");
|
||||||
|
contentPane.add(cancelButton, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
confirmButton.setText("Button");
|
||||||
|
contentPane.add(confirmButton, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
filmPanel = new JPanel();
|
||||||
|
filmPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(filmPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
filmLabel = new JLabel();
|
||||||
|
filmLabel.setText("Film");
|
||||||
|
filmPanel.add(filmLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
filmComboBox = new JComboBox();
|
||||||
|
filmPanel.add(filmComboBox, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
roomPanel = new JPanel();
|
||||||
|
roomPanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(roomPanel, new GridConstraints(2, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
roomLabel = new JLabel();
|
||||||
|
roomLabel.setText("Room");
|
||||||
|
roomPanel.add(roomLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
roomComboBox = new JComboBox();
|
||||||
|
roomPanel.add(roomComboBox, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,9 @@ import DB.Projection;
|
||||||
import GUI.Agenda.Agenda;
|
import GUI.Agenda.Agenda;
|
||||||
import GUI.Agenda.Model.ProjectionTableModel;
|
import GUI.Agenda.Model.ProjectionTableModel;
|
||||||
import GUI.Types.ProjectionType;
|
import GUI.Types.ProjectionType;
|
||||||
|
import com.intellij.uiDesigner.core.GridConstraints;
|
||||||
|
import com.intellij.uiDesigner.core.GridLayoutManager;
|
||||||
|
import com.intellij.uiDesigner.core.Spacer;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
|
@ -67,4 +70,51 @@ public class ProjectionSelecter extends JDialog {
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||||
|
// >>> IMPORTANT!! <<<
|
||||||
|
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||||
|
$$$setupUI$$$();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method generated by IntelliJ IDEA GUI Designer
|
||||||
|
* >>> IMPORTANT!! <<<
|
||||||
|
* DO NOT edit this method OR call it in your code!
|
||||||
|
*
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
private void $$$setupUI$$$() {
|
||||||
|
contentPane = new JPanel();
|
||||||
|
contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
|
||||||
|
final JPanel panel1 = new JPanel();
|
||||||
|
panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
contentPane.add(panel1, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, null, null, 0, false));
|
||||||
|
final Spacer spacer1 = new Spacer();
|
||||||
|
panel1.add(spacer1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));
|
||||||
|
final JPanel panel2 = new JPanel();
|
||||||
|
panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
|
||||||
|
panel1.add(panel2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0, false));
|
||||||
|
buttonOK = new JButton();
|
||||||
|
buttonOK.setText("OK");
|
||||||
|
panel2.add(buttonOK, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
buttonCancel = new JButton();
|
||||||
|
buttonCancel.setText("Cancel");
|
||||||
|
panel2.add(buttonCancel, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||||
|
final JPanel panel3 = new JPanel();
|
||||||
|
panel3.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||||
|
panel3.setBackground(new Color(-14273992));
|
||||||
|
contentPane.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, 1, null, new Dimension(-1, 200), null, 0, false));
|
||||||
|
scrollPane = new JScrollPane();
|
||||||
|
panel3.add(scrollPane, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||||
|
table1 = new JTable();
|
||||||
|
scrollPane.setViewportView(table1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @noinspection ALL
|
||||||
|
*/
|
||||||
|
public JComponent $$$getRootComponent$$$() {
|
||||||
|
return contentPane;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
3
src/main/resources/META-INF/MANIFEST.MF
Normal file
3
src/main/resources/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: ProjectionPlanning.Main
|
||||||
|
|
Reference in a new issue