Changeset 128 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
- Timestamp:
- 10/19/2017 03:49:00 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/scriptbuilder/gui/IncidentPaletteFrame.java
r127 r128 7 7 8 8 import java.awt.GridLayout; 9 import java.awt.event.KeyEvent; 10 import java.awt.event.KeyListener; 9 11 import java.io.File; 10 12 import java.io.FileFilter; … … 31 33 public class IncidentPaletteFrame extends javax.swing.JFrame 32 34 { 33 35 34 36 private String incDir; 35 37 36 38 private SimulationScript script; 37 39 38 private ScriptBuilderFrame parent;40 private final ScriptBuilderFrame parent; 39 41 40 42 private SimulationScript dummyScript; … … 69 71 initComponents(); 70 72 71 String propfilename = "/scriptbuilder/gui/application.properties"; 73 txtSearchFilter.addKeyListener(new KeyListener() 74 { 75 76 @Override 77 public void keyTyped(KeyEvent e) 78 { 79 } 80 81 @Override 82 public void keyPressed(KeyEvent e) 83 { 84 if (e.getKeyCode() == KeyEvent.VK_ENTER) 85 { 86 /*This feature has not yet been implemented. Show a message and just return.*/ 87 if (true) 88 { 89 JOptionPane.showMessageDialog(txtSearchFilter.getTopLevelAncestor(), "This feature has not yet been implemented.\n", 90 "Feature not implemented", JOptionPane.INFORMATION_MESSAGE); 91 } 92 } 93 } 94 95 @Override 96 public void keyReleased(KeyEvent e) 97 { 98 } 99 }); 100 101 String fs = System.getProperty("file.separator"); 102 103 String propfilename = fs + "scriptbuilder" + fs + "gui" + fs + "application.properties"; 72 104 String propKey = "Incidents.directory"; 73 105 incDir = ""; … … 108 140 if (!folder.exists()) 109 141 { 110 JOptionPane.showMessageDialog(this, 142 JOptionPane.showMessageDialog(this, 111 143 "Unable to locate folder of existing incidents.\n" 112 + "Folder \""+incDir+"\" should have been included in the\n"113 + "ScriptBuilder.zip file you downloaded.\n"114 + "TO FIX: Close the ScriptBuilder program and run it from\n"115 + "the same directory where you opened the .zip file.\n\n"116 + "(If the problem persists, contact the developers.)", "Missing Folder: \""+incDir+"\"", JOptionPane.ERROR_MESSAGE);144 + "Folder \"" + incDir + "\" should have been included in the\n" 145 + "ScriptBuilder.zip file you downloaded.\n" 146 + "TO FIX: Close the ScriptBuilder program and run it from\n" 147 + "the same directory where you opened the .zip file.\n\n" 148 + "(If the problem persists, contact the developers.)", "Missing Folder: \"" + incDir + "\"", JOptionPane.ERROR_MESSAGE); 117 149 return newList; 118 150 } 119 151 120 152 incidentFiles = folder.listFiles(); 121 153
Note: See TracChangeset
for help on using the changeset viewer.
