Skip to content

Commit

Permalink
FIxed Audience Display, add ESC Button to exit fullscreen, Fixed Typo
Browse files Browse the repository at this point in the history
Fixed Audience Displays Getting Left Cut Off, Issue #67
Added ESC Button to exit fullscreen of Audience Displays, Issue #68
Fixed Typo on SettingsUI, Issue #69
  • Loading branch information
Techno11 committed Nov 22, 2016
1 parent 4568d4d commit 0d52552
Show file tree
Hide file tree
Showing 25 changed files with 605 additions and 222 deletions.
3 changes: 3 additions & 0 deletions src/ftc/goal/counter/AboutUI.form
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
</SyntheticProperties>
<Events>
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyPressed"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
Expand Down
14 changes: 14 additions & 0 deletions src/ftc/goal/counter/AboutUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
package ftc.goal.counter;

import com.sun.glass.events.KeyEvent;

/**
* @author afera
*/
Expand Down Expand Up @@ -41,6 +43,11 @@ private void initComponents() {
setMinimumSize(new java.awt.Dimension(1024, 768));
setPreferredSize(new java.awt.Dimension(1024, 768));
setResizable(false);
addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
formKeyPressed(evt);
}
});

Exit.setText("Exit");
Exit.setToolTipText("");
Expand Down Expand Up @@ -111,6 +118,13 @@ private void ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:ev
this.dispose();
}//GEN-LAST:event_ExitActionPerformed

private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
int key = evt.getKeyCode();
if(key == KeyEvent.VK_ESCAPE){
SettingsUI.exitFullscreen();
}
}//GEN-LAST:event_formKeyPressed

/**
* @param args the command line arguments
*/
Expand Down
16 changes: 12 additions & 4 deletions src/ftc/goal/counter/AudDisplay1024.form
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<Dimension value="[300, 400]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[1024, 768]"/>
<Dimension value="[1042, 768]"/>
</Property>
<Property name="size" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[1024, 768]"/>
<Dimension value="[1042, 768]"/>
</Property>
</Properties>
<SyntheticProperties>
Expand All @@ -27,6 +27,7 @@
<EventHandler event="windowActivated" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowActivated"/>
<EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/>
<EventHandler event="windowOpened" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowOpened"/>
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyPressed"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
Expand All @@ -43,12 +44,12 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" pref="1920" max="32767" attributes="0"/>
<Component id="jPanel1" min="-2" pref="1043" max="-2" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" pref="1080" max="32767" attributes="0"/>
<Component id="jPanel1" min="-2" pref="768" max="-2" attributes="0"/>
</Group>
</DimensionLayout>
</Layout>
Expand Down Expand Up @@ -446,6 +447,13 @@
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/ftc/goal/counter/images/AudDispBackground1024p.png"/>
</Property>
<Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[2147483647, 2147483647]"/>
</Property>
<Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[400, 300]"/>
</Property>
<Property name="requestFocusEnabled" type="boolean" value="false"/>
</Properties>
<Constraints>
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription">
Expand Down
25 changes: 21 additions & 4 deletions src/ftc/goal/counter/AudDisplay1024.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
package ftc.goal.counter;

import com.sun.glass.events.KeyEvent;


/**
*
Expand Down Expand Up @@ -58,8 +60,8 @@ private void initComponents() {
setBackground(new java.awt.Color(0, 0, 0));
setIconImages(null);
setMinimumSize(new java.awt.Dimension(300, 400));
setPreferredSize(new java.awt.Dimension(1024, 768));
setSize(new java.awt.Dimension(1024, 768));
setPreferredSize(new java.awt.Dimension(1042, 768));
setSize(new java.awt.Dimension(1042, 768));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowActivated(java.awt.event.WindowEvent evt) {
formWindowActivated(evt);
Expand All @@ -71,6 +73,11 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
formKeyPressed(evt);
}
});

jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setMaximumSize(new java.awt.Dimension(1920, 1080));
Expand Down Expand Up @@ -192,18 +199,21 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
TimerDisplay.setBounds(0, 0, 1030, 270);

background.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ftc/goal/counter/images/AudDispBackground1024p.png"))); // NOI18N
background.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647));
background.setMinimumSize(new java.awt.Dimension(400, 300));
background.setRequestFocusEnabled(false);
jPanel1.add(background);
background.setBounds(0, 0, 1024, 768);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1920, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1043, javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1080, Short.MAX_VALUE)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 768, javax.swing.GroupLayout.PREFERRED_SIZE)
);

pack();
Expand Down Expand Up @@ -234,6 +244,13 @@ private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:ev
SettingsUI.jComboBox1.setEnabled(false);
}//GEN-LAST:event_formWindowActivated

private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
int key = evt.getKeyCode();
if(key == KeyEvent.VK_ESCAPE){
SettingsUI.exitFullscreen();
}
}//GEN-LAST:event_formKeyPressed

/**
* @param args the command line arguments
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<EventHandler event="windowActivated" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowActivated"/>
<EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/>
<EventHandler event="windowOpened" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowOpened"/>
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyPressed"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
Expand Down Expand Up @@ -429,7 +430,7 @@
<Component class="javax.swing.JLabel" name="background">
<Properties>
<Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor">
<Image iconType="3" name="/ftc/goal/counter/images/AudDispBackground720p.png"/>
<Image iconType="3" name="/ftc/goal/counter/images/AudDispBackground1280p.png"/>
</Property>
</Properties>
<Constraints>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
*/
package ftc.goal.counter;

import com.sun.glass.events.KeyEvent;


/**
*
* @author afera
*/
public class AudDisplay720 extends javax.swing.JFrame {
public class AudDisplay1280 extends javax.swing.JFrame {

/**
* Creates new form AudDisplay
*/
public AudDisplay720() {
public AudDisplay1280() {
initComponents();
}

Expand Down Expand Up @@ -69,6 +71,11 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
formKeyPressed(evt);
}
});

jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647));
Expand Down Expand Up @@ -186,7 +193,7 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
jPanel1.add(State);
State.setBounds(0, 640, 1280, 80);

background.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ftc/goal/counter/images/AudDispBackground720p.png"))); // NOI18N
background.setIcon(new javax.swing.ImageIcon(getClass().getResource("/ftc/goal/counter/images/AudDispBackground1280p.png"))); // NOI18N
jPanel1.add(background);
background.setBounds(0, 0, 1280, 720);

Expand Down Expand Up @@ -229,6 +236,13 @@ private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:ev
SettingsUI.jComboBox1.setEnabled(false);
}//GEN-LAST:event_formWindowActivated

private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
int key = evt.getKeyCode();
if(key == KeyEvent.VK_ESCAPE){
SettingsUI.exitFullscreen();
}
}//GEN-LAST:event_formKeyPressed

/**
* @param args the command line arguments
*/
Expand All @@ -246,20 +260,21 @@ public static void main(String args[]) {
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(AudDisplay720.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(AudDisplay1280.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(AudDisplay720.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(AudDisplay1280.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(AudDisplay720.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(AudDisplay1280.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(AudDisplay720.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
java.util.logging.Logger.getLogger(AudDisplay1280.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new AudDisplay720().setVisible(true);
new AudDisplay1280().setVisible(true);
}
});
}
Expand Down
1 change: 1 addition & 0 deletions src/ftc/goal/counter/AudDisplay1366.form
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<EventHandler event="windowActivated" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowActivated"/>
<EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/>
<EventHandler event="windowOpened" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowOpened"/>
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyPressed"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
Expand Down
14 changes: 14 additions & 0 deletions src/ftc/goal/counter/AudDisplay1366.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
package ftc.goal.counter;

import com.sun.glass.events.KeyEvent;


/**
*
Expand Down Expand Up @@ -69,6 +71,11 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
formKeyPressed(evt);
}
});

jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647));
Expand Down Expand Up @@ -230,6 +237,13 @@ private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:ev
SettingsUI.jComboBox1.setEnabled(false);
}//GEN-LAST:event_formWindowActivated

private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
int key = evt.getKeyCode();
if(key == KeyEvent.VK_ESCAPE){
SettingsUI.exitFullscreen();
}
}//GEN-LAST:event_formKeyPressed

/**
* @param args the command line arguments
*/
Expand Down
10 changes: 7 additions & 3 deletions src/ftc/goal/counter/AudDisplay1600.form
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<Dimension value="[1024, 768]"/>
</Property>
<Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[1600, 1200]"/>
<Dimension value="[1617, 1200]"/>
</Property>
<Property name="size" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
<Dimension value="[1600, 1200]"/>
<Dimension value="[1617, 1200]"/>
</Property>
</Properties>
<SyntheticProperties>
Expand All @@ -27,6 +27,7 @@
<EventHandler event="windowActivated" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowActivated"/>
<EventHandler event="windowClosed" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowClosed"/>
<EventHandler event="windowOpened" listener="java.awt.event.WindowListener" parameters="java.awt.event.WindowEvent" handler="formWindowOpened"/>
<EventHandler event="keyPressed" listener="java.awt.event.KeyListener" parameters="java.awt.event.KeyEvent" handler="formKeyPressed"/>
</Events>
<AuxValues>
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
Expand All @@ -43,7 +44,10 @@
<Layout>
<DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0">
<Component id="jPanel1" alignment="0" max="32767" attributes="0"/>
<Group type="102" alignment="0" attributes="0">
<Component id="jPanel1" pref="1610" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
Expand Down
22 changes: 19 additions & 3 deletions src/ftc/goal/counter/AudDisplay1600.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/
package ftc.goal.counter;

import com.sun.glass.events.KeyEvent;


/**
*
Expand Down Expand Up @@ -58,8 +60,8 @@ private void initComponents() {
setBackground(new java.awt.Color(0, 0, 0));
setIconImages(null);
setMinimumSize(new java.awt.Dimension(1024, 768));
setPreferredSize(new java.awt.Dimension(1600, 1200));
setSize(new java.awt.Dimension(1600, 1200));
setPreferredSize(new java.awt.Dimension(1617, 1200));
setSize(new java.awt.Dimension(1617, 1200));
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowActivated(java.awt.event.WindowEvent evt) {
formWindowActivated(evt);
Expand All @@ -71,6 +73,11 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
formWindowOpened(evt);
}
});
addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
formKeyPressed(evt);
}
});

jPanel1.setBackground(new java.awt.Color(255, 255, 255));
jPanel1.setMaximumSize(new java.awt.Dimension(1920, 1080));
Expand Down Expand Up @@ -196,7 +203,9 @@ public void windowOpened(java.awt.event.WindowEvent evt) {
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1610, Short.MAX_VALUE)
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
Expand Down Expand Up @@ -231,6 +240,13 @@ private void formWindowActivated(java.awt.event.WindowEvent evt) {//GEN-FIRST:ev
SettingsUI.jComboBox1.setEnabled(false);
}//GEN-LAST:event_formWindowActivated

private void formKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_formKeyPressed
int key = evt.getKeyCode();
if(key == KeyEvent.VK_ESCAPE){
SettingsUI.exitFullscreen();
}
}//GEN-LAST:event_formKeyPressed

/**
* @param args the command line arguments
*/
Expand Down
Loading

0 comments on commit 0d52552

Please sign in to comment.