I also wrote 13,000 of java code to create a bespoke interface to sqlite3 in order to write my book (in lieu of a word processor):

/* TODO: 20230628: About to create a new ItemComparisonScreen. For R20230701, the comparison sceen will be a resizable panel that has a left and right pane. In the R20230801, this will become an MDI. With that in mind, I'm going to change the way this application operates. Here's the SOP: 1. Chicago (the class) will read all data from the database into the in-memory data model (get it once). 2. Chicago will create a Chicago Home Screen and tell it which item to display. Initially, it will show item 0 if item 0 exists ( item 0 is 'ROOT' ). If item 0 does not exist, go to the fucking database and create the 'ROOT' item manually (for now). This is an edge case that I don't give a doodoo about. 3. Chicago Home Screen will go about it's business. Whenever a stopwatch change occurs, it calls home to Chicago and tells it what data to replace in which item. Chicago will then write that data to the database. Sometimes it's just a clock UPDATE; other times it's a full item INSERT (and upversion, of course). 4. Other times, I'll decide to create, edit, or copy an already existing item. In those cases, I will create another fricking java object--in this case, a Chicago Item Screen. The Chicago Home Screen will do the neccessary to pass a value to the Item Screen to work on. In this case, it will pass (you guessed it) the index that matches the index of the object model. The Chicago Item Screen will then use that index to call back to Chicago to get the data in the various columns at that index, display them, allow them to be edited, trashed, or committed. If you are saving stuff, then you will call a method on Chicago to take that payload so that it can be committed and stored in the object model. 5. And finally, I might decided to click the "compare items" button which will open the Chicago Comparison Screen, passing it some fricking number that I have no clue what it does in order for the left side of the comparison screen to call the Chicago mothership to provide all the values at that row? 6. Enhancement: sort the item list in order of hierarchy of components: x > b > e > s > a Essentially, anything that has an 'x' sSearchItemType is for project management purposes and should be at either the top or totally ignored (when I'm not interested in the project management info anymore, I'll unclick the 'other' checkbox on the Home Screen). */ package com.mattmclaurine.chicago; import com.google.common.base.Stopwatch ; import java.awt.Color; import java.awt.Font; import java.io.BufferedReader; import java.io.StringReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.nio.channels.FileChannel; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.sql.PreparedStatement; import java.time.format.DateTimeFormatter; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collections; import java.util.Properties; import java.util.Timer; import java.util.TimerTask; /** * * @author lance */ public class Chicago { ////// CONSTANTS FOR ME CHOOSING LANCE FUCKING MODE: private static final int LANCE_FUCKING_MODE = 69; private static int iLanceFuckingMode = 68; // GUESS WHAT? IF THEY'RE EQUAL A METHOD CALLED // LANCEIT() GETS CALLED FROM MAIN AND MAY OR // MAY NOT EXIT. private static final boolean bDoPMTasks = false; private static final int MAX_ROWS = 10000; private static final int MAX_COLUMNS = 30; public static final int DIRTY_BIT = 0; public static final int DIRTY_BIT_CLEAN = 0; public static final int DIRTY_BIT_INSERT= 1; public static final int DIRTY_BIT_UPDATE= 2; ////// CONSTANTS FOR FUNCTIONS OF THE ITEM SCREEN: public static final int SCREEN_COPY = 1; public static final int SCREEN_EDIT = 2; public static final int SCREEN_CREATE = 3; public static final boolean DEBUG_DATABASE = false; ////// CONSTANTS FOR SORTING THE ITEM LIST BY VARIOUS DIFFERENET METHODS: public static final int CONTEXT_MAX_LEN = 13; public static final int NAME_MAX_LEN = 47; public static final int ITEM_TYPE_POSIT = 16; public static final int RELEVANCE_POSIT = 20; public static final int FINISH_DATE_POS = 26; public static final int NAME_POSITION = 37; public static final int VERSION_POSITION = 87; ///////////////////////////////////////////////////////////////////////// //////////////////// SKIN/MODE/COLORS /////////////////////////// ///////////////////////////////////////////////////////////////////////// // TODO: PUT THIS SHIT IN A PROPERTIES FILE AND LET THE UIS HAVE THESE VARIABLES FOR FREE public static final int SKIN_DARK = 0; public static final int SKIN_DK_MONACO = 1; public static final int MODE_PRIEST = 0; public static final int MODE_POPE = 1; public static final int MODE_MONGO = 2; public static final int MODE_GOD = 3; public static final int MODE_MATT = 69; public static final Color COL_BLACK = new java.awt.Color(10, 10, 10); public static final Color COL_POPE_BLACK = new java.awt.Color(0, 0, 0); public static final Color COL_WHITE = new java.awt.Color(255, 255, 255); public static final Color COL_CYAN = Color.CYAN; public static final Color COL_RED = new java.awt.Color(255, 0, 0); public static final Color COL_GHOST = new java.awt.Color(204, 204, 255); public static final Font COURIER12 = new java.awt.Font("Courier New", 0, 12); ///////////////////////////////////////////////////////////////////////// private static final HomeScreen scnHome = new HomeScreen(); private static final Properties properties = new Properties(); // MAKE SURE NEITHER I NOR ANY OTHER HUMAN CAN USE THIS APP IF I CHANGE THE LOCATION OF THE PROPERTIES FILE... private static String pathName = "/Users/lance/Chicago/chicago/src/main/java/com/mattmclaurine/chicago/"; private static String pathNameWin = "C:\\cygwin64\\home\\matth\\Chicago\\chicago\\src\\main\\java\\com\\mattmclaurine\\chicago\\"; private static final Timer myScheduler = new Timer(); ///////////////////////////////////////////////////////////////////////// //////////////////////// NON-FINAL /////////////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// //////////////////////// STATIC /////////////////////////////// ///////////////////////////////////////////////////////////////////////// public static int iRowCount = 0; public static String sAppContext = ""; public static int iMySkin = SKIN_DARK; public static int iMyMode = MODE_PRIEST; // NO OTHER CLASSES INTERACT DIRECTLY WITH THE DATABASE // ALL SEARCHES ARE CARRIED OUT IN MEMORY OR BY CHICAGO private static Connection myConnection = null; private static String sJDBC = null; private static String sURL = null; private static String sURL2 = null; private static String sURL3 = null; private static String sURLWin = null; private static String sURL2Win = null; private static String sURL3Win = null; public static int iDBNumber = 0; public static int iDatabaseInstance = 0; public static int isMac = 0; ///////////////////////////////////////////////////////////////////////// //////// DEFINE DATABASE COLUMN NUMBERS //////// //////// quot/unquot strings: //////// ///////////////////////////////////////////////////////////////////////// public static int cnItemType; public static int cnAtomType; public static int cnName; public static int cnContents; public static int cnTimesUsed; public static int cnClimaxScene; public static int cnNotebook; public static int cnCorrespondences; public static int cnUsages; public static int cnListString; public static int cnContext; public static int cnStatus; /////// quote/unquote integers: //////////// public static int cnSize; public static int cnRelevance; public static int cnVersion; public static int cnClock; public static int cnMaxVersion; public static int cnDeleted; public static int cnCreateDate; public static int cnUpdateDate; public static int cnFinishDate; public static int cnID; ///////////////////////////////////////////////////////////////////////// /////////// AS OF THE 20230701 RELEASE ////////// /////////// THE OBJECT MODEL IS NOW PUBLIC. ////////// /////////// SO... 'YAY' (AND, 'OH, SHIT!'). ////////// ///////////////////////////////////////////////////////////////////////// public static String[][] sObjModel = new String[MAX_ROWS][MAX_COLUMNS]; ///////////////////////////////////////////////////////////////////////// ////////////////////// end of variables ///////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////////// HIGH SCORES: ////////// ////////// 1. ASS ////////// ////////// 2. LFG ////////// ////////// 3. MLM ////////// ////////// INSERT 4. EEE PLAY ////////// ////////// COIN 5. MSE ////////// ////////// 25c = 3 LIVES 6. PHD ASTEROIDS ////////// ////////// 7. DIK ////////// ////////// 8. FUK ////////// ////////// 9. MOF ////////// ///////////////////////////////////////////////////////////////////////// ///////// IN OTHER WORDS, ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////// ALL WORK AND NO PLAY MAKES JACK A DULL BOY. ////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////////// GAME OVER ////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////////// ////////// ////////// METHODS ////////// ////////// ////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////// ////// This method returns the array of strings ////// used to set the data for either a combo box's ////// data model or a list box's data model. public static String[] getALLItemsSorted() { ArrayList newList = new ArrayList(); try { for ( int i = 1; i <= iRowCount; i++ ) { if ( sObjModel[i][cnVersion] != null && sObjModel[i][cnMaxVersion] != null) { int myVersion = Integer.parseInt(sObjModel[i][cnVersion].trim()); int mxVersion = Integer.parseInt(sObjModel[i][cnMaxVersion].trim()); if (myVersion == mxVersion ) { newList.add(sObjModel[i][cnContext] + " > " + sObjModel[i][cnItemType] + " # " + sObjModel[i][cnRelevance] + " & " + sObjModel[i][cnFinishDate] + " : " + sObjModel[i][cnName] + " @ " + sObjModel[i][cnMaxVersion]); }} // sort the list. The below line gets me emotionally erect. -Steve Martin? Collections.sort(newList); }} catch ( Exception e ) { e.printStackTrace(); } return newList.toArray(new String[newList.size()]); } ///////////////////////////////////////////////////////////////////////// ////// Item Screen tells Chicago to tell Home Screen some shit. ////// Yep. That's it. That's the entire point of this 1 liner. public static void utlAlertHomeScreen(int x) { // This method gets the Home Screen to show the values of // the item that was just edited on a screen that the // home screen called the constructor for. scnHome.setAllMyShitToX(x); scnHome.utlRedrawItemsList(); } public static void utlCopyFile(File sourceFile, File destFile) throws IOException { if(!destFile.exists()) destFile.createNewFile(); FileChannel source = null; FileChannel destination = null; try { source = new FileInputStream(sourceFile).getChannel(); destination = new FileOutputStream(destFile).getChannel(); destination.transferFrom(source, 0, source.size()); } finally { if(source != null) source.close(); if(destination != null) destination.close(); } } ///////////////////////////////////////////////////////////////////////// ////// This method converts the time stored in the database ////// which is in seconds to something human readable by ////// a non-cyborg (not that there's anything wrong with ////// being a cyborg). So 123456 -> 34:17:16 public static String utlConvertIntToClock (int clockTimeInSeconds) { int hours = (int) ( clockTimeInSeconds/3600); int minutes = (int) ((clockTimeInSeconds-(hours*3600))/60); int seconds = clockTimeInSeconds-(hours*3600)-(minutes*60); String s = hours + ":" + utlPadClock(minutes,2) + ":" + utlPadClock(seconds,2); return s; } ///////////////////////////////////////////////////////////////////////// ////// The method below returns the index of the item ////// that matches the 'listString' passed in ////// As of 20230704 'listString' for me means the ////// 'listString' in the form 'type.name.sSearchVersion' ////// which is the way Home Screen does it. ///////////////////////////////////////////////////////////////////////// public static int utlDecodeListStringToIndex(String sSearch) { int iMatchingIndex = -1; String sTempListItem = sSearch; // Context: int iDelimeterLocation = sTempListItem.indexOf(" > "); String sTempContext = sTempListItem.substring(0, iDelimeterLocation); if (sTempContext.length() > CONTEXT_MAX_LEN ) sTempContext = sTempContext.substring(0, CONTEXT_MAX_LEN); sTempContext = sTempContext.trim(); // CHOMP it sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // ItemType + the rest // Item Type: String sTempItemType = sTempListItem.substring(0,1); // CHOMP it iDelimeterLocation = sTempListItem.indexOf(" # "); sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Relevance + the rest // Relevance: String sTempRelevance = ""; iDelimeterLocation = sTempListItem.indexOf(" &"); // Chomp out the temp string sTempRelevance = sTempListItem.substring(0, iDelimeterLocation).trim(); int iTempRelevance; try { iTempRelevance = Integer.parseInt(sTempRelevance); } catch (Exception e) { System.out.println("SEARCH Relevance is fucked up. Got: ***" + sTempRelevance + "***"); iTempRelevance = 0; } if (iTempRelevance < 0) iTempRelevance = 0; if (iTempRelevance > 100) iTempRelevance = 100; sTempRelevance = String.valueOf(iTempRelevance); // CHOMP it sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Date + the rest // Finish Date: String sTempFinishDate; try { sTempFinishDate = sTempListItem.substring(0, 8).trim(); } catch (Exception e) { System.out.println("Finish date is fucked"); sTempFinishDate = ""; } sTempFinishDate = sTempFinishDate.trim(); // CHOMP it iDelimeterLocation = sTempListItem.indexOf(": "); sTempListItem = sTempListItem.substring(iDelimeterLocation + 2); // Name + the rest // Name: iDelimeterLocation = sTempListItem.indexOf(" @ "); String sTempName = sTempListItem.substring(0, iDelimeterLocation); if (sTempName.length() > NAME_MAX_LEN) sTempName = sTempName.substring(0, NAME_MAX_LEN); sTempName = sTempName.trim(); // CHOMP it sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Version // Version: String sTempVersion = sTempListItem.trim(); int iTempVersion; try { iTempVersion = Integer.parseInt(sTempVersion); } catch (Exception e) { System.out.println("Version is fucked up, dipshit. Setting version to 1..."); iTempVersion=1; } if (iTempVersion < 0) iTempVersion = 1; sTempVersion = String.valueOf(iTempVersion); // The only thing I think can go wrong is with version. Does it need to be padded? // loop through the object model for ( int i = 1; i <= iRowCount; i++) { // Need to format the old items in the database since the old items aren't in the current format yet // Context: String sObjModelContext = sObjModel[i][cnContext]; if (sObjModelContext.length() > Chicago.CONTEXT_MAX_LEN) sObjModelContext = sObjModelContext.substring(0,Chicago.CONTEXT_MAX_LEN); sObjModelContext = sObjModelContext.trim(); // Item Type: String sObjModelItemType = sObjModel[i][cnItemType]; // Relevance: String sObjModelRelevance = sObjModel[i][cnRelevance].trim(); int iObjModelRelevance; try { iObjModelRelevance = Integer.parseInt(sObjModelRelevance); } catch (Exception e) { System.out.println("Relevance is fucked up, dipshit. Setting relevance to 0..."); iObjModelRelevance = 0; } if (iObjModelRelevance < 0) iObjModelRelevance = 0; if (iObjModelRelevance > 100) iObjModelRelevance = 100; sObjModelRelevance = String.valueOf(iObjModelRelevance); // Finish Date String sObjModelFinishDate = sObjModel[i][cnFinishDate]; try { if (sObjModelFinishDate.length() >= 8) sObjModelFinishDate = sObjModel[i][cnFinishDate].substring(0,8); } catch (Exception e) { System.out.println("Exception in DecodeListToString on Finish Date"); sObjModelFinishDate = ""; } sObjModelFinishDate = sObjModelFinishDate.trim(); // Name String sObjModelName = sObjModel[i][cnName]; if (sObjModelName.length() > Chicago.NAME_MAX_LEN) sObjModelName = sObjModelName.substring(0,Chicago.NAME_MAX_LEN); sObjModelName = sObjModelName.trim(); // Version: String sObjModelVersion = sObjModel[i][cnVersion].trim(); int iObjModelVersion; try { iObjModelVersion = Integer.parseInt(sObjModelVersion); } catch (Exception e) { System.out.println("Version is fucked up, dipshit. Setting version to 1..."); iObjModelVersion=1; } if (iObjModelVersion < 0) iObjModelVersion = 1; sObjModelVersion = String.valueOf(iObjModelVersion); //System.out.println("Comparing this: sTempContext: " + sTempContext + " *** sTempItemType: " + sTempItemType + " *** sTempName: " + sTempName + " *** sTempVersion: " + sTempVersion); //System.out.println(" to this: sObjModelContext: " + sObjModelContext + " *** sObjModelItemType: " + sObjModelItemType + " *** sObjModelName: " + sObjModelName + " *** sObjModelVersion: " + sObjModelVersion); if ( sObjModelContext.equals(sTempContext)) // if (sObjModelItemType.equals(sTempItemType)) if (sObjModelName.equals(sTempName)) { if (sObjModelVersion.equals(sTempVersion)) { iMatchingIndex = i; break; }}} // return the index return iMatchingIndex; } ///////////////////////////////////////////////////////////////////////// public static void utlDeleteAnItem (int x, String itemSelected) { try { System.out.println( "Trying to delete item: " + x + ": " + itemSelected); sObjModel[x][cnDeleted] = Integer.toString(1); sObjModel[x][DIRTY_BIT] = Integer.toString(2); } catch (Exception e) { e.printStackTrace(); } } ///////////////////////////////////////////////////////////////////////// ////// This method finds a match from given name/type/version ////// data to a object in the object model. It returns the ////// index of the match. If it does not find a match, ////// it modals its discontent. public static int utlFindAMatch( String _Context, String _ItemType, String _Name, String _Version) { // TODO: 230719 EXTEND THIS METHOD TO FIND A MATCH WITH NULL IN _VERSION. // DETERMINE WHAT BEHAVIOR IS DEFAULT (FIRST MATCH OR MAXVERSION MATCH) int iMatchingIndex = -1; for (int i=1; i <= iRowCount; i++) { String sContext = sObjModel[i][cnContext ]; String sName = sObjModel[i][cnName ]; String sItemType = sObjModel[i][cnItemType]; String sAtomType = sObjModel[i][cnAtomType]; String sVersion = sObjModel[i][cnVersion ]; if (sName.equals(_Name) && sItemType.equals( _ItemType) && sVersion.equals(_Version)) { // Check the context, too if (sAppContext.equals("") || sAppContext.equals(sContext)) iMatchingIndex = i; break; }} if ( iMatchingIndex == -1 ) { // Pop open a modal window alerting about the failure: ChicagoUIOKDialog fuck = new ChicagoUIOKDialog(new javax.swing.JFrame(), true); fuck.setLabel("Failed to mind a match for this item!"); fuck.setLocationRelativeTo(null); fuck.setVisible(true); } return iMatchingIndex; } ///////////////////////////////////////////////////////////////////////// ////// This method converts makes sure if I get a time value ////// of 5 minutes and 2 seconds it will get displayed ////// as 05:02 instead of 5:2 public static String utlPadClock(int value, int paddingLength) { ///////////////////////////////////////////////////////////////////////// // // // THANKS TO WHOMEVER CAME UP WITH THIS INFO: // // IT CONVERTS "5" TO "05" FOR THE FRICKING CLOCK // // ...THAT'S WHY IT'S IMPORTANT, BOSS. // // .|. // // // // /\ // // | // // ___ // // ( ) // // END OF PADLOCK ( O ) // // (___) // // // // // // // // ...BACK TO THE REGULAR SCHEDULED BROADCAST OF "NIGHTMARE THEATER" // // // ///////////////////////////////////////////////////////////////////////// return String.format( "%0" + paddingLength + "d", value); } ///////////////////////////////////////////////////////////////////////// ////// DONT BELIEVE ANYTHING IN THE COMMENTS BELOW (ANYMORE) ////// THE NEW PLAN IS TO MAKE A PROJECT MANAGEMENT SCREEN ////// THAT WILL CALL THIS METHOD TO GET ALL THE DATA IT NEEDS ////// TO SHOW ALL THE PROJECT MANAGEMENT METRICS THAT I WANT ////// This method perform's an update on tot al project time ////// It calculates the total time of ////// the container types (b/p/e). The intent is to use ////// the times on the containers to show how much time ////// was spent on one container v another--just the ////// standard project mangement bullshit ////// reported on in status meetings with about 35 other ////// middle-managers (as well as senior project management), ////// so make sure it gets the point across. ////// ////// ANY CODER THAT HASNT CALLED MALLOC IN THEIR LIFE CAN SUCK ////// A LOWER EXTREMITY OF MINE--ELSE, NOT IMPRESSED public static void utlProjectManagement() { // THE IDEA HERE ON 20230707 IS THAT WHENEVER YOU NEED TO SET THE CLOCK // LABEL ON A SCREEN THE FOLLOWING WILL OCCUR: // THE ACTUAL ITEM YOU'RE WORKING ON HAS A TIME AND THE STOPWATCH IS // GOING TO ADD TO THIS TIME. // HOWEVER, AS A USER, I WANT TO BE SHOWN THE TOTAL TIME SPENT ON // THIS ITEM AND ALL OF ITS CHILDREN, SO LET'S LOOP THROUGH THE // OBJECT MODEL AND CALCULATE THE TOTAL TIME OF ITS CHILDREN, // THEN ADD THAT NUMBER THIS THIS ITEMS CLOCK TO GET THE INITIAL // VALUE OF THE CLOCK LABEL. // SINCE THE OBJECTMODEL TIMES ARE STATIC, THE WAY THE SCREEN WORKS // IS THAT THE CLOCK LABEL WILL ALWAYS SHOW: // SUM CLOCKALLCHILDREN + MYCLOCK + ASTOPWATCH if ( !bDoPMTasks ) return; System.out.println("Fuck"); // FIRST: THE EPISODES for (int i = 1; i <= iRowCount; i++ ) { System.out.println("i: " + i); int totalSize = 0; if (sObjModel[i][cnItemType].equals( "e" )) { // Oh, by the way, I only care about the version=MaxVersion items here // ^--- it saves time... if ( sObjModel[i][cnVersion].equals(sObjModel[i][cnMaxVersion]) ) { // WE'RE AT A 'MAXVERSION' EPISODE NOW, BIATCH // The setting of the dirty bit is quite agressive, bucko sObjModel[i][DIRTY_BIT] = Integer.toString(DIRTY_BIT_UPDATE); // Get the manifest I need to loop through via Contents of the Episode: String sManifest = sObjModel[i][cnContents]; int totalEpisodeTime = 0; try { BufferedReader buFu = new BufferedReader(new StringReader(sManifest)); String line = null; while((line = buFu.readLine()) != null ) { for ( int j = 1; i <= iRowCount; i++ ) { // Match when the name matches the manifest + // when the itemType is a section + // if ( sObjModel[j][cnName].equals(line) && sObjModel[j][cnItemType].equals("s") && sObjModel[j][cnVersion].equals(sObjModel[j][cnMaxVersion])){ totalEpisodeTime += Integer.parseInt(sObjModel[j][cnClock ]); totalSize += sObjModel[i][cnContents].length(); break; }}}} catch (Exception e ) { System.out.println(" Yeah, about that..."); } // And the result of this Rube machine: sObjModel[i][cnClock] = Integer.toString(totalEpisodeTime); sObjModel[i][cnSize ] = Integer.toString(totalSize); sObjModel[i][DIRTY_BIT] = Integer.toString(2); }}} // SECOND: THE PARTS for (int i = 1; i <= iRowCount; i++ ) { int totalSize = 0; if ( sObjModel[i][cnItemType].equals( "p" )) { if (sObjModel[i][cnVersion].equals(sObjModel[i][cnMaxVersion])) { sObjModel[i][DIRTY_BIT] = Integer.toString(2); String contents = sObjModel[i][cnContents]; int totalEpisodeTime = 0; try { BufferedReader buFu = new BufferedReader(new StringReader(contents)); String line = null; while ((line = buFu.readLine()) != null) { for ( int j = 1; i <= iRowCount; i++ ) { if ( sObjModel[j][cnName].equals(line) && sObjModel[j][cnItemType].equals("e") && sObjModel[j][cnVersion].equals(sObjModel[j][cnMaxVersion]) ) { totalEpisodeTime += Integer.parseInt(sObjModel[j][cnClock]); totalSize += sObjModel[i][cnContents].length(); break; }}}} catch (Exception e ) { System.out.println(" Yeah, about that..."); } // And the result of this Rube machine: sObjModel[i][cnClock] = Integer.toString(totalEpisodeTime); sObjModel[i][cnSize ] = Integer.toString(totalSize); sObjModel[i][DIRTY_BIT] = Integer.toString(2); }}} // THIRD: THE BOOKS for (int i = 1; i <= iRowCount; i++ ) { int totalSize = 0; if ( sObjModel[i][cnItemType].equals( "b" )) { if ( sObjModel[i][cnVersion].equals(sObjModel[i][cnMaxVersion]) ) { String contents = sObjModel[i][cnContents]; sObjModel[i][DIRTY_BIT] = Integer.toString(2); int totalEpisodeTime = 0; try { BufferedReader buFu = new BufferedReader(new StringReader(contents)); String line = null ; while ((line = buFu.readLine()) != null) { for ( int j = 1; i <= iRowCount; i++ ) { if ( sObjModel[j][cnName].equals(line) && sObjModel[j][cnItemType].equals("p") && sObjModel[j][cnVersion].equals(sObjModel[j][cnMaxVersion])) { totalEpisodeTime += Integer.parseInt(sObjModel[j][cnClock]); totalSize += sObjModel[i][cnContents].length(); break; }}}} catch (Exception e ) { System.out.println(" Yeah, about that..."); } // And the result of this Rube machine: sObjModel[i][cnClock] = Integer.toString(totalEpisodeTime); sObjModel[i][cnSize ] = Integer.toString(totalSize); sObjModel[i][DIRTY_BIT] = Integer.toString(2); }}} } ///////////////////////////////////////////////////////////////////////// ///////////////////////// DATABASE /////////////////////////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////// Using the "properties" concept, define the database columns: ////// public static void utlSetColumnNumbers() { ///////////////////////////////////////////////////////////////////// ////////// THIS METHOD IS HERE TO KEEP FROM ////////// ////////// PROGRAMMING THE BELOW INTO EVERY SCREEN ////////// ////////// ////////// ////////// .|. ////////// ////////// ////////// ///////////////////////////////////////////////////////////////////// cnItemType = Integer.parseInt(properties.getProperty("itemType" )); cnAtomType = Integer.parseInt(properties.getProperty("atomType" )); cnName = Integer.parseInt(properties.getProperty("name" )); cnContents = Integer.parseInt(properties.getProperty("contents" )); cnTimesUsed = Integer.parseInt(properties.getProperty("timesUsed" )); cnClimaxScene = Integer.parseInt(properties.getProperty("climaxScene" )); cnNotebook = Integer.parseInt(properties.getProperty("notebook" )); cnCorrespondences = Integer.parseInt(properties.getProperty("correspondences" )); cnUsages = Integer.parseInt(properties.getProperty("usages" )); cnListString = Integer.parseInt(properties.getProperty("listString" )); cnContext = Integer.parseInt(properties.getProperty("context" )); cnRelevance = Integer.parseInt(properties.getProperty("relevance" )); cnClock = Integer.parseInt(properties.getProperty("clock" )); cnSize = Integer.parseInt(properties.getProperty("size" )); cnVersion = Integer.parseInt(properties.getProperty("version" )); cnMaxVersion = Integer.parseInt(properties.getProperty("maxVersion" )); cnCreateDate = Integer.parseInt(properties.getProperty("createDate" )); cnUpdateDate = Integer.parseInt(properties.getProperty("updateDate" )); cnFinishDate = Integer.parseInt(properties.getProperty("finishDate" )); cnDeleted = Integer.parseInt(properties.getProperty("deleted" )); cnStatus = Integer.parseInt(properties.getProperty("status" )); cnID = Integer.parseInt(properties.getProperty("ID" )); } ///////////////////////////////////////////////////////////////////////// /////// /////// Establish a connection to the database /////// private static int utlSetJDBCConnection ( String strJDBC, String strURL ) { int myCount = 0; try { Class.forName(strJDBC); System.out.println("Creating connection using url: " + strURL); myConnection = DriverManager.getConnection(strURL); System.out.println("Connection to SQLite has been established."); // Count the items that are returned[old said also: in order to initalize array to that size]... Statement s = myConnection.createStatement(); ResultSet r = s.executeQuery("SELECT COUNT(*) AS recordCount FROM items"); r.next(); myCount = r.getInt("recordCount"); r.close(); //System.out.println( "Rows in database: " + myCount); } catch (Exception e) { System.out.println("Fuck"); e.printStackTrace(); } return myCount; } public static void utlChangeJDBCConnection(int iDatabase) { String newURL = ""; if (iDatabase == 1) { newURL = sURL; if (isMac == 0) newURL = sURLWin; iDatabaseInstance = 1; } if (iDatabase == 2) { newURL = sURL2; if (isMac == 0) newURL = sURL2Win; iDatabaseInstance = 2; } if (iDatabase == 3) { newURL = sURL3; if (isMac == 0) newURL = sURL3Win; iDatabaseInstance = 3; } iDBNumber = 3; iRowCount = utlSetJDBCConnection(sJDBC, newURL); utlSetColumnNumbers(); utlSELECTIntoObjtModel(); // Now create a home screen onbject. No context at this point. No item selected scnHome.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.out.println ("Home screen closing..."); // At this point I could store the time spent on this screen in item 0 // int startingTime = sObjModel[0][cnClock]; // int totalTime = startingTime + scnHome.getTimeSpent(); //Chicago.utlProjectManagement(); System.exit (0 ); } }); scnHome.setChkAndRad(); scnHome.setMode2Priest(); scnHome.utlRedrawItemsList(); scnHome.utlRunTask(); scnHome.utlStartAStopwatch(true); //This method could either start the scheduled task //or I could create a new method scnHome.setDefaultUIColorsAndTimePermittingFonts(); //chs.setVisible(true); } ///////////////////////////////////////////////////////////////////////// /////// /////// This method loads the object model via SELECT * /////// public static void utlSELECTIntoObjtModel() { int iCount = 1; try { Statement stmt = myConnection.createStatement(); String query = "SELECT * FROM items ii1"; ResultSet myResultSet = stmt.executeQuery( query); while (myResultSet.next()) { ////// 1. Name String sTmp = myResultSet.getString(cnName).trim(); if (sTmp == null) sObjModel[iCount][cnName] = ""; else sObjModel[iCount][cnName] = sTmp; ////// 2. Context sTmp = myResultSet.getString(cnContext); if (sTmp == null) sObjModel[iCount][cnContext] = ""; else sObjModel[iCount][cnContext] = sTmp; ////// 3. Item Type sTmp = myResultSet.getString(cnItemType); if ( sTmp == null || sTmp.equals("")) sObjModel[iCount][cnItemType] = "x"; else sObjModel[iCount][cnItemType] = sTmp; ////// 4. Atom Type sTmp = myResultSet.getString(cnAtomType); if ( sTmp == null ) sObjModel[iCount][cnAtomType] = ""; else sObjModel[iCount][cnAtomType] = sTmp; ////// 5. Contents sTmp = myResultSet.getString(cnContents); if ( sTmp == null ) sObjModel[iCount][cnContents] = ""; else sObjModel[iCount][cnContents] = sTmp; ////// 6. Times Used sTmp = myResultSet.getString(cnTimesUsed); if ( sTmp == null ) sObjModel[iCount][cnTimesUsed] = ""; else sObjModel[iCount][cnTimesUsed] = sTmp; ////// 7. Climax Scene sTmp = myResultSet.getString(cnClimaxScene); if ( sTmp == null ) sObjModel[iCount][cnClimaxScene] = ""; else sObjModel[iCount][cnClimaxScene] = sTmp; ////// 8. Notebook sTmp = myResultSet.getString(cnNotebook); if ( sTmp == null ) sObjModel[iCount][cnNotebook] = ""; else sObjModel[iCount][cnNotebook] = sTmp; ////// 9. Correspondences sTmp = myResultSet.getString(cnCorrespondences); if ( sTmp == null ) sObjModel[iCount][cnCorrespondences] = ""; else sObjModel[iCount][cnCorrespondences] = sTmp; ////// 10. Usages sTmp = myResultSet.getString(cnUsages); if ( sTmp == null ) sObjModel[iCount][cnUsages] = ""; else sObjModel[iCount][cnUsages] = sTmp; ////// . ListString sTmp = myResultSet.getString(cnListString); if ( sTmp == null ) sObjModel[iCount][cnListString] = "null > null # Fuck & You : null @ 4.2"; else sObjModel[iCount][cnListString] = sTmp; ////// 11. Relevance int iRelevance = 0; sTmp = myResultSet.getString(cnRelevance).trim(); if (sTmp == null) sObjModel[iCount][cnRelevance] = "0"; else sObjModel[iCount][cnRelevance] = sTmp; ///// But wait, there's more for numabhs... try { if (sTmp.length() > 0) iRelevance = Integer.parseInt(sTmp); else iRelevance = 0; if (iRelevance < 0) iRelevance = 0; if (iRelevance > 999) iRelevance = 999; } catch (Exception e) { System.out.println("you cheeky Relevance bahstahd for " + Chicago.sObjModel[iCount][Chicago.cnRelevance]); e.printStackTrace(); iRelevance = 0; } sTmp = String.valueOf(iRelevance); sObjModel[iCount][cnRelevance] = sTmp; ////// 12. Clock int iClock = 0; sTmp = myResultSet.getString(cnClock).trim(); if ( sTmp == null ) sObjModel[iCount][cnClock] = "0"; else sObjModel[iCount][cnClock] = sTmp; ///// But wait, there's more for numabhs... try { if (sTmp.length() > 0) iClock = Integer.parseInt(sTmp); else iClock = 0; if (iClock < 0 || sTmp.equals("")) iClock = 0; if (iClock > 999999999) iClock = 999999999; } catch (Exception e) { System.out.println("you cheeky Clock bahstahd for " + Chicago.sObjModel[iCount][Chicago.cnName]); iClock = 0; } sTmp = String.valueOf(iClock); sObjModel[iCount][cnClock] = sTmp; ////// 13. Size int iSize = 0; sTmp = myResultSet.getString(cnSize).trim(); if ( sTmp == null ) sObjModel[iCount][cnSize] = "0"; else sObjModel[iCount][cnSize] = sTmp; ///// But wait, there's more for numabhs... try { if (sTmp.length() > 0) iSize = Integer.parseInt(sTmp); else iSize = 0; if (iSize < 0) iSize = 0; if (iSize > 999999999) iSize = 999999999; } catch (Exception e) { System.out.println("you cheeky Size bahstahd for " + Chicago.sObjModel[iCount][Chicago.cnName]); iSize = 0; } sTmp = String.valueOf(iSize); sObjModel[iCount][cnSize] = sTmp; ////// 14. Version int iVersion = 0; sTmp = myResultSet.getString(cnVersion).trim(); if (sTmp == null) { System.out.println("Version is null"); sObjModel[iCount][cnVersion] = "1"; } else sObjModel[iCount][cnVersion] = sTmp; ///// But wait, there's more for numabhs... try { if (sTmp.length() > 0) iVersion = Integer.parseInt(sTmp); else { System.out.println("Version is null"); iVersion = 1; } if (iVersion < 1) iVersion = 1; if (iVersion > 999) iVersion = 999; } catch (Exception e) { System.out.println("you cheeky Version bahstahd for " + Chicago.sObjModel[iCount][Chicago.cnName]); iVersion = 1; } sTmp = String.valueOf(iVersion); sObjModel[iCount][cnVersion] = sTmp; ////// 14. Max Version int iMaxVersion = 0; sTmp = myResultSet.getString(cnMaxVersion).trim(); if (sTmp == null) { System.out.println("Max version is null"); sObjModel[iCount][cnMaxVersion] = "1"; } else sObjModel[iCount][cnMaxVersion] = sTmp; ///// But wait, there's more for numabhs... try { if (sTmp.length() > 0) iMaxVersion = Integer.parseInt(sTmp); else { System.out.println("iMaxVersion issue for " + Chicago.sObjModel[iCount][Chicago.cnName] + "***@***" + Chicago.sObjModel[iCount][Chicago.cnVersion]); iMaxVersion = 1; } if (iMaxVersion < 1) iMaxVersion = 1; if (iMaxVersion > 999) iMaxVersion = 999; } catch (Exception e) { System.out.println("you cheeky Max Version bahstahd for " + Chicago.sObjModel[iCount][Chicago.cnName]); iMaxVersion = 1; } sTmp = String.valueOf(iMaxVersion); sObjModel[iCount][cnMaxVersion] = sTmp; ////// Date Detritus String sFormattedDateNow = ""; try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss"); sFormattedDateNow = myDateObj.format(myFormatObj); Chicago.sObjModel[iCount][Chicago.cnCreateDate] = sFormattedDateNow; } catch (Exception e) { e.printStackTrace(); } ////// End Date Detritus ////// 15. Create Date sTmp = myResultSet.getString(cnCreateDate); // xDate should not have hyphens: if (sTmp != null) sTmp = sTmp.replaceAll("[-]", ""); if (sTmp == null) sObjModel[iCount][cnCreateDate] = sFormattedDateNow; else sObjModel[iCount][cnCreateDate] = sTmp; ////// 16. Update Date sTmp = myResultSet.getString(cnUpdateDate); // xDate should not have hyphens: if (sTmp != null) sTmp = sTmp.replaceAll("[-]", ""); if (sTmp == null) sObjModel[iCount][cnUpdateDate] = sFormattedDateNow; else sObjModel[iCount][cnUpdateDate] = sTmp; ////// 17. Finish Date sTmp = myResultSet.getString(cnFinishDate); if (sTmp != null) sTmp = sTmp.replaceAll("[-]", ""); if (sTmp == null) sObjModel[iCount][cnFinishDate] = ""; else sObjModel[iCount][cnFinishDate] = sTmp; ////// 18. Deleted sTmp = myResultSet.getString(cnDeleted); if ( sTmp == null ) sObjModel[iCount][cnDeleted] = "0"; else sObjModel[iCount][cnDeleted] = sTmp; ////// 19. Status sTmp = myResultSet.getString(cnStatus); if (sTmp == null) sObjModel[iCount][cnStatus] = "00-Not Started"; else sObjModel[iCount][cnStatus] = sTmp; ////// 20. ID sTmp = myResultSet.getString(cnID); if (sTmp == null) sObjModel[iCount][cnID] = ""; else sObjModel[iCount][cnID] = sTmp; ////// 0. Dorky Bit sObjModel[iCount][0] = String.valueOf(0); iCount++; }} catch (Exception e) { System.out.println( "The best laid plans of mice and men oft gang aglay"); e.printStackTrace(); } iRowCount = iCount - 1; // -1 because of the way ResultSet works System.out.println("Row Count: " + iRowCount); } ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////// This method is called to do the inserts public static void utlINSERTIntoDatabase(int i) { System.out.println("Inserting item " + i); try { String query = "INSERT INTO items (" + "itemType, atomType, name, contents, timesUsed, " + "climaxScene, notebook, correspondences, usages, listString, " + "context, relevance, clock, size, version, " + "maxVersion, createDate, updateDate, finishDate, deleted, status "//) " + ", ID) " + "VALUES (?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?,?,?,?, ?,?) "; PreparedStatement pstmt = myConnection.prepareStatement(query); // Fix the data if needed--i.e., to default values if they don't make sense if (sObjModel[i][cnItemType]==null) sObjModel[i][ cnItemType]="x"; pstmt.setString( 1, sObjModel[i][cnItemType]); if (sObjModel[i][cnAtomType]==null) sObjModel[i][cnAtomType]=""; pstmt.setString( 2, sObjModel[i][cnAtomType]); if (sObjModel[i][cnName]==null) sObjModel[i][cnName]="*42*"; pstmt.setString( 3, sObjModel[i][cnName]); if (sObjModel[i][cnContents]==null) sObjModel[i][ cnContents]=""; pstmt.setString( 4, sObjModel[i][cnContents]); if (sObjModel[i][cnTimesUsed]==null) sObjModel[i][ cnTimesUsed]=""; pstmt.setString( 5, sObjModel[i][cnTimesUsed]); if (sObjModel[i][cnClimaxScene]==null) sObjModel[i][cnClimaxScene]=""; pstmt.setString( 6, sObjModel[i][cnClimaxScene]); if (sObjModel[i][cnNotebook]==null) sObjModel[i][cnNotebook]=""; pstmt.setString( 7, sObjModel[i][cnNotebook]); if (sObjModel[i][cnCorrespondences]==null) sObjModel[i][ cnCorrespondences]=""; pstmt.setString( 8, sObjModel[i][cnCorrespondences]); if (sObjModel[i][cnUsages]==null) sObjModel[i][cnUsages]=""; pstmt.setString( 9, sObjModel[i][ cnUsages]); if (sObjModel[i][cnListString]==null) sObjModel[i][cnListString]=""; pstmt.setString(10, sObjModel[i][cnListString]); if (sObjModel[i][cnContext]==null) sObjModel[i][ cnContext]=""; pstmt.setString(11, sObjModel[i][cnContext]); if (sObjModel[i][cnRelevance]==null) sObjModel[i][cnRelevance]="0"; pstmt.setString(12, sObjModel[i][cnRelevance]); // Hopefully clock was set correctly. Check how those values are added if (sObjModel[i][cnClock]==null) sObjModel[i][cnClock]="0"; pstmt.setString(13, sObjModel[i][cnClock]); // Size is equal to the length of the sManifest field. Nothing more. sObjModel[i][cnSize]= String.valueOf(sObjModel[i][cnContents].length()); pstmt.setString(14, sObjModel[i][cnSize]); pstmt.setString(15, sObjModel[i][cnVersion]); pstmt.setString(16, sObjModel[i][cnVersion]); if (sObjModel[i][cnCreateDate]==null) { try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss"); String formattedDate = myDateObj.format(myFormatObj); Chicago.sObjModel[i][Chicago.cnCreateDate] = formattedDate; } catch (Exception e) { System.out.println("Exception inserting item. Problem with Create Date"); e.printStackTrace(); }} pstmt.setString(17, sObjModel[i][cnCreateDate]); // Note that the UpdateDate should = CreateDate if (sObjModel[i][cnUpdateDate]==null) sObjModel[i][cnUpdateDate]=sObjModel[i][cnCreateDate]; pstmt.setString(18, sObjModel[i][cnUpdateDate]); // FinishDate should be blank if it's null if (sObjModel[i][cnFinishDate]==null) sObjModel[i][cnFinishDate]=""; pstmt.setString(19, sObjModel[i][cnFinishDate]); // Deleted = 0 for this new item if (sObjModel[i][cnDeleted]==null) sObjModel[i][ cnDeleted]="0"; pstmt.setString(20, sObjModel[i][cnDeleted]); // Status if (sObjModel[i][cnStatus]==null) sObjModel[i][ cnStatus]="00-Not Started"; pstmt.setString(21, sObjModel[i][cnStatus]); // ID if (sObjModel[i][cnID]==null) { //sObjModel[i][ cnID]="123456789012"; try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyMMddHHmmss"); String formattedDate = myDateObj.format(myFormatObj); Chicago.sObjModel[i][Chicago.cnID] = formattedDate; } catch (Exception e) { System.out.println("Exception inserting item. Problem with ID"); e.printStackTrace(); }} pstmt.setString(22, sObjModel[i][cnID]); pstmt.executeUpdate (); sObjModel[i][DIRTY_BIT] = Integer.toString(0); } catch (SQLException e) { System.out.println("Yep, insert failed"); e.printStackTrace(); // Pop open a modal window alerting about the failure: ChicagoUIOKDialog fuck = new ChicagoUIOKDialog (new javax.swing.JFrame(), true); fuck.setLabel( "Exception Inserting this item!"); fuck.setLocationRelativeTo(null); fuck.setVisible (true); } } ///////////////////////////////////////////////////////////////////////// ////// This method is called to do the updates public static void utlUPDATEDatabase(int iObjModelIndex) { /******************************************************************* * This method is used to update the data that can be changed by the application * In some cases I may be updating items that could not possible have * changed (like create date, etc. So fucking what .|. * The dirtybit does not need to be set to get updated, but this * method resets the dirtybit to 0. */ try { // Only update matching sSearchItemType + name String query = "UPDATE items SET " + "itemType=?, atomType=?, name=?, contents=?, timesUsed=?, " + "climaxScene=?, notebook=?, correspondences=?, usages=?, listString=?, " + "context=?, relevance=?, clock=?, size=?, version=?, " + "maxVersion=?, createDate=?, updateDate=?, finishDate=?, deleted=?, " + "status=?, ID=? " + "WHERE context=? AND itemType=? AND name=? AND version=?"; PreparedStatement pstmt = myConnection.prepareStatement(query); if (sObjModel[iObjModelIndex][cnItemType]==null) sObjModel[iObjModelIndex][ cnItemType]="x"; pstmt.setString(1, sObjModel[iObjModelIndex][cnItemType]); if (sObjModel[iObjModelIndex][cnAtomType]==null) sObjModel[iObjModelIndex][cnAtomType]=""; pstmt.setString(2, sObjModel[iObjModelIndex][cnAtomType]); if (sObjModel[iObjModelIndex][cnName]==null) sObjModel[iObjModelIndex][cnName]="Some Fucking Name"; pstmt.setString(3, sObjModel[iObjModelIndex][cnName]); if (sObjModel[iObjModelIndex][cnContents]==null) sObjModel[iObjModelIndex][ cnContents]=""; pstmt.setString(4, sObjModel[iObjModelIndex][cnContents]); if (sObjModel[iObjModelIndex][cnTimesUsed]==null) sObjModel[iObjModelIndex][ cnTimesUsed]=""; pstmt.setString(5, sObjModel[iObjModelIndex][cnTimesUsed]); if (sObjModel[iObjModelIndex][cnClimaxScene]==null) sObjModel[iObjModelIndex][cnClimaxScene]=""; pstmt.setString(6, sObjModel[iObjModelIndex][cnClimaxScene]); if (sObjModel[iObjModelIndex][cnNotebook]==null) sObjModel[iObjModelIndex][cnNotebook]=""; pstmt.setString(7, sObjModel[iObjModelIndex][cnNotebook]); if (sObjModel[iObjModelIndex][cnCorrespondences]==null) sObjModel[iObjModelIndex][ cnCorrespondences]=""; pstmt.setString(8, sObjModel[iObjModelIndex][cnCorrespondences]); if (sObjModel[iObjModelIndex][cnUsages]==null) sObjModel[iObjModelIndex][cnUsages]=""; pstmt.setString(9, sObjModel[iObjModelIndex][ cnUsages]); if (sObjModel[iObjModelIndex][cnListString]==null) sObjModel[iObjModelIndex][cnListString]=""; pstmt.setString(10, sObjModel[iObjModelIndex][cnListString]); if (sObjModel[iObjModelIndex][cnContext]==null) sObjModel[iObjModelIndex][ cnContext]=""; pstmt.setString(11, sObjModel[iObjModelIndex][cnContext]); if (sObjModel[iObjModelIndex][cnRelevance]==null) sObjModel[iObjModelIndex][cnRelevance]="0"; pstmt.setString(12, sObjModel[iObjModelIndex][cnRelevance]); if (sObjModel[iObjModelIndex][cnClock]==null) sObjModel[iObjModelIndex][cnClock]="0"; pstmt.setString(13, sObjModel[iObjModelIndex][cnClock]); if (sObjModel[iObjModelIndex][cnSize]==null) sObjModel[iObjModelIndex][cnSize]="0"; pstmt.setString(14, sObjModel[iObjModelIndex][cnSize]); if (sObjModel[iObjModelIndex][cnVersion]==null) sObjModel[iObjModelIndex][cnVersion]="1"; pstmt.setString(15, sObjModel[iObjModelIndex][cnVersion]); if (sObjModel[iObjModelIndex][cnMaxVersion]==null) sObjModel[iObjModelIndex][cnMaxVersion]="1"; pstmt.setString(16, sObjModel[iObjModelIndex][cnMaxVersion]); String formattedDate = ""; if (sObjModel[iObjModelIndex][cnCreateDate]==null || sObjModel[iObjModelIndex][cnCreateDate].length() < 1) { try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss"); formattedDate = myDateObj.format(myFormatObj); Chicago.sObjModel[iObjModelIndex][Chicago.cnUpdateDate] = formattedDate; } catch (Exception e) { System.out.println("Exception inserting item. Problem with Create Date"); e.printStackTrace(); }} pstmt.setString(17, sObjModel[iObjModelIndex][cnCreateDate]); // UpdateDate has no fucking soul. Set it to now immediately: sObjModel[iObjModelIndex][cnUpdateDate] = formattedDate; pstmt.setString(18, sObjModel[iObjModelIndex][cnUpdateDate]); if (sObjModel[iObjModelIndex][cnFinishDate]==null) sObjModel[iObjModelIndex][cnFinishDate]=""; pstmt.setString(19, sObjModel[iObjModelIndex][cnFinishDate]); if (sObjModel[iObjModelIndex][cnDeleted]==null) sObjModel[iObjModelIndex][ cnDeleted]=""; pstmt.setString(20, sObjModel[iObjModelIndex][cnDeleted]); if (sObjModel[iObjModelIndex][cnStatus]==null) sObjModel[iObjModelIndex][ cnStatus]="00-Not Started"; pstmt.setString(21, sObjModel[iObjModelIndex][cnStatus]); if (sObjModel[iObjModelIndex][cnID]==null) sObjModel[iObjModelIndex][ cnID]="123456789012"; pstmt.setString(22, sObjModel[iObjModelIndex][cnID]); // WHERE CLAUSE: pstmt.setString(23, sObjModel[iObjModelIndex][cnContext]); pstmt.setString(24, sObjModel[iObjModelIndex][cnItemType]); pstmt.setString(25, sObjModel[iObjModelIndex][cnName]); pstmt.setString(26, sObjModel[iObjModelIndex][cnVersion]); /* System.out.println("sObjModel[" + iObjModelIndex + "][[] = " + sObjModel[iObjModelIndex][cnContext] + " > " + sObjModel[iObjModelIndex][cnItemType] + " : " + sObjModel[iObjModelIndex][cnVersion] + " *** being set to: " + sObjModel[iObjModelIndex][cnID]); */ // EXECUTE THIS 'BAD BOY' int iExecuteUpdateReturnValue = pstmt.executeUpdate(); System.out.println("Execute Update returned: " + iExecuteUpdateReturnValue); // RESET THE DIRTY_BIT sObjModel[iObjModelIndex][DIRTY_BIT] = Integer.toString(0); //System.out.println("Execute complete. Setting Dirty Bit on " + iObjModelIndex + " to: " + sObjModel[iObjModelIndex][DIRTY_BIT]); } catch (SQLException e) { // Pop open a modal window alerting about the failure: System.out.println(e.getSQLState()); ChicagoUIOKDialog fuck = new ChicagoUIOKDialog (new javax.swing.JFrame(), true); fuck.setLabel( "Exception Updating this item!"); fuck.setLocationRelativeTo(null); fuck.setVisible (true); } // COPY CHICAGO.DB TO CHICAGO-YYYYMMDDHHMMSS.DB try { if ( DEBUG_DATABASE ) { String sPath = "/Users/lance/Chicago/"; File source = new File(sPath + "chicago.db"); String sDate = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); File destination = new File(sPath + "chicago" + sDate + ".db"); utlCopyFile(source, destination); }} catch (Exception e) { e.printStackTrace(); } } public static void utlMattMode() { System.out.println("Matt mode engaged"); String query = ""; PreparedStatement pstmt; int iExecuteUpdateReturnValue = -1; // Matt mode prunes the database of all non max versions... try { query = "DELETE FROM items WHERE version <> maxVersion"; pstmt = myConnection.prepareStatement(query); iExecuteUpdateReturnValue = pstmt.executeUpdate(); System.out.println("Matt mode deleted this many fucking records: " + iExecuteUpdateReturnValue); // And sets the versions to 1 query = "UPDATE items SET version = '1', maxVersion = '1'"; pstmt = myConnection.prepareStatement(query); iExecuteUpdateReturnValue = pstmt.executeUpdate(); System.out.println("Matt mode updated this many fucking records: " + iExecuteUpdateReturnValue); } catch (SQLException e) { // Pop open a modal window alerting about the failure: System.out.println(e.getSQLState()); ChicagoUIOKDialog fuck = new ChicagoUIOKDialog (new javax.swing.JFrame(), true); fuck.setLabel( "Exception in Matt mode, you fucker."); fuck.setLocationRelativeTo(null); fuck.setVisible (true); } } public static void lanceit() { System.out.println("Lancing it..."); // At this point I should have a connection to the database and all // the columns defined. // // What I want to do is the following: // loop through the object model // stick a value in each row // call the update method // exit. utlSELECTIntoObjtModel(); String sIDPrefix = "10000000"; for (int iCounter = 1; iCounter < iRowCount; iCounter++) { // convert iCounter to a four character string String sCounter = String.valueOf(iCounter); while (sCounter.length() < 4) { sCounter = "0" + sCounter; } sObjModel[iCounter][cnID] = sIDPrefix + sCounter; utlUPDATEDatabase(iCounter); } System.exit(0); } ///////////////////////////////////////////////////////////////////////// /////// NOW FOR THE REASON WHY YOU ARE HERE, MY MAIN MAN ... ////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// public static void main ( String[] args) { System.out.println ( "Welcome to Chicago." ); /* //loading an image from a file final Toolkit defaultToolkit = Toolkit.getDefaultToolkit(); final URL url = Chicago.class.getClassLoader().getResource("src/main/java/com/mattmclaurine/chicago/images/ecnal.png"); final Image image = defaultToolkit.getImage(url); //this is new since JDK 9 final Taskbar taskbar = Taskbar.getTaskbar(); try { //set icon for mac os (and other systems which do support this method) taskbar.setIconImage(image); } catch (final UnsupportedOperationException e) { System.out.println("The os does not support: 'taskbar.setIconImage'"); } catch (final SecurityException e) { System.out.println("There was a security exception for: 'taskbar.setIconImage'"); } */ TimerTask performDatabaseWork = new TimerTask() { public void run() { for (int i = iRowCount; i >= 1; i--) { //System.out.println("Perform Database Work: sObjModel[" + i + "][DIRTY_BIT] = " + sObjModel[i][DIRTY_BIT]); int iDirtyBit = -1; try { iDirtyBit = Integer.parseInt(sObjModel[i][DIRTY_BIT]); } catch (Exception e) { System.out.println("Exception in run()... Setting DirtyBit to 0 for " + sObjModel[i][cnName]); iDirtyBit = 0; } if (iDirtyBit == DIRTY_BIT_INSERT) utlINSERTIntoDatabase(i); if (iDirtyBit == DIRTY_BIT_UPDATE) utlUPDATEDatabase(i); // Let the inserts/updates set the value to 0 only when they work //sObjModel[i][DIRTY_BIT] = Integer.toString(0); }}}; // Schedule the tasks that do the important database shit myScheduler.scheduleAtFixedRate(performDatabaseWork, 1000, 2000); myConnection = null; try { properties.load(new FileInputStream( pathName + "PropertiesChicago.properties")); } catch (IOException e) { System.out.println("Garbage in loading properties"); System.exit( 0 ); } isMac = Integer.parseInt(properties.getProperty("isMac")); if (args.length > 0) isMac = Integer.parseInt(args[0]); if (isMac == 0) { pathName = pathNameWin; System.out.println("This is a fucking PC"); } else { System.out.println("This is a fucking Mac"); } sJDBC = properties.getProperty("JDBC"); sURL = properties.getProperty("url"); sURL2 = properties.getProperty("url2"); sURL3 = properties.getProperty("url3"); sURLWin = properties.getProperty("urlWin"); sURL2Win = properties.getProperty("url2Win"); sURL3Win = properties.getProperty("url3Win"); if (isMac == 1) iRowCount = utlSetJDBCConnection(sJDBC, sURL); else iRowCount = utlSetJDBCConnection(sJDBC, sURLWin); utlSetColumnNumbers(); if (iLanceFuckingMode == LANCE_FUCKING_MODE) { lanceit(); } utlSELECTIntoObjtModel(); // Now create a home screen onbject. No context at this point. No item selected scnHome.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.out.println ("Home screen closing..."); // At this point I could store the time spent on this screen in item 0 // int startingTime = sObjModel[0][cnClock]; // int totalTime = startingTime + scnHome.getTimeSpent(); //Chicago.utlProjectManagement(); System.exit (0 ); } }); scnHome.setChkAndRad(); scnHome.setMode2Priest(); scnHome.utlRedrawItemsList(); scnHome.utlRunTask(); scnHome.utlStartAStopwatch(true); //This method could either start the scheduled task //or I could create a new method scnHome.setDefaultUIColorsAndTimePermittingFonts(); scnHome.setLocationRelativeTo(null); scnHome.setVisible(true); } ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// /////// THAT'S ALL, FOLKS! THANKS FOR COMING TO MY APP ///////// ///////////////////////////////////////////////////////////////////////// } /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/OkCancelDialog.java to edit this template */ package com.mattmclaurine.chicago; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import javax.swing.AbstractAction; import javax.swing.ActionMap; import javax.swing.InputMap; import javax.swing.JComponent; import javax.swing.KeyStroke; /** * * @author lance */ public class ChicagoUIOKDialog extends javax.swing.JDialog { public String txtResult = ""; public int iMyObjectIndex = -1; /** * A return status code - returned if Cancel button has been pressed */ public static final int RET_CANCEL = 0; /** * A return status code - returned if OK button has been pressed */ public static final int RET_OK = 1; /** * Creates new form okFile1OkCancelDialog */ public ChicagoUIOKDialog(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); // Close the dialog when Esc is pressed String cancelName = "cancel"; InputMap inputMap = getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), cancelName); ActionMap actionMap = getRootPane().getActionMap(); actionMap.put(cancelName, new AbstractAction() { public void actionPerformed(ActionEvent e) { doClose(RET_CANCEL); } }); } /** * @return the return status of this dialog - one of RET_OK or RET_CANCEL */ public int getReturnStatus() { return returnStatus; } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { okButton = new javax.swing.JButton(); cancelButton = new javax.swing.JButton(); lblWhatToFuckingSay = new javax.swing.JLabel(); txtField = new javax.swing.JTextField(); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); okButton.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N okButton.setText("OK"); okButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { okButtonMouseClicked(evt); } }); okButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { okButtonActionPerformed(evt); } }); cancelButton.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N cancelButton.setText("Cancel"); cancelButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { cancelButtonMouseClicked(evt); } }); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); lblWhatToFuckingSay.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblWhatToFuckingSay.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lblWhatToFuckingSay.setText("This is the caption to replace"); txtField.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtField.setHorizontalAlignment(javax.swing.JTextField.CENTER); txtField.setText("0:00:00"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(78, 78, 78) .addComponent(okButton, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cancelButton)) .addGroup(layout.createSequentialGroup() .addGap(37, 37, 37) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(lblWhatToFuckingSay, javax.swing.GroupLayout.DEFAULT_SIZE, 263, Short.MAX_VALUE) .addComponent(txtField)))) .addContainerGap(37, Short.MAX_VALUE)) ); layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {cancelButton, okButton}); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(17, 17, 17) .addComponent(lblWhatToFuckingSay, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(txtField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cancelButton) .addComponent(okButton)) .addGap(21, 21, 21)) ); getRootPane().setDefaultButton(okButton); pack(); }// //GEN-END:initComponents private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed doClose(RET_OK); }//GEN-LAST:event_okButtonActionPerformed private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed doClose(RET_CANCEL); }//GEN-LAST:event_cancelButtonActionPerformed /** * Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog doClose(RET_CANCEL); }//GEN-LAST:event_closeDialog private void okButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_okButtonMouseClicked if (this.iMyObjectIndex==-1) { System.out.println("No soup for you"); return; } this.txtResult = this.txtField.getText(); System.out.println("Setting result to: " + txtResult); setVisible(false); dispose(); }//GEN-LAST:event_okButtonMouseClicked private void cancelButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cancelButtonMouseClicked this.txtField.setText(""); }//GEN-LAST:event_cancelButtonMouseClicked private void doClose(int retStatus) { returnStatus = retStatus; setVisible(false); dispose(); } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ChicagoUIOKDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ChicagoUIOKDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ChicagoUIOKDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ChicagoUIOKDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // // // // // // // // /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { ChicagoUIOKDialog dialog = new ChicagoUIOKDialog(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton cancelButton; private javax.swing.JLabel lblWhatToFuckingSay; private javax.swing.JButton okButton; private javax.swing.JTextField txtField; // End of variables declaration//GEN-END:variables public String showDialog() { setVisible(true); return this.txtField.getText(); } private int returnStatus = RET_CANCEL; public void setLabel ( String theMessage ) { lblWhatToFuckingSay.setText(theMessage); } } /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JDialog.java to edit this template */ package com.mattmclaurine.chicago; // TODO 20230802: COMPARISON SCREEN NEEDS TO BE CALLED IN A MANNER // THAT THE INVENTORY LIST MATCHES WHATEVER IS ON // THE HOME SCREEN'S INVENTORY SCREEN AT THAT TIME. // IT MAKES THE CODING MUCH SIMPLIER, + IF I FILTERED // ON THE HOME SCREEN, I SHOULD BE FILTERED, TOO // // .|. // // NEED TO HAVE A METHOD THAT SETS THE COMBOS THAT HOME SCREEN CALLS // PASSING THE VALUE OF IT INVENTORY LIST'S MODEL. import java.sql.Connection; import java.sql.ResultSet; import java.util.ArrayList; import com.google.common.base.Stopwatch; import static com.mattmclaurine.chicago.Chicago.CONTEXT_MAX_LEN; import static com.mattmclaurine.chicago.Chicago.NAME_MAX_LEN; import javax.swing.DefaultComboBoxModel; import javax.swing.SwingUtilities; /** * * @author lance */ public class ComparisonScreen extends javax.swing.JDialog { private static Stopwatch aStopwatch = new Stopwatch(); private static Stopwatch myStopwatch2 = new Stopwatch(); private int iMyLastIndex = -1; /** * Creates new form jdialogVersionCompareTool */ public ComparisonScreen(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); buttonGroup2 = new javax.swing.ButtonGroup(); panComparisonScreen = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); txaContents1 = new javax.swing.JTextArea(); jlbClockTimeUsed = new javax.swing.JLabel(); txtClock = new javax.swing.JTextField(); jScrollPane3 = new javax.swing.JScrollPane(); txaContents2 = new javax.swing.JTextArea(); cboInventory1 = new javax.swing.JComboBox<>(); cboInventory2 = new javax.swing.JComboBox<>(); cboVersion1 = new javax.swing.JComboBox<>(); cboVersion2 = new javax.swing.JComboBox<>(); jButtonCommit1 = new javax.swing.JButton(); jButtonCancel1 = new javax.swing.JButton(); jButtonCommit2 = new javax.swing.JButton(); jButtonCancel2 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setBackground(new java.awt.Color(0, 0, 0)); setForeground(new java.awt.Color(0, 0, 0)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); panComparisonScreen.setBackground(new java.awt.Color(0, 0, 0)); panComparisonScreen.setForeground(new java.awt.Color(255, 255, 255)); txaContents1.setBackground(new java.awt.Color(0, 0, 0)); txaContents1.setColumns(80); txaContents1.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txaContents1.setForeground(new java.awt.Color(204, 204, 255)); txaContents1.setLineWrap(true); txaContents1.setRows(5); txaContents1.setWrapStyleWord(true); txaContents1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txaContents1.setCaretColor(new java.awt.Color(255, 255, 0)); txaContents1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); txaContents1.setDisabledTextColor(new java.awt.Color(255, 51, 51)); txaContents1.setSelectedTextColor(new java.awt.Color(255, 0, 255)); txaContents1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txaContents1MouseClicked(evt); } }); jScrollPane2.setViewportView(txaContents1); jlbClockTimeUsed.setBackground(new java.awt.Color(0, 0, 0)); jlbClockTimeUsed.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N jlbClockTimeUsed.setForeground(new java.awt.Color(204, 204, 255)); jlbClockTimeUsed.setText("Clock Time:"); jlbClockTimeUsed.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtClock.setBackground(new java.awt.Color(0, 0, 0)); txtClock.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtClock.setForeground(new java.awt.Color(204, 204, 255)); txtClock.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtClock.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtClock.setEnabled(false); txtClock.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtClockActionPerformed(evt); } }); txaContents2.setBackground(new java.awt.Color(0, 0, 0)); txaContents2.setColumns(80); txaContents2.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txaContents2.setForeground(new java.awt.Color(204, 204, 255)); txaContents2.setLineWrap(true); txaContents2.setRows(5); txaContents2.setWrapStyleWord(true); txaContents2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txaContents2.setCaretColor(new java.awt.Color(255, 255, 255)); txaContents2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); txaContents2.setSelectedTextColor(new java.awt.Color(255, 204, 0)); txaContents2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txaContents2MouseClicked(evt); } }); jScrollPane3.setViewportView(txaContents2); cboInventory1.setBackground(new java.awt.Color(204, 204, 255)); cboInventory1.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N cboInventory1.setForeground(new java.awt.Color(0, 0, 0)); cboInventory1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1", "2", "3", "4" })); cboInventory1.setBorder(null); cboInventory1.setMaximumSize(new java.awt.Dimension(200, 23)); cboInventory1.setMinimumSize(new java.awt.Dimension(200, 23)); cboInventory1.setPreferredSize(new java.awt.Dimension(200, 23)); cboInventory1.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { cboInventory1ItemStateChanged(evt); } }); cboInventory1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { cboInventory1MouseClicked(evt); } }); cboInventory1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboInventory1ActionPerformed(evt); } }); cboInventory2.setBackground(new java.awt.Color(204, 204, 255)); cboInventory2.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N cboInventory2.setForeground(new java.awt.Color(0, 0, 0)); cboInventory2.setBorder(null); cboInventory2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { cboInventory2MouseClicked(evt); } }); cboInventory2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboInventory2ActionPerformed(evt); } }); cboVersion1.setBackground(new java.awt.Color(204, 204, 255)); cboVersion1.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N cboVersion1.setForeground(new java.awt.Color(0, 0, 0)); cboVersion1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1", "2", "3", "4" })); cboVersion1.setBorder(null); cboVersion1.setMaximumSize(new java.awt.Dimension(200, 23)); cboVersion1.setMinimumSize(new java.awt.Dimension(200, 23)); cboVersion1.setPreferredSize(new java.awt.Dimension(200, 23)); cboVersion1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { cboVersion1MouseClicked(evt); } }); cboVersion1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboVersion1ActionPerformed(evt); } }); cboVersion2.setBackground(new java.awt.Color(204, 204, 255)); cboVersion2.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N cboVersion2.setForeground(new java.awt.Color(0, 0, 0)); cboVersion2.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "1", "2", "3", "4" })); cboVersion2.setBorder(null); cboVersion2.setMaximumSize(new java.awt.Dimension(200, 23)); cboVersion2.setMinimumSize(new java.awt.Dimension(200, 23)); cboVersion2.setPreferredSize(new java.awt.Dimension(200, 23)); cboVersion2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { cboVersion2MouseClicked(evt); } }); cboVersion2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboVersion2ActionPerformed(evt); } }); jButtonCommit1.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N jButtonCommit1.setText("commit"); jButtonCancel1.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N jButtonCancel1.setText("cancel"); jButtonCancel1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancel1ActionPerformed(evt); } }); jButtonCommit2.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N jButtonCommit2.setText("commit"); jButtonCancel2.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N jButtonCancel2.setText("cancel"); jButtonCancel2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCancel2ActionPerformed(evt); } }); javax.swing.GroupLayout panComparisonScreenLayout = new javax.swing.GroupLayout(panComparisonScreen); panComparisonScreen.setLayout(panComparisonScreenLayout); panComparisonScreenLayout.setHorizontalGroup( panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panComparisonScreenLayout.createSequentialGroup() .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panComparisonScreenLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jlbClockTimeUsed) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtClock, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, panComparisonScreenLayout.createSequentialGroup() .addGap(30, 30, 30) .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 650, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(panComparisonScreenLayout.createSequentialGroup() .addComponent(cboInventory1, javax.swing.GroupLayout.PREFERRED_SIZE, 556, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(cboVersion1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(panComparisonScreenLayout.createSequentialGroup() .addComponent(jButtonCommit1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonCancel1))) .addGap(18, 18, 18) .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panComparisonScreenLayout.createSequentialGroup() .addComponent(jButtonCommit2) .addGap(18, 18, 18) .addComponent(jButtonCancel2)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panComparisonScreenLayout.createSequentialGroup() .addComponent(cboInventory2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(cboVersion2, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 16, Short.MAX_VALUE))) .addGap(22, 22, 22)) ); panComparisonScreenLayout.setVerticalGroup( panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panComparisonScreenLayout.createSequentialGroup() .addContainerGap() .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jlbClockTimeUsed) .addComponent(txtClock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cboInventory2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboInventory1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboVersion1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboVersion2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 614, Short.MAX_VALUE) .addComponent(jScrollPane3)) .addGap(18, 18, 18) .addGroup(panComparisonScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonCancel1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonCommit1, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonCancel2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButtonCommit2, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panComparisonScreen, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(panComparisonScreen, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// //GEN-END:initComponents private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed System.out.println("Trying to close...formWindowClosed"); utlStopStopwatch(); this.dispose(); }//GEN-LAST:event_formWindowClosed private void jButtonCancel2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancel2ActionPerformed // At some point, code in the saving of the clock to this item (on the left) this.dispose(); }//GEN-LAST:event_jButtonCancel2ActionPerformed private void jButtonCancel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCancel1ActionPerformed // At some point, code in the saving of the clock to this item (on the left) this.dispose(); }//GEN-LAST:event_jButtonCancel1ActionPerformed private void txtClockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtClockActionPerformed //System.out.println("Fuck you, Alfred. I'm in txtClockActionPerformed"); }//GEN-LAST:event_txtClockActionPerformed private void cboInventory1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cboInventory1MouseClicked }//GEN-LAST:event_cboInventory1MouseClicked private void cboInventory1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboInventory1ActionPerformed if (iMyLastIndex != -1) { // For god's sake, stop the clock and save it. utlStopStopwatch(); String sMyLastIndexsClock = Chicago.sObjModel[iMyLastIndex][Chicago.cnClock].trim(); int iMyLastIndexsClock = Integer.parseInt(sMyLastIndexsClock); int iMyLastIndexsNewClock = iMyLastIndexsClock + utlGetTimeSpent(); String sMyLastIndexsNewClock = String.valueOf(iMyLastIndexsNewClock); Chicago.sObjModel[iMyLastIndex][Chicago.cnClock] = sMyLastIndexsNewClock; if (Chicago.sObjModel[iMyLastIndex][Chicago.DIRTY_BIT].equals("1")) Chicago.sObjModel[iMyLastIndex][Chicago.DIRTY_BIT] = String.valueOf(Chicago.DIRTY_BIT_UPDATE); } String sItemSelected = cboInventory1.getSelectedItem().toString(); // TODO: set the value of the content area, int iObjModelIndex = Chicago.utlDecodeListStringToIndex(sItemSelected); // or... iObjModelIndex=cboInventory1.getSelectedIndex(); txaContents1.setText(Chicago.sObjModel[iObjModelIndex][Chicago.cnContents]); // Don't forget the clock... String sClock = Chicago.sObjModel[iObjModelIndex][Chicago.cnClock].trim(); int iClock = Integer.parseInt(sClock); txtClock.setText(Chicago.utlConvertIntToClock(iClock)); // set the values of my associated version combox box, utlUpdateVersionDropDown(1); String sVersion = Chicago.sObjModel[iObjModelIndex][Chicago.cnVersion]; cboVersion1.setSelectedItem(sVersion); iMyLastIndex = iObjModelIndex; utlStartStopwatch(); }//GEN-LAST:event_cboInventory1ActionPerformed private void txaContents1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txaContents1MouseClicked // TODO add your handling code here: }//GEN-LAST:event_txaContents1MouseClicked private void txaContents2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txaContents2MouseClicked }//GEN-LAST:event_txaContents2MouseClicked private void cboInventory2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboInventory2ActionPerformed try { String sItemSelected = cboInventory2.getSelectedItem().toString(); int iObjModelIndex = Chicago.utlDecodeListStringToIndex(sItemSelected); // or... iObjModelIndex=cboInventory1.getSelectedIndex(); txaContents2.setText(Chicago.sObjModel[iObjModelIndex][Chicago.cnContents]); // set the values of my associated version combox box, utlUpdateVersionDropDown(2); String sVersion = Chicago.sObjModel[iObjModelIndex][Chicago.cnVersion]; cboVersion2.setSelectedItem(sVersion); } catch (Exception e) { return; } }//GEN-LAST:event_cboInventory2ActionPerformed private void cboVersion1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cboVersion1MouseClicked }//GEN-LAST:event_cboVersion1MouseClicked private void cboVersion1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboVersion1ActionPerformed // TODO add your handling code here: // find which item should be displayed based on the item info shown in the combo and the version try { String sVersionSelected = cboVersion1.getSelectedItem().toString(); String sComboSelectedItem = cboInventory1.getSelectedItem().toString(); // replace the version in sCombo with the value in sVersionSelected int iDelimeterLocation = sComboSelectedItem.indexOf(" @ "); String sListString = cboInventory1.getSelectedItem().toString() .substring(0, iDelimeterLocation) + " @ " + sVersionSelected; int iNewX = Chicago.utlDecodeListStringToIndex(sListString); // This is overkill: //setSomethingToX(iNewX, 1); // I really only need to update the contents and the version drop down txaContents1.setText(Chicago.sObjModel[iNewX][Chicago.cnContents]); // Assuming that cboInventory1 is already set } catch (Exception e) { //System.out.println("somethin's null in cboVersion1ActionPerformed"); } }//GEN-LAST:event_cboVersion1ActionPerformed private void cboVersion2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cboVersion2MouseClicked }//GEN-LAST:event_cboVersion2MouseClicked private void cboVersion2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboVersion2ActionPerformed // TODO add your handling code here: // find which item should be displayed based on the item info shown in the combo and the version try { String sVersionSelected = cboVersion2.getSelectedItem().toString(); String sComboSelectedItem = cboInventory2.getSelectedItem().toString(); // replace the version in sCombo with the value in sVersionSelected int iDelimeterLocation = sComboSelectedItem.indexOf(" @ "); String sListString = cboInventory2.getSelectedItem().toString() .substring(0, iDelimeterLocation) + " @ " + sVersionSelected; int iNewX = Chicago.utlDecodeListStringToIndex(sListString); // This is overkill: //setSomethingToX(iNewX, 1); // I really only need to update the contents and the version drop down txaContents2.setText(Chicago.sObjModel[iNewX][Chicago.cnContents]); // Assuming that cboInventory1 is already set } catch (Exception e) { //System.out.println("somethin's null in cboVersion2ActionPerformed"); } }//GEN-LAST:event_cboVersion2ActionPerformed private void cboInventory2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_cboInventory2MouseClicked }//GEN-LAST:event_cboInventory2MouseClicked private void cboInventory1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_cboInventory1ItemStateChanged // TODO add your handling code here: }//GEN-LAST:event_cboInventory1ItemStateChanged /** * @param args the command line arguments */ // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.ButtonGroup buttonGroup1; private javax.swing.ButtonGroup buttonGroup2; private javax.swing.JComboBox cboInventory1; private javax.swing.JComboBox cboInventory2; private javax.swing.JComboBox cboVersion1; private javax.swing.JComboBox cboVersion2; private javax.swing.JButton jButtonCancel1; private javax.swing.JButton jButtonCancel2; private javax.swing.JButton jButtonCommit1; private javax.swing.JButton jButtonCommit2; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JLabel jlbClockTimeUsed; private javax.swing.JPanel panComparisonScreen; private javax.swing.JTextArea txaContents1; private javax.swing.JTextArea txaContents2; private javax.swing.JTextField txtClock; // End of variables declaration//GEN-END:variables public void setInventoryCombos(int x) { // X NEEDS TO BE CONVERTED TO MATCH AN ITEM IN THE ITEM LIST this.cboInventory1.setSelectedIndex(x); this.cboVersion1.setSelectedIndex(this.cboVersion1.getItemCount() - 1); this.cboInventory2.setSelectedIndex(x); this.cboVersion2.setSelectedIndex(this.cboVersion2.getItemCount() - 1); } ///////////////////////////////////////////////////////////////////////// public void setInitialValues() { // Pre search, ie. String[] comboBoxItems = Chicago.getALLItemsSorted(); DefaultComboBoxModel nameModel = new DefaultComboBoxModel<> (comboBoxItems); cboInventory1.setModel(nameModel); cboInventory2.setModel(nameModel); cboInventory1.setSelectedIndex(0); cboInventory2.setSelectedIndex(0); // TODO, NEED TO MAKE THE VERSION DROP DOWN 1 AND 2 utlUpdateVersionDropDown(1); utlUpdateVersionDropDown(2); } ///////////////////////////////////////////////////////////////////////// // for gods sake, delete the below line because it should NOT be called // so don't let it. public void setItemTypeNameListsToDefault() { String[] comboBoxItems = Chicago.getALLItemsSorted(); DefaultComboBoxModel nameModel = new DefaultComboBoxModel<> ( comboBoxItems ); cboInventory1.setModel( nameModel); cboInventory2.setModel( nameModel); cboInventory1.setSelectedIndex(0); cboInventory2.setSelectedIndex(0); utlUpdateVersionDropDown(1); utlUpdateVersionDropDown(2); } ///////////////////////////////////////////////////////////////////////// public void setSomethingToX(int x, int whichOne ) { // Set the text area's value to what is specified by X try { if ( whichOne == 1) txaContents1.setText(Chicago.sObjModel[x][Chicago.cnContents]); else txaContents2.setText(Chicago.sObjModel[x][Chicago.cnContents]); } catch (Exception ex) { System.out.println( "Got a null..."); System.out.println( ex.getMessage ()); } // Set the combo box to point at the correct item int match = -1; if ( whichOne == 1 || whichOne == 2) { int iCountMax = -1; if (whichOne == 1) iCountMax = cboInventory1.getItemCount(); if (whichOne == 2) iCountMax = cboInventory2.getItemCount(); // Loop through the combo box one item at a time to find the match to X for (int iCount = 0; iCount < iCountMax; iCount++) { String sComboBoxValue = ""; if (whichOne == 1) sComboBoxValue = cboInventory1.getItemAt(iCount); if (whichOne == 2) sComboBoxValue = cboInventory2.getItemAt(iCount); ////////////////////////// COMBO BOX STRING FORMATTING // // .|. // // pull it out of sComboBoxValue // Context: int iDelimeterLocation = sComboBoxValue.indexOf(" > "); String sTempContext = sComboBoxValue.substring(0, iDelimeterLocation); if (sTempContext.length() > CONTEXT_MAX_LEN ) sTempContext = sTempContext.substring(0, CONTEXT_MAX_LEN); sTempContext = sTempContext.trim(); // CHOMP it String sTempListItem = sComboBoxValue; sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // ItemType + the rest // Item Type: String sTempItemType = sTempListItem.substring(0,1); // CHOMP it iDelimeterLocation = sTempListItem.indexOf(" # "); sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Relevance + the rest // Relevance: String sTempRelevance = ""; iDelimeterLocation = sTempListItem.indexOf(" &"); // Chomp out the temp string sTempRelevance = sTempListItem.substring(0, iDelimeterLocation).trim(); int iTempRelevance; try { iTempRelevance = Integer.parseInt(sTempRelevance); } catch (Exception e) { System.out.println("SEARCH Relevance is fucked up. Got: ***" + sTempRelevance + "***"); iTempRelevance = 0; } if (iTempRelevance < 0) iTempRelevance = 0; if (iTempRelevance > 100) iTempRelevance = 100; sTempRelevance = String.valueOf(iTempRelevance); // CHOMP it sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Date + the rest // Finish Date: String sTempFinishDate; try { sTempFinishDate = sTempListItem.substring(0, 8).trim(); } catch (Exception e) { System.out.println("Finish date is fucked"); sTempFinishDate = ""; } sTempFinishDate = sTempFinishDate.trim(); // CHOMP it iDelimeterLocation = sTempListItem.indexOf(" : "); sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Name + the rest // Name: iDelimeterLocation = sTempListItem.indexOf(" @ "); String sTempName = sTempListItem.substring(0, iDelimeterLocation); if (sTempName.length() > NAME_MAX_LEN) sTempName = sTempName.substring(0, NAME_MAX_LEN); sTempName = sTempName.trim(); // CHOMP it sTempListItem = sTempListItem.substring(iDelimeterLocation + 3); // Version // Version: String sTempVersion = sTempListItem.trim(); int iTempVersion; try { iTempVersion = Integer.parseInt(sTempVersion); } catch (Exception e) { System.out.println("Version is fucked up, dipshit. Setting version to 1..."); iTempVersion=1; } if (iTempVersion < 0) iTempVersion = 1; sTempVersion = String.valueOf(iTempVersion); ////////////////////////// X STRING FORMATTING // CONTEXT String sXContext = Chicago.sObjModel[x][Chicago.cnContext]; if (sXContext.length() > CONTEXT_MAX_LEN ) sXContext = sXContext.substring(0, CONTEXT_MAX_LEN); sXContext = sTempContext.trim(); // paranoia subsiding // ITEM TYPE String sXItemType = Chicago.sObjModel[x][Chicago.cnItemType]; // RELEVANCE String sXRelevance = Chicago.sObjModel[x][Chicago.cnRelevance].trim(); int iXRelevance; try { iXRelevance = Integer.parseInt(sXRelevance); } catch (Exception e) { System.out.println("OM Relevance is fucked up, dipshit. Setting relevance to 0..."); iXRelevance = 0; } if (iXRelevance < 0) iXRelevance = 0; if (iXRelevance > 100) iXRelevance = 100; sXRelevance = String.valueOf(iXRelevance); // same thing as trimming ;) // FINISH DATE String sXFinishDate = Chicago.sObjModel[x][Chicago.cnFinishDate]; try { if (sXFinishDate.length() > 8) sXFinishDate = sXFinishDate.substring(0,8); } catch (Exception e) { System.out.println("Exception in DecodeListToString on Finish Date"); sXFinishDate = ""; } sXFinishDate = sXFinishDate.trim(); // NAME String sXName = Chicago.sObjModel[x][Chicago.cnName]; try { if (sXName.length() > Chicago.NAME_MAX_LEN) sXName = sXName.substring(0,Chicago.NAME_MAX_LEN); } catch (Exception e) { System.out.println("Exception in DecodeListToString on Name"); sXName = ""; } sXName = sXName.trim(); // paranoia subsiding // VERSION String sXVersion = Chicago.sObjModel[x][Chicago.cnVersion].trim(); int iXVersion; try { iXVersion = Integer.parseInt(sXVersion); } catch (Exception e) { System.out.println("OM Version is fucked up, dipshit. Setting version to 1..."); iXVersion=1; } if (iXVersion < 1) iXVersion = 1; sXVersion = String.valueOf(iXVersion); //////////////// FINALLLLLLLY // Now I can construct the string to match if (sXContext.equals(sTempContext) && sXItemType.equals(sTempItemType) && sXName.equals(sTempName) && sXVersion.equals(sTempVersion)) { if (whichOne == 1) { cboInventory1.setSelectedIndex(iCount); utlUpdateVersionDropDown(1); } if (whichOne == 2) { cboInventory2.setSelectedIndex(iCount); utlUpdateVersionDropDown(2); } break; }}} } ///////////////////////////////////////////////////////////////////////// public int utlGetTimeSpent() { return (int) (aStopwatch.elapsedMillis() / 1000); } public static void utlStartStopwatch() { if (aStopwatch.isRunning()) return; // TODO: confirm how the clock should update. E.g., should I use reset instead of start? else aStopwatch.reset(); aStopwatch.start(); } ///////////////////////////////////////////////////////////////////////// public void utlStopStopwatch() { if (aStopwatch.isRunning()) aStopwatch.stop(); // If you could go ahead and store this in the database, that'd be great int iClockTime = (int) (aStopwatch.elapsedMillis()/1000); // calculate what item is being worked on via liststring and version String sListString = cboInventory1.getSelectedItem().toString(); // Parse out the sListString to loop from version 1 to versionmax int iX = Chicago.utlDecodeListStringToIndex(sListString); String sContext = Chicago.sObjModel[iX][Chicago.cnContext]; String sItemType = Chicago.sObjModel[iX][Chicago.cnItemType]; String sName = Chicago.sObjModel[iX][Chicago.cnName]; // I don't need version, I'm updating all versions for (int iCounter = 1; iCounter <= Chicago.iRowCount; iCounter++) { if (Chicago.sObjModel[iCounter][Chicago.cnContext].equals(sContext) && Chicago.sObjModel[iCounter][Chicago.cnItemType].equals(sItemType) && Chicago.sObjModel[iCounter][Chicago.cnName].equals(sName)) { // it matches so update it's size, clock, dirtybit Chicago.sObjModel[iCounter][Chicago.cnClock] = String.valueOf(iClockTime); if (!Chicago.sObjModel[iCounter][Chicago.DIRTY_BIT].equals("1")) Chicago.sObjModel[iCounter][Chicago.DIRTY_BIT] = "2"; }} } private void utlUpdateVersionDropDown(int iWhichOne) { // Need to find the versions of the selected item and display // the contents of the selected item String sSelectedItemListString = ""; if (iWhichOne == 1) sSelectedItemListString = cboInventory1.getSelectedItem().toString(); if (iWhichOne == 2) sSelectedItemListString = cboInventory2.getSelectedItem().toString(); // Decode this to an item number that can be used to find the versions int iMatch = Chicago.utlDecodeListStringToIndex(sSelectedItemListString); String sMaxVersion = Chicago.sObjModel[iMatch][Chicago.cnMaxVersion].trim(); int iMaxVersion = Integer.parseInt(sMaxVersion); // Clear out the items from the combobox's model: if ( iWhichOne == 1) this.cboVersion1.removeAllItems(); if ( iWhichOne == 2) this.cboVersion2.removeAllItems(); // Create the new model: ArrayList alsVersions = new ArrayList(); try { for ( int iCount = 1; iCount <= iMaxVersion; iCount++ ) { alsVersions.add("" + iCount); }} catch ( Exception e ) { System.out.println("Issue updating version drop down"); e.printStackTrace(); } // hot potato, motherfucker! String[] sarComboBoxItems = alsVersions.toArray(new String[0]); DefaultComboBoxModel nameModel = new DefaultComboBoxModel<> ( sarComboBoxItems ); // and those 2 lines above are why java is a shitty computer language // // .|. // // ArrayList alsVersions = new ArrayList(); // String[] sarComboBoxItems = alsVersions.toArray(new String[0]); // DefaultComboBoxModel nameModel // = new DefaultComboBoxModel<> ( sarComboBoxItems ); // Set the correct combobox's model to the array: if (iWhichOne == 1) { cboVersion1.setModel( nameModel); //cboVersion1.setSelectedIndex(iMaxVersion-1); cboVersion1.setSelectedItem(""+iMaxVersion); //System.out.println("Set version1 to ***" + iMaxVersion + "***"); } if (iWhichOne == 2) { cboVersion2.setModel( nameModel); //cboVersion2.setSelectedIndex(iMaxVersion-1); cboVersion2.setSelectedItem(""+iMaxVersion); //System.out.println("Set version2 to ***" + iMaxVersion + "***"); } } ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// public static void main(String args[]) { /* Set the Nimbus look and feel */ // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ComparisonScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ComparisonScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ComparisonScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ComparisonScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { //Connect to the database and load in the data // 230616: Actually, I don't need a new database connection. I should be passed // one that already exists. Also, I should not need to read the database // at this point. I should just have the retrieval of information // in the Chicago.class be put into my variables instead of // variables in the Chicago.class. (done) // Thus, when you get to this point of the code, all the data should // already been in my member variables. I just need the database // connection to update the database later, if needed. ComparisonScreen ccs = new ComparisonScreen(new javax.swing.JFrame(), false); ccs.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { // 20230616: I might want to do some custom code here. See Design Notebook for today System.exit(0); } }); ccs.setVisible(true); System.out.println("Comparison window should be visible"); } }); } } /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JDialog.java to edit this template */ // TODO // 20230619: make the version number selection reload the item's version // 20230619: filter the inventoryItems list down to unique item names // 20230627: change clock time in the control to show HH:MM:SS and write the // function that converts int to HH:MM:SS // 20230712: adding jesus + god mode package com.mattmclaurine.chicago; import com.google.common.base.Stopwatch ; import static com.mattmclaurine.chicago.Chicago.DEBUG_DATABASE; import static com.mattmclaurine.chicago.Chicago.utlCopyFile; import java.awt.Color; import java.awt.Graphics; import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Image; import java.awt.Toolkit; import java.io.File; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.LocalDate; import java.time.temporal.ChronoUnit; import java.util.Timer; import java.util.TimerTask; import java.util.ArrayList; import java.util.Collections; import javax.swing.ImageIcon; import javax.swing.SwingUtilities; /** * * @author lance */ //public class HomeScreen extends javax.swing.JDialog { public class HomeScreen extends javax.swing.JFrame { private Timer myScheduler = new Timer(); private Stopwatch aStopwatch = new Stopwatch(); private int iMyCurrentItem = -1; private int iOldIndex = -1; public int iMyCurrentRowCount = 0; public int iMyClockAdjustment = 0; private int iMyMode = -1; private int MODE_MONGO = 2; private int ALL_COLUMNS = 0; /* private Image imgMongo = Toolkit.getDefaultToolkit() .createImage("/Users/lance/Chicago/mongo.jpg"); private Image imgNotMongo = Toolkit.getDefaultToolkit() .createImage("/Users/lance/Chicago/notMongo.jpg"); */ /* The below code would be used to swap out images for the background. public void paint(Graphics g) { // Draw the previously loaded image to Component. if (iMyMode == MODE_MONGO) g.drawImage(imgMongo, 0, 0, null); else g.drawImage(imgNotMongo, 0, 0, null); } */ /** * Creates new form jdialogVersionCompareTool */ public HomeScreen() { //super(parent, modal); // my code: GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment(); //JFrame way: this.setMaximizedBounds(env.getMaximumWindowBounds()); this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH); //Attempt at JDialog way //java.awt.Dimension d = new java.awt.Dimension(2000,2000); //this.setMaximumSize(d); //this. // end my code initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { grpMode = new javax.swing.ButtonGroup(); buttonGroup2 = new javax.swing.ButtonGroup(); buttonGroup3 = new javax.swing.ButtonGroup(); buttonGroup4 = new javax.swing.ButtonGroup(); bgdBackground = new javax.swing.JPanel(); sclScrollPane4 = new javax.swing.JScrollPane(); lstInventory = new javax.swing.JList<>(); panSearchCriteria = new javax.swing.JPanel(); radDoesNot = new javax.swing.JRadioButton(); radDoes = new javax.swing.JRadioButton(); lblzzzForWhatIDontFuckingKnow = new javax.swing.JLabel(); txtSearchContains = new javax.swing.JTextField(); chkIsOther = new javax.swing.JCheckBox(); chkIsAtom = new javax.swing.JCheckBox(); chkIsSection = new javax.swing.JCheckBox(); chkIsEpisode = new javax.swing.JCheckBox(); chkIsPart = new javax.swing.JCheckBox(); chkIsBook = new javax.swing.JCheckBox(); lblzzzNameWhyDaFukRThere2 = new javax.swing.JLabel(); btnSearch = new javax.swing.JButton(); chkIsDeleted = new javax.swing.JCheckBox(); panDetails = new javax.swing.JPanel(); lblSize = new javax.swing.JLabel(); txtSize = new javax.swing.JTextField(); lblNotebook = new javax.swing.JLabel(); lblCorrespondences = new javax.swing.JLabel(); txtUsages = new javax.swing.JTextField(); lblUsages = new javax.swing.JLabel(); lblClimaxScene = new javax.swing.JLabel(); txtClimaxScene = new javax.swing.JTextField(); txtTimesUsed = new javax.swing.JTextField(); lblTimesUsed = new javax.swing.JLabel(); lblRelevance = new javax.swing.JLabel(); txtRelevance = new javax.swing.JTextField(); txtAtomType = new javax.swing.JTextField(); lblAtomType = new javax.swing.JLabel(); lblItemType = new javax.swing.JLabel(); txtItemType = new javax.swing.JTextField(); txtVersion = new javax.swing.JTextField(); lblVersion = new javax.swing.JLabel(); lblName = new javax.swing.JLabel(); txtName = new javax.swing.JTextField(); txtClock = new javax.swing.JTextField(); lblClock = new javax.swing.JLabel(); lblMaxVersion = new javax.swing.JLabel(); lblContext = new javax.swing.JLabel(); txtContext = new javax.swing.JTextField(); lblCreateDate = new javax.swing.JLabel(); txtCreateDate = new javax.swing.JTextField(); lblUpdateDate = new javax.swing.JLabel(); txtUpdateDate = new javax.swing.JTextField(); radModePriest = new javax.swing.JRadioButton(); radModePope = new javax.swing.JRadioButton(); radModeMongo = new javax.swing.JRadioButton(); lblFinishDate = new javax.swing.JLabel(); txtFinishDate = new javax.swing.JTextField(); txtCorrespondences = new javax.swing.JTextField(); txtNotebook = new javax.swing.JTextField(); chkDeleted = new javax.swing.JCheckBox(); lblMode = new javax.swing.JLabel(); radModeGod = new javax.swing.JRadioButton(); radModeMatt = new javax.swing.JRadioButton(); lblStatus = new javax.swing.JLabel(); txtStatus = new javax.swing.JTextField(); lblzzzForWhatIDontFuckingKnow1 = new javax.swing.JLabel(); txtAppContext = new javax.swing.JTextField(); lblContents = new javax.swing.JLabel(); sclScrollPane2 = new javax.swing.JScrollPane(); txaContents = new javax.swing.JTextArea(); chkChangeDatabase = new javax.swing.JCheckBox(); btnCommit = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); btnReloadData = new javax.swing.JButton(); btnCopyItem = new javax.swing.JButton(); btnEditInventoryItem = new javax.swing.JButton(); btnCreate = new javax.swing.JButton(); btnDeepSearch = new javax.swing.JButton(); btnCompareItems = new javax.swing.JButton(); lblRowCount = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setBackground(new java.awt.Color(0, 0, 0)); setBounds(new java.awt.Rectangle(62, 25, 1650, 885)); setForeground(new java.awt.Color(0, 0, 0)); setMinimumSize(new java.awt.Dimension(1350, 890)); setSize(new java.awt.Dimension(1300, 885)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); bgdBackground.setBackground(new java.awt.Color(0, 0, 0)); bgdBackground.setForeground(new java.awt.Color(255, 255, 255)); bgdBackground.setBounds(new java.awt.Rectangle(0, 0, 2000, 2000)); bgdBackground.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N bgdBackground.setMaximumSize(new java.awt.Dimension(14260, 9930)); bgdBackground.setMinimumSize(new java.awt.Dimension(1600, 950)); bgdBackground.setPreferredSize(new java.awt.Dimension(1600, 950)); bgdBackground.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { bgdBackgroundFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { bgdBackgroundFocusLost(evt); } }); lstInventory.setBackground(new java.awt.Color(0, 0, 0)); lstInventory.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); lstInventory.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lstInventory.setForeground(new java.awt.Color(204, 204, 255)); lstInventory.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); lstInventory.setSelectionBackground(new java.awt.Color(0, 51, 255)); lstInventory.setSelectionForeground(new java.awt.Color(255, 255, 0)); lstInventory.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lstInventoryMouseClicked(evt); } }); lstInventory.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { lstInventoryPropertyChange(evt); } }); sclScrollPane4.setViewportView(lstInventory); panSearchCriteria.setBackground(new java.awt.Color(0, 0, 0)); panSearchCriteria.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(102, 102, 102), new java.awt.Color(204, 204, 255), new java.awt.Color(102, 102, 102), new java.awt.Color(204, 204, 255))); panSearchCriteria.setForeground(new java.awt.Color(255, 255, 255)); radDoesNot.setBackground(new java.awt.Color(0, 0, 0)); radDoesNot.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radDoesNot.setForeground(new java.awt.Color(204, 204, 255)); radDoesNot.setText("Doesn't"); radDoesNot.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { radDoesNotMouseClicked(evt); } }); radDoes.setBackground(new java.awt.Color(0, 0, 0)); radDoes.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radDoes.setForeground(new java.awt.Color(204, 204, 255)); radDoes.setText("Does"); radDoes.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { radDoesMouseClicked(evt); } }); radDoes.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radDoesActionPerformed(evt); } }); lblzzzForWhatIDontFuckingKnow.setBackground(new java.awt.Color(0, 0, 0)); lblzzzForWhatIDontFuckingKnow.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblzzzForWhatIDontFuckingKnow.setForeground(new java.awt.Color(204, 204, 255)); lblzzzForWhatIDontFuckingKnow.setText("contain: "); txtSearchContains.setBackground(new java.awt.Color(0, 0, 0)); txtSearchContains.setColumns(60); txtSearchContains.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtSearchContains.setForeground(new java.awt.Color(204, 204, 255)); txtSearchContains.setHorizontalAlignment(javax.swing.JTextField.LEFT); txtSearchContains.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtSearchContains.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtSearchContains.setSelectedTextColor(new java.awt.Color(0, 0, 0)); txtSearchContains.setSelectionColor(new java.awt.Color(255, 255, 255)); txtSearchContains.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtSearchContainsActionPerformed(evt); } }); chkIsOther.setBackground(new java.awt.Color(0, 0, 0)); chkIsOther.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N chkIsOther.setForeground(new java.awt.Color(204, 204, 255)); chkIsOther.setSelected(true); chkIsOther.setText("Other"); chkIsOther.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsOtherItemStateChanged(evt); } }); chkIsOther.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsOtherMouseClicked(evt); } }); chkIsOther.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsOtherActionPerformed(evt); } }); chkIsAtom.setBackground(new java.awt.Color(0, 0, 0)); chkIsAtom.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N chkIsAtom.setForeground(new java.awt.Color(204, 204, 255)); chkIsAtom.setSelected(true); chkIsAtom.setText("Atom"); chkIsAtom.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsAtomItemStateChanged(evt); } }); chkIsAtom.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsAtomMouseClicked(evt); } }); chkIsAtom.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsAtomActionPerformed(evt); } }); chkIsSection.setBackground(new java.awt.Color(0, 0, 0)); chkIsSection.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N chkIsSection.setForeground(new java.awt.Color(204, 204, 255)); chkIsSection.setSelected(true); chkIsSection.setText("Section"); chkIsSection.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsSectionItemStateChanged(evt); } }); chkIsSection.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsSectionMouseClicked(evt); } }); chkIsSection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsSectionActionPerformed(evt); } }); chkIsEpisode.setBackground(new java.awt.Color(0, 0, 0)); chkIsEpisode.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N chkIsEpisode.setForeground(new java.awt.Color(204, 204, 255)); chkIsEpisode.setSelected(true); chkIsEpisode.setText("Episode"); chkIsEpisode.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsEpisodeItemStateChanged(evt); } }); chkIsEpisode.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsEpisodeMouseClicked(evt); } }); chkIsEpisode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsEpisodeActionPerformed(evt); } }); chkIsPart.setBackground(new java.awt.Color(0, 0, 0)); chkIsPart.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N chkIsPart.setForeground(new java.awt.Color(204, 204, 255)); chkIsPart.setSelected(true); chkIsPart.setText("Part"); chkIsPart.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsPartItemStateChanged(evt); } }); chkIsPart.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsPartMouseClicked(evt); } }); chkIsPart.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsPartActionPerformed(evt); } }); chkIsBook.setBackground(new java.awt.Color(0, 0, 0)); chkIsBook.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N chkIsBook.setForeground(new java.awt.Color(204, 204, 255)); chkIsBook.setSelected(true); chkIsBook.setText("Book"); chkIsBook.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsBookItemStateChanged(evt); } }); chkIsBook.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsBookMouseClicked(evt); } }); chkIsBook.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsBookActionPerformed(evt); } }); lblzzzNameWhyDaFukRThere2.setBackground(new java.awt.Color(0, 0, 0)); lblzzzNameWhyDaFukRThere2.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblzzzNameWhyDaFukRThere2.setForeground(new java.awt.Color(204, 204, 255)); lblzzzNameWhyDaFukRThere2.setText("Inventory items:"); lblzzzNameWhyDaFukRThere2.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); btnSearch.setBackground(new java.awt.Color(102, 102, 102)); btnSearch.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnSearch.setForeground(new java.awt.Color(204, 204, 255)); btnSearch.setText("Search"); btnSearch.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnSearch.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnSearchMouseClicked(evt); } }); btnSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSearchActionPerformed(evt); } }); chkIsDeleted.setBackground(new java.awt.Color(0, 0, 0)); chkIsDeleted.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N chkIsDeleted.setForeground(new java.awt.Color(204, 204, 255)); chkIsDeleted.setSelected(true); chkIsDeleted.setText("Deleted"); chkIsDeleted.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); chkIsDeleted.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); chkIsDeleted.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkIsDeletedItemStateChanged(evt); } }); chkIsDeleted.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsDeletedMouseClicked(evt); } }); chkIsDeleted.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkIsDeletedActionPerformed(evt); } }); javax.swing.GroupLayout panSearchCriteriaLayout = new javax.swing.GroupLayout(panSearchCriteria); panSearchCriteria.setLayout(panSearchCriteriaLayout); panSearchCriteriaLayout.setHorizontalGroup( panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addGap(29, 29, 29) .addGroup(panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblzzzNameWhyDaFukRThere2) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addComponent(chkIsBook) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkIsPart) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkIsEpisode) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkIsSection) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkIsAtom) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(chkIsOther) .addGap(18, 18, 18) .addComponent(chkIsDeleted)) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addGap(3, 3, 3) .addGroup(panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addComponent(radDoes) .addGap(32, 32, 32) .addComponent(lblzzzForWhatIDontFuckingKnow) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtSearchContains, javax.swing.GroupLayout.PREFERRED_SIZE, 295, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addComponent(radDoesNot) .addGap(313, 313, 313) .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addContainerGap(72, Short.MAX_VALUE)) ); panSearchCriteriaLayout.setVerticalGroup( panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panSearchCriteriaLayout.createSequentialGroup() .addContainerGap() .addComponent(lblzzzNameWhyDaFukRThere2) .addGap(18, 18, 18) .addGroup(panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsBook) .addComponent(chkIsPart) .addComponent(chkIsEpisode) .addComponent(chkIsSection) .addComponent(chkIsAtom) .addComponent(chkIsOther) .addComponent(chkIsDeleted)) .addGroup(panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addGap(37, 37, 37) .addComponent(radDoes) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(radDoesNot)) .addGroup(panSearchCriteriaLayout.createSequentialGroup() .addGap(50, 50, 50) .addGroup(panSearchCriteriaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtSearchContains, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblzzzForWhatIDontFuckingKnow)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSearch))) .addContainerGap(14, Short.MAX_VALUE)) ); panDetails.setBackground(new java.awt.Color(0, 0, 0)); panDetails.setForeground(new java.awt.Color(255, 255, 255)); lblSize.setBackground(new java.awt.Color(0, 0, 0)); lblSize.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblSize.setForeground(new java.awt.Color(204, 204, 255)); lblSize.setText("Size:"); lblSize.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtSize.setBackground(new java.awt.Color(0, 0, 0)); txtSize.setColumns(10); txtSize.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtSize.setForeground(new java.awt.Color(204, 204, 255)); txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtSize.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtSize.setEnabled(false); txtSize.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtSizeActionPerformed(evt); } }); lblNotebook.setBackground(new java.awt.Color(0, 0, 0)); lblNotebook.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblNotebook.setForeground(new java.awt.Color(204, 204, 255)); lblNotebook.setText("Notebook:"); lblNotebook.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblCorrespondences.setBackground(new java.awt.Color(0, 0, 0)); lblCorrespondences.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblCorrespondences.setForeground(new java.awt.Color(204, 204, 255)); lblCorrespondences.setText("Correspondences:"); lblCorrespondences.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtUsages.setBackground(new java.awt.Color(0, 0, 0)); txtUsages.setColumns(60); txtUsages.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtUsages.setForeground(new java.awt.Color(204, 204, 255)); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtUsages.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtUsages.setEnabled(false); txtUsages.addInputMethodListener(new java.awt.event.InputMethodListener() { public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { txtUsagesCaretPositionChanged(evt); } public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { } }); txtUsages.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtUsagesActionPerformed(evt); } }); txtUsages.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtUsagesPropertyChange(evt); } }); txtUsages.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUsagesKeyTyped(evt); } }); lblUsages.setBackground(new java.awt.Color(0, 0, 0)); lblUsages.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblUsages.setForeground(new java.awt.Color(204, 204, 255)); lblUsages.setText("Usages:"); lblUsages.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblClimaxScene.setBackground(new java.awt.Color(0, 0, 0)); lblClimaxScene.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblClimaxScene.setForeground(new java.awt.Color(204, 204, 255)); lblClimaxScene.setText("Climax Scene:"); lblClimaxScene.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtClimaxScene.setBackground(new java.awt.Color(0, 0, 0)); txtClimaxScene.setColumns(60); txtClimaxScene.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtClimaxScene.setForeground(new java.awt.Color(204, 204, 255)); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtClimaxScene.setCaretColor(new java.awt.Color(255, 255, 255)); txtClimaxScene.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtClimaxScene.setEnabled(false); txtClimaxScene.setSelectedTextColor(new java.awt.Color(51, 51, 51)); txtClimaxScene.setSelectionColor(new java.awt.Color(255, 0, 0)); txtClimaxScene.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtClimaxSceneActionPerformed(evt); } }); txtClimaxScene.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtClimaxScenePropertyChange(evt); } }); txtClimaxScene.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtClimaxSceneKeyTyped(evt); } }); txtTimesUsed.setBackground(new java.awt.Color(0, 0, 0)); txtTimesUsed.setColumns(60); txtTimesUsed.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtTimesUsed.setForeground(new java.awt.Color(204, 204, 255)); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtTimesUsed.setCaretColor(new java.awt.Color(255, 255, 255)); txtTimesUsed.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtTimesUsed.setEnabled(false); txtTimesUsed.setSelectedTextColor(new java.awt.Color(51, 51, 51)); txtTimesUsed.setSelectionColor(new java.awt.Color(255, 0, 0)); txtTimesUsed.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtTimesUsedActionPerformed(evt); } }); txtTimesUsed.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtTimesUsedPropertyChange(evt); } }); txtTimesUsed.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtTimesUsedKeyTyped(evt); } }); lblTimesUsed.setBackground(new java.awt.Color(0, 0, 0)); lblTimesUsed.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblTimesUsed.setForeground(new java.awt.Color(204, 204, 255)); lblTimesUsed.setText("Times Used:"); lblTimesUsed.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblRelevance.setBackground(new java.awt.Color(0, 0, 0)); lblRelevance.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblRelevance.setForeground(new java.awt.Color(204, 204, 255)); lblRelevance.setText("Relevance:"); lblRelevance.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtRelevance.setBackground(new java.awt.Color(0, 0, 0)); txtRelevance.setColumns(10); txtRelevance.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtRelevance.setForeground(new java.awt.Color(204, 204, 255)); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtRelevance.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtRelevance.setEnabled(false); txtRelevance.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtRelevanceActionPerformed(evt); } }); txtRelevance.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtRelevancePropertyChange(evt); } }); txtRelevance.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtRelevanceKeyTyped(evt); } }); txtAtomType.setBackground(new java.awt.Color(0, 0, 0)); txtAtomType.setColumns(60); txtAtomType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtAtomType.setForeground(new java.awt.Color(204, 204, 255)); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtAtomType.setCaretColor(new java.awt.Color(204, 204, 255)); txtAtomType.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtAtomType.setEnabled(false); txtAtomType.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtAtomTypeActionPerformed(evt); } }); txtAtomType.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtAtomTypePropertyChange(evt); } }); txtAtomType.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtAtomTypeKeyTyped(evt); } }); lblAtomType.setBackground(new java.awt.Color(0, 0, 0)); lblAtomType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblAtomType.setForeground(new java.awt.Color(204, 204, 255)); lblAtomType.setText("Atom Type:"); lblAtomType.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblItemType.setBackground(new java.awt.Color(0, 0, 0)); lblItemType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblItemType.setForeground(new java.awt.Color(204, 204, 255)); lblItemType.setText("Item Type:"); lblItemType.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtItemType.setBackground(new java.awt.Color(0, 0, 0)); txtItemType.setColumns(5); txtItemType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtItemType.setForeground(new java.awt.Color(204, 204, 255)); txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtItemType.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtItemType.setEnabled(false); txtItemType.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtItemTypeActionPerformed(evt); } }); txtItemType.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtItemTypePropertyChange(evt); } }); txtItemType.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtItemTypeKeyTyped(evt); } }); txtVersion.setBackground(new java.awt.Color(0, 0, 0)); txtVersion.setColumns(5); txtVersion.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtVersion.setForeground(new java.awt.Color(255, 255, 255)); txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtVersion.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtVersion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtVersionActionPerformed(evt); } }); lblVersion.setBackground(new java.awt.Color(0, 0, 0)); lblVersion.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblVersion.setForeground(new java.awt.Color(204, 204, 255)); lblVersion.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lblVersion.setText("Version:"); lblVersion.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblName.setBackground(new java.awt.Color(0, 0, 0)); lblName.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblName.setForeground(new java.awt.Color(204, 204, 255)); lblName.setText("Item Name:"); lblName.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtName.setBackground(new java.awt.Color(0, 0, 0)); txtName.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtName.setForeground(new java.awt.Color(204, 204, 255)); txtName.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtName.setCaretColor(new java.awt.Color(255, 255, 255)); txtName.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtName.setSelectedTextColor(new java.awt.Color(255, 255, 0)); txtName.setSelectionColor(new java.awt.Color(0, 0, 255)); txtName.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtNameMouseClicked(evt); } }); txtName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtNameActionPerformed(evt); } }); txtName.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtNamePropertyChange(evt); } }); txtName.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtNameKeyTyped(evt); } }); txtClock.setBackground(new java.awt.Color(0, 0, 0)); txtClock.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtClock.setForeground(new java.awt.Color(204, 204, 255)); txtClock.setHorizontalAlignment(javax.swing.JTextField.RIGHT); txtClock.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtClock.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtClock.setEnabled(false); txtClock.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtClockMouseClicked(evt); } }); txtClock.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtClockActionPerformed(evt); } }); lblClock.setBackground(new java.awt.Color(0, 0, 0)); lblClock.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblClock.setForeground(new java.awt.Color(204, 204, 255)); lblClock.setText("Clock Time:"); lblClock.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblClock.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lblClockMouseClicked(evt); } }); lblMaxVersion.setBackground(new java.awt.Color(0, 0, 0)); lblMaxVersion.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblMaxVersion.setForeground(new java.awt.Color(204, 204, 255)); lblMaxVersion.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); lblMaxVersion.setText("of 00"); lblMaxVersion.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblContext.setBackground(new java.awt.Color(0, 0, 0)); lblContext.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblContext.setForeground(new java.awt.Color(204, 204, 255)); lblContext.setText("Context:"); lblContext.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtContext.setBackground(new java.awt.Color(0, 0, 0)); txtContext.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtContext.setForeground(new java.awt.Color(204, 204, 255)); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtContext.setCaretColor(new java.awt.Color(255, 255, 255)); txtContext.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtContext.setSelectedTextColor(new java.awt.Color(255, 255, 0)); txtContext.setSelectionColor(new java.awt.Color(0, 0, 255)); txtContext.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtContextMouseClicked(evt); } }); txtContext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtContextActionPerformed(evt); } }); txtContext.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtContextPropertyChange(evt); } }); txtContext.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtContextKeyTyped(evt); } }); lblCreateDate.setBackground(new java.awt.Color(0, 0, 0)); lblCreateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblCreateDate.setForeground(new java.awt.Color(204, 204, 255)); lblCreateDate.setText("Create Date:"); lblCreateDate.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtCreateDate.setBackground(new java.awt.Color(0, 0, 0)); txtCreateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtCreateDate.setForeground(new java.awt.Color(204, 204, 255)); txtCreateDate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtCreateDate.setCaretColor(new java.awt.Color(255, 255, 255)); txtCreateDate.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtCreateDate.setSelectedTextColor(new java.awt.Color(255, 255, 0)); txtCreateDate.setSelectionColor(new java.awt.Color(0, 0, 255)); txtCreateDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCreateDateActionPerformed(evt); } }); txtCreateDate.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtCreateDatePropertyChange(evt); } }); txtCreateDate.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCreateDateKeyTyped(evt); } }); lblUpdateDate.setBackground(new java.awt.Color(0, 0, 0)); lblUpdateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblUpdateDate.setForeground(new java.awt.Color(204, 204, 255)); lblUpdateDate.setText("Update Date:"); lblUpdateDate.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtUpdateDate.setBackground(new java.awt.Color(0, 0, 0)); txtUpdateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtUpdateDate.setForeground(new java.awt.Color(204, 204, 255)); txtUpdateDate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtUpdateDate.setCaretColor(new java.awt.Color(255, 255, 255)); txtUpdateDate.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtUpdateDate.setSelectedTextColor(new java.awt.Color(255, 255, 0)); txtUpdateDate.setSelectionColor(new java.awt.Color(0, 0, 255)); txtUpdateDate.addInputMethodListener(new java.awt.event.InputMethodListener() { public void caretPositionChanged(java.awt.event.InputMethodEvent evt) { txtUpdateDateCaretPositionChanged(evt); } public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) { } }); txtUpdateDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtUpdateDateActionPerformed(evt); } }); txtUpdateDate.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtUpdateDatePropertyChange(evt); } }); txtUpdateDate.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUpdateDateKeyTyped(evt); } }); radModePriest.setBackground(new java.awt.Color(0, 0, 0)); grpMode.add(radModePriest); radModePriest.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radModePriest.setForeground(new java.awt.Color(204, 204, 255)); radModePriest.setSelected(true); radModePriest.setText("Priest"); radModePriest.setEnabled(false); radModePriest.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radModePriestActionPerformed(evt); } }); radModePope.setBackground(new java.awt.Color(0, 0, 0)); grpMode.add(radModePope); radModePope.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radModePope.setForeground(new java.awt.Color(204, 204, 255)); radModePope.setText("Pope"); radModePope.setEnabled(false); radModePope.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radModePopeActionPerformed(evt); } }); radModeMongo.setBackground(new java.awt.Color(0, 0, 0)); grpMode.add(radModeMongo); radModeMongo.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radModeMongo.setForeground(new java.awt.Color(204, 204, 255)); radModeMongo.setText("Mongo"); radModeMongo.setEnabled(false); radModeMongo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radModeMongoActionPerformed(evt); } }); lblFinishDate.setBackground(new java.awt.Color(0, 0, 0)); lblFinishDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblFinishDate.setForeground(new java.awt.Color(204, 204, 255)); lblFinishDate.setText("Finish Date:"); lblFinishDate.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtFinishDate.setBackground(new java.awt.Color(0, 0, 0)); txtFinishDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtFinishDate.setForeground(new java.awt.Color(204, 204, 255)); txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtFinishDate.setCaretColor(new java.awt.Color(255, 255, 255)); txtFinishDate.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtFinishDate.setSelectedTextColor(new java.awt.Color(255, 255, 0)); txtFinishDate.setSelectionColor(new java.awt.Color(0, 0, 255)); txtFinishDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtFinishDateActionPerformed(evt); } }); txtFinishDate.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtFinishDatePropertyChange(evt); } }); txtFinishDate.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtFinishDateKeyTyped(evt); } }); txtCorrespondences.setBackground(new java.awt.Color(0, 0, 0)); txtCorrespondences.setColumns(60); txtCorrespondences.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtCorrespondences.setForeground(new java.awt.Color(204, 204, 255)); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtCorrespondences.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtCorrespondences.setEnabled(false); txtCorrespondences.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCorrespondencesActionPerformed(evt); } }); txtCorrespondences.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtCorrespondencesPropertyChange(evt); } }); txtCorrespondences.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCorrespondencesKeyTyped(evt); } }); txtNotebook.setBackground(new java.awt.Color(0, 0, 0)); txtNotebook.setColumns(60); txtNotebook.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtNotebook.setForeground(new java.awt.Color(204, 204, 255)); txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtNotebook.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtNotebook.setEnabled(false); txtNotebook.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtNotebookActionPerformed(evt); } }); txtNotebook.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtNotebookPropertyChange(evt); } }); txtNotebook.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtNotebookKeyTyped(evt); } }); chkDeleted.setBackground(new java.awt.Color(0, 0, 0)); chkDeleted.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N chkDeleted.setForeground(new java.awt.Color(204, 204, 255)); chkDeleted.setSelected(true); chkDeleted.setText("Deleted"); chkDeleted.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); chkDeleted.setEnabled(false); chkDeleted.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); chkDeleted.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkDeletedItemStateChanged(evt); } }); chkDeleted.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkDeletedMouseClicked(evt); } }); chkDeleted.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkDeletedActionPerformed(evt); } }); lblMode.setBackground(new java.awt.Color(0, 0, 0)); lblMode.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblMode.setForeground(new java.awt.Color(204, 204, 255)); lblMode.setText("Mode:"); lblMode.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); radModeGod.setBackground(new java.awt.Color(0, 0, 0)); grpMode.add(radModeGod); radModeGod.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radModeGod.setForeground(new java.awt.Color(204, 204, 255)); radModeGod.setText("God"); radModeGod.setEnabled(false); radModeGod.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radModeGodActionPerformed(evt); } }); radModeMatt.setBackground(new java.awt.Color(0, 0, 0)); grpMode.add(radModeMatt); radModeMatt.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N radModeMatt.setForeground(new java.awt.Color(204, 204, 255)); radModeMatt.setText("Matt"); radModeMatt.setEnabled(false); radModeMatt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { radModeMattActionPerformed(evt); } }); lblStatus.setBackground(new java.awt.Color(0, 0, 0)); lblStatus.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblStatus.setForeground(new java.awt.Color(204, 204, 255)); lblStatus.setText("Status:"); lblStatus.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtStatus.setBackground(new java.awt.Color(0, 0, 0)); txtStatus.setColumns(5); txtStatus.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtStatus.setForeground(new java.awt.Color(204, 204, 255)); txtStatus.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtStatus.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtStatus.setEnabled(false); txtStatus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtStatusActionPerformed(evt); } }); txtStatus.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txtStatusPropertyChange(evt); } }); txtStatus.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtStatusKeyTyped(evt); } }); javax.swing.GroupLayout panDetailsLayout = new javax.swing.GroupLayout(panDetails); panDetails.setLayout(panDetailsLayout); panDetailsLayout.setHorizontalGroup( panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createSequentialGroup() .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(38, 38, 38) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblName) .addComponent(lblContext) .addComponent(lblCreateDate)) .addGap(18, 18, 18) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtContext) .addGroup(panDetailsLayout.createSequentialGroup() .addComponent(txtName) .addGap(36, 36, 36) .addComponent(chkDeleted)))) .addGroup(panDetailsLayout.createSequentialGroup() .addContainerGap() .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(48, 48, 48) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(40, 40, 40) .addComponent(lblMode) .addGap(18, 18, 18) .addComponent(radModePriest) .addGap(18, 18, 18) .addComponent(radModePope) .addGap(18, 18, 18) .addComponent(radModeMongo) .addGap(18, 18, 18) .addComponent(radModeGod) .addGap(18, 18, 18) .addComponent(radModeMatt) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblClock) .addGap(18, 18, 18) .addComponent(txtClock, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panDetailsLayout.createSequentialGroup() .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panDetailsLayout.createSequentialGroup() .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(98, 98, 98) .addComponent(txtCreateDate, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(16, 16, 16) .addComponent(lblVersion) .addGap(18, 18, 18) .addComponent(txtVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblMaxVersion))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblFinishDate) .addComponent(lblUpdateDate))) .addGroup(panDetailsLayout.createSequentialGroup() .addComponent(lblItemType) .addGap(18, 18, 18) .addComponent(txtItemType) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lblRelevance))) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(18, 18, 18) .addComponent(txtRelevance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblSize) .addGap(18, 18, 18) .addComponent(txtSize, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panDetailsLayout.createSequentialGroup() .addGap(18, 18, 18) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtFinishDate, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE) .addComponent(txtUpdateDate, javax.swing.GroupLayout.Alignment.TRAILING))))))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panDetailsLayout.createSequentialGroup() .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblCorrespondences) .addComponent(lblNotebook)) .addGap(18, 18, Short.MAX_VALUE) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtCorrespondences, javax.swing.GroupLayout.PREFERRED_SIZE, 596, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(panDetailsLayout.createSequentialGroup() .addComponent(txtNotebook, javax.swing.GroupLayout.PREFERRED_SIZE, 255, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lblStatus) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtStatus)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panDetailsLayout.createSequentialGroup() .addGap(24, 24, 24) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblClimaxScene) .addComponent(lblUsages) .addComponent(lblTimesUsed) .addComponent(lblAtomType)) .addGap(18, 18, 18) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtTimesUsed, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(txtClimaxScene, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(txtUsages) .addComponent(txtAtomType)))))) .addContainerGap()) ); panDetailsLayout.setVerticalGroup( panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panDetailsLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(radModePriest) .addComponent(radModePope) .addComponent(radModeMongo) .addComponent(txtClock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblClock) .addComponent(lblMode) .addComponent(radModeGod) .addComponent(radModeMatt)) .addGap(18, 18, 18) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblName) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chkDeleted)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblContext) .addComponent(txtContext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createSequentialGroup() .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblCreateDate) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCreateDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtUpdateDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblVersion) .addComponent(txtVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblMaxVersion)) .addComponent(txtFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtItemType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblSize) .addComponent(lblRelevance) .addComponent(txtRelevance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(lblItemType))) .addGroup(panDetailsLayout.createSequentialGroup() .addComponent(lblUpdateDate) .addGap(18, 18, 18) .addComponent(lblFinishDate))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtAtomType, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblAtomType)) .addGap(12, 12, 12) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblTimesUsed) .addComponent(txtTimesUsed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblClimaxScene) .addComponent(txtClimaxScene, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblUsages) .addComponent(txtUsages, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblCorrespondences) .addComponent(txtCorrespondences, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panDetailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblNotebook) .addComponent(txtNotebook, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblStatus) .addComponent(txtStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30)) ); lblzzzForWhatIDontFuckingKnow1.setBackground(new java.awt.Color(0, 0, 0)); lblzzzForWhatIDontFuckingKnow1.setFont(new java.awt.Font("Monaco", 0, 12)); // NOI18N lblzzzForWhatIDontFuckingKnow1.setForeground(new java.awt.Color(204, 204, 255)); lblzzzForWhatIDontFuckingKnow1.setText(" Context: "); txtAppContext.setBackground(new java.awt.Color(0, 0, 0)); txtAppContext.setColumns(60); txtAppContext.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtAppContext.setForeground(new java.awt.Color(204, 204, 255)); txtAppContext.setHorizontalAlignment(javax.swing.JTextField.LEFT); txtAppContext.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtAppContext.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txtAppContext.setSelectedTextColor(new java.awt.Color(0, 0, 0)); txtAppContext.setSelectionColor(new java.awt.Color(255, 255, 255)); txtAppContext.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtAppContextMouseClicked(evt); } }); txtAppContext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtAppContextActionPerformed(evt); } }); lblContents.setBackground(new java.awt.Color(0, 0, 0)); lblContents.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblContents.setForeground(new java.awt.Color(204, 204, 255)); lblContents.setText("Contents:"); lblContents.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txaContents.setBackground(new java.awt.Color(0, 0, 0)); txaContents.setColumns(20); txaContents.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txaContents.setForeground(new java.awt.Color(255, 255, 255)); txaContents.setLineWrap(true); txaContents.setRows(5); txaContents.setText("Enter text here"); txaContents.setWrapStyleWord(true); txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txaContents.setCaretColor(new java.awt.Color(255, 0, 51)); txaContents.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); txaContents.setDisabledTextColor(new java.awt.Color(204, 204, 255)); txaContents.setEnabled(false); txaContents.setSelectedTextColor(new java.awt.Color(255, 0, 255)); txaContents.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { txaContentsPropertyChange(evt); } }); txaContents.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txaContentsKeyTyped(evt); } }); sclScrollPane2.setViewportView(txaContents); chkChangeDatabase.setText("dDB"); chkChangeDatabase.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkChangeDatabaseActionPerformed(evt); } }); btnCommit.setBackground(new java.awt.Color(102, 102, 102)); btnCommit.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnCommit.setForeground(new java.awt.Color(204, 204, 255)); btnCommit.setText("Commit"); btnCommit.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCommit.setEnabled(false); btnCommit.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnCommit.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnCommitMouseClicked(evt); } }); btnCommit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCommitActionPerformed(evt); } }); btnCancel.setBackground(new java.awt.Color(102, 102, 102)); btnCancel.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnCancel.setForeground(new java.awt.Color(204, 204, 255)); btnCancel.setText("Cancel"); btnCancel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCancel.setEnabled(false); btnCancel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnCancel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnCancelMouseClicked(evt); } }); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); btnReloadData.setBackground(new java.awt.Color(102, 102, 102)); btnReloadData.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnReloadData.setForeground(new java.awt.Color(204, 204, 255)); btnReloadData.setText(" Reload Data "); btnReloadData.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnReloadData.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnReloadDataMouseClicked(evt); } }); btnReloadData.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnReloadDataActionPerformed(evt); } }); btnCopyItem.setBackground(new java.awt.Color(102, 102, 102)); btnCopyItem.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnCopyItem.setForeground(new java.awt.Color(204, 204, 255)); btnCopyItem.setText(" Copy "); btnCopyItem.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCopyItem.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnCopyItemMouseClicked(evt); } }); btnCopyItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCopyItemActionPerformed(evt); } }); btnEditInventoryItem.setBackground(new java.awt.Color(102, 102, 102)); btnEditInventoryItem.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnEditInventoryItem.setForeground(new java.awt.Color(204, 204, 255)); btnEditInventoryItem.setText(" Edit "); btnEditInventoryItem.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnEditInventoryItem.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnEditInventoryItemMouseClicked(evt); } }); btnEditInventoryItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditInventoryItemActionPerformed(evt); } }); btnCreate.setBackground(new java.awt.Color(102, 102, 102)); btnCreate.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnCreate.setForeground(new java.awt.Color(204, 204, 255)); btnCreate.setText(" Create "); btnCreate.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCreate.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnCreateMouseClicked(evt); } }); btnCreate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCreateActionPerformed(evt); } }); btnDeepSearch.setBackground(new java.awt.Color(102, 102, 102)); btnDeepSearch.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnDeepSearch.setForeground(new java.awt.Color(204, 204, 255)); btnDeepSearch.setText("Search"); btnDeepSearch.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnDeepSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeepSearchActionPerformed(evt); } }); btnCompareItems.setBackground(new java.awt.Color(102, 102, 102)); btnCompareItems.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N btnCompareItems.setForeground(new java.awt.Color(204, 204, 255)); btnCompareItems.setText(" Compare "); btnCompareItems.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCompareItems.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCompareItemsActionPerformed(evt); } }); lblRowCount.setBackground(new java.awt.Color(0, 0, 0)); lblRowCount.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblRowCount.setForeground(new java.awt.Color(204, 204, 255)); lblRowCount.setText("99999"); lblRowCount.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); javax.swing.GroupLayout bgdBackgroundLayout = new javax.swing.GroupLayout(bgdBackground); bgdBackground.setLayout(bgdBackgroundLayout); bgdBackgroundLayout.setHorizontalGroup( bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addContainerGap() .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addComponent(lblzzzForWhatIDontFuckingKnow1) .addGap(18, 18, 18) .addComponent(txtAppContext)) .addComponent(panSearchCriteria, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(sclScrollPane4)) .addGap(42, 42, 42) .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panDetails, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addComponent(btnCommit, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnReloadData, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnCopyItem) .addGap(18, 18, 18) .addComponent(btnEditInventoryItem) .addGap(18, 18, 18) .addComponent(btnCreate) .addGap(18, 18, 18) .addComponent(btnDeepSearch) .addGap(18, 18, 18) .addComponent(btnCompareItems)) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addGap(69, 69, 69) .addComponent(lblContents) .addGap(18, 18, 18)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, bgdBackgroundLayout.createSequentialGroup() .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblRowCount) .addComponent(chkChangeDatabase)) .addGap(32, 32, 32))) .addComponent(sclScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 590, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(565, Short.MAX_VALUE)) ); bgdBackgroundLayout.setVerticalGroup( bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addGap(14, 14, 14) .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblzzzForWhatIDontFuckingKnow1) .addComponent(txtAppContext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(26, 26, 26) .addComponent(panSearchCriteria, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(33, 33, 33) .addComponent(sclScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 501, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addComponent(panDetails, javax.swing.GroupLayout.PREFERRED_SIZE, 392, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(bgdBackgroundLayout.createSequentialGroup() .addComponent(lblContents, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(168, 168, 168) .addComponent(chkChangeDatabase) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblRowCount)) .addComponent(sclScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(34, 34, 34) .addGroup(bgdBackgroundLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCreate) .addComponent(btnDeepSearch) .addComponent(btnCompareItems) .addComponent(btnEditInventoryItem) .addComponent(btnCopyItem) .addComponent(btnReloadData) .addComponent(btnCommit) .addComponent(btnCancel)))) .addContainerGap(1224, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(bgdBackground, javax.swing.GroupLayout.PREFERRED_SIZE, 2000, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(bgdBackground, javax.swing.GroupLayout.PREFERRED_SIZE, 2000, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); pack(); }// //GEN-END:initComponents //---------------------------------------------------------------------------- //------------------- METHODS I'VE NOT WRITTEN CODE FOR: --------------------- //---------------------------------------------------------------------------- private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed // TODO. Save the clock info one last time. }//GEN-LAST:event_formWindowClosed private void txtSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSizeActionPerformed // I should definitely never get called }//GEN-LAST:event_txtSizeActionPerformed private void txtClockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtClockActionPerformed // I shouldn't ever do anything of value }//GEN-LAST:event_txtClockActionPerformed private void txtUsagesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUsagesActionPerformed setUIColors(Chicago.cnUsages); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtUsagesActionPerformed private void txtCorrespondencesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCorrespondencesActionPerformed setUIColors(Chicago.cnCorrespondences); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtCorrespondencesActionPerformed private void txtNotebookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNotebookActionPerformed setUIColors(Chicago.cnNotebook); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtNotebookActionPerformed private void txtClimaxSceneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtClimaxSceneActionPerformed setUIColors(Chicago.cnClimaxScene); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtClimaxSceneActionPerformed private void txtTimesUsedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTimesUsedActionPerformed setUIColors(Chicago.cnTimesUsed); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtTimesUsedActionPerformed private void txtRelevanceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRelevanceActionPerformed setUIColors(Chicago.cnRelevance); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtRelevanceActionPerformed /*1111111111111111111111111111111111111111111111111111111111111111111111111111 //1111111111111 METHODS I'VE WRITTEN ONE LINERS FOR: 111111111111111 //11111111111111111111111111111111111111111111111111111111111111111111111111*/ private void lstInventoryMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lstInventoryMouseClicked prfInventoryClick(evt); }//GEN-LAST:event_lstInventoryMouseClicked /***************************************************************************** *************** METHODS I'VE WRITTEN UI CODE FOR: *************** *****************************************************************************/ private void txtAtomTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAtomTypeActionPerformed setUIColors(Chicago.cnAtomType); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtAtomTypeActionPerformed private void txtItemTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtItemTypeActionPerformed setUIColors(Chicago.cnItemType); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtItemTypeActionPerformed private void txtNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNameActionPerformed setUIColors(Chicago.cnName); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtNameActionPerformed private void bgdBackgroundFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_bgdBackgroundFocusGained // Not sure that this works. utlStartAStopwatch(false); }//GEN-LAST:event_bgdBackgroundFocusGained private void bgdBackgroundFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_bgdBackgroundFocusLost // I don't know if this works: utlStopAStopwatch(); }//GEN-LAST:event_bgdBackgroundFocusLost private void txtVersionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVersionActionPerformed int x = prfUtilGetNewVersion(); this.setAllMyShitToX(x); }//GEN-LAST:event_txtVersionActionPerformed private void chkIsPartActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsPartActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsPartActionPerformed private void chkIsEpisodeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsEpisodeActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsEpisodeActionPerformed private void chkIsSectionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsSectionActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsSectionActionPerformed private void chkIsAtomActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsAtomActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsAtomActionPerformed private void chkIsOtherActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsOtherActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsOtherActionPerformed private void chkIsBookItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsBookItemStateChanged utlRedrawItemsList(); }//GEN-LAST:event_chkIsBookItemStateChanged private void chkIsPartItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsPartItemStateChanged utlRedrawItemsList(); }//GEN-LAST:event_chkIsPartItemStateChanged private void chkIsEpisodeItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsEpisodeItemStateChanged utlRedrawItemsList(); }//GEN-LAST:event_chkIsEpisodeItemStateChanged private void chkIsSectionItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsSectionItemStateChanged utlRedrawItemsList(); }//GEN-LAST:event_chkIsSectionItemStateChanged private void chkIsAtomItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsAtomItemStateChanged utlRedrawItemsList(); }//GEN-LAST:event_chkIsAtomItemStateChanged private void chkIsOtherItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsOtherItemStateChanged utlRedrawItemsList(); }//GEN-LAST:event_chkIsOtherItemStateChanged ////////////////////////////////////////////////////////////////////////////// /////////////////////// METHODS I'VE WRITTEN CODE FOR: /////////////////////// ////////////////////////////////////////////////////////////////////////////// private void chkIsBookMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsBookMouseClicked }//GEN-LAST:event_chkIsBookMouseClicked private void chkIsPartMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsPartMouseClicked // }//GEN-LAST:event_chkIsPartMouseClicked private void chkIsEpisodeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsEpisodeMouseClicked // }//GEN-LAST:event_chkIsEpisodeMouseClicked private void chkIsSectionMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsSectionMouseClicked // }//GEN-LAST:event_chkIsSectionMouseClicked private void chkIsAtomMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsAtomMouseClicked // }//GEN-LAST:event_chkIsAtomMouseClicked private void chkIsOtherMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsOtherMouseClicked // }//GEN-LAST:event_chkIsOtherMouseClicked //---------------------------------------------------------------------------- //------------------- METHODS I'VE NOT WRITTEN CODE FOR: --------------------- //---------------------------------------------------------------------------- private void radDoesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radDoesActionPerformed }//GEN-LAST:event_radDoesActionPerformed private void txtSearchContainsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSearchContainsActionPerformed }//GEN-LAST:event_txtSearchContainsActionPerformed //1111111111111111111111111111111111111111111111111111111111111111111111111111 //111111111111111111 METHODS I'VE WRITTEN ONE LINERS FOR: 11111111111111111111 //1111111111111111111111111111111111111111111111111111111111111111111111111111 private void btnSearchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnSearchMouseClicked prfSearchClick(); }//GEN-LAST:event_btnSearchMouseClicked //---------------------------------------------------------------------------- //------------------- METHODS I'VE NOT WRITTEN CODE FOR: --------------------- //---------------------------------------------------------------------------- private void btnSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSearchActionPerformed //prfSearchClick(); }//GEN-LAST:event_btnSearchActionPerformed ////////////////////////////////////////////////////////////////////////////// /////////////////////// METHODS I'VE WRITTEN CODE FOR: /////////////////////// ////////////////////////////////////////////////////////////////////////////// private void radDoesMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radDoesMouseClicked // Guess I didn't use a button group on the properties of this fucker radDoes.setSelected(true); radDoesNot.setSelected(false); }//GEN-LAST:event_radDoesMouseClicked private void radDoesNotMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_radDoesNotMouseClicked // Guess I didn't use a button group on the properties of this fucker radDoes.setSelected(false); radDoesNot.setSelected(true); }//GEN-LAST:event_radDoesNotMouseClicked //---------------------------------------------------------------------------- //------------------- METHODS I'VE NOT WRITTEN CODE FOR: --------------------- //---------------------------------------------------------------------------- //// Stay away from using this method. It fires 100 times per change. //////// private void lstInventoryPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_lstInventoryPropertyChange // DON'T EVEN FUCKING TRY TO WRITE CODE HERE }//GEN-LAST:event_lstInventoryPropertyChange private void txtContextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtContextActionPerformed setUIColors(Chicago.cnContext); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtContextActionPerformed private void txtCreateDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCreateDateActionPerformed }//GEN-LAST:event_txtCreateDateActionPerformed private void txtUpdateDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUpdateDateActionPerformed }//GEN-LAST:event_txtUpdateDateActionPerformed private void txtAppContextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAppContextActionPerformed // Tell the item list to repaint since I have a new value Chicago.sAppContext = txtContext.getText(); utlRedrawItemsList(); }//GEN-LAST:event_txtAppContextActionPerformed private void txtClockMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtClockMouseClicked if ( aStopwatch.isRunning() ) { utlStopAStopwatch(); txtClock.setBackground(new java.awt.Color(127, 127, 127)); txtClock.setForeground(Color.black); } else { utlStartAStopwatch(false); txtClock.setBackground( Color.BLACK); txtClock.setForeground(new java.awt.Color(204,204,255)); } }//GEN-LAST:event_txtClockMouseClicked private void radModePriestActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radModePriestActionPerformed // Don't do it if any text boxes have changed in Pope/Saint Mode if (iMyCurrentItem == -1) return; if (Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnName].equals(txtName.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnContext].equals(txtContext.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnCreateDate].equals(txtCreateDate.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnUpdateDate].equals(txtUpdateDate.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnItemType].equals(txtItemType.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnAtomType].equals(txtAtomType.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnRelevance].equals(txtRelevance.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnTimesUsed].equals(txtTimesUsed.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnClimaxScene].equals(txtClimaxScene.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnCorrespondences].equals(txtCorrespondences.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnUsages].equals(txtUsages.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnNotebook].equals(txtNotebook.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnSize].equals(txtSize.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnContents].equals(txaContents.getText())) setMode(); else { if (iMyMode == Chicago.MODE_POPE) this.radModePope.setSelected(true); if (iMyMode == Chicago.MODE_MONGO) this.radModeMongo.setSelected(true); if (iMyMode == Chicago.MODE_MATT) this.radModeGod.setSelected(true); } }//GEN-LAST:event_radModePriestActionPerformed private void radModePopeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radModePopeActionPerformed setMode(); }//GEN-LAST:event_radModePopeActionPerformed private void radModeMongoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radModeMongoActionPerformed setMode(); }//GEN-LAST:event_radModeMongoActionPerformed private void txtContextMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtContextMouseClicked prfContextRightClick(evt); }//GEN-LAST:event_txtContextMouseClicked private void txtAppContextMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtAppContextMouseClicked ////////////////////////// Rite Button ////////////////////////////// if ( SwingUtilities.isRightMouseButton(evt) ) { txtAppContext.setText(""); Chicago.sAppContext = ""; utlRedrawItemsList(); } }//GEN-LAST:event_txtAppContextMouseClicked private void txtNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtNameMouseClicked if ( SwingUtilities.isRightMouseButton(evt) ) { txtAppContext.setText(txtName.getText()); Chicago.sAppContext = txtName.getText(); utlRedrawItemsList(); } }//GEN-LAST:event_txtNameMouseClicked private void chkChangeDatabaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkChangeDatabaseActionPerformed Chicago.iDatabaseInstance++; // sets database instance to 1 on first click (does nothing) if (Chicago.iDatabaseInstance > Chicago.iDBNumber) Chicago.iDatabaseInstance = 1; System.out.println("Setting database instance to " + Chicago.iDatabaseInstance); Chicago.utlChangeJDBCConnection(Chicago.iDatabaseInstance); // pope / cancel /search this.setMode2Pope(); this.setAllMyShitToX(1); setMode2Priest(); prfSearchClick(); lblRowCount.setText(String.valueOf(Chicago.iRowCount)); }//GEN-LAST:event_chkChangeDatabaseActionPerformed private void txtFinishDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtFinishDateActionPerformed }//GEN-LAST:event_txtFinishDateActionPerformed private void txtUsagesCaretPositionChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_txtUsagesCaretPositionChanged // This method didn't fire as expected }//GEN-LAST:event_txtUsagesCaretPositionChanged private void txtUsagesPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtUsagesPropertyChange if (iMyMode != Chicago.MODE_POPE && iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnUsages); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtUsagesPropertyChange private void txtCreateDatePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtCreateDatePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnCreateDate); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtCreateDatePropertyChange private void txtUpdateDateCaretPositionChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_txtUpdateDateCaretPositionChanged System.out.println("Booger"); }//GEN-LAST:event_txtUpdateDateCaretPositionChanged private void txtNamePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtNamePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnName); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtNamePropertyChange private void txtContextPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtContextPropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnContext); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtContextPropertyChange private void txtUpdateDatePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtUpdateDatePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnUpdateDate); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtUpdateDatePropertyChange private void txtFinishDatePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtFinishDatePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnFinishDate); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtFinishDatePropertyChange private void txtItemTypePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtItemTypePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnItemType); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtItemTypePropertyChange private void txtAtomTypePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtAtomTypePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnAtomType); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtAtomTypePropertyChange private void txtRelevancePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtRelevancePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnRelevance); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtRelevancePropertyChange private void txtTimesUsedPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtTimesUsedPropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnTimesUsed); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtTimesUsedPropertyChange private void txtClimaxScenePropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtClimaxScenePropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnClimaxScene); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtClimaxScenePropertyChange private void txtCorrespondencesPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtCorrespondencesPropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnCorrespondences); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtCorrespondencesPropertyChange private void txtNotebookPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtNotebookPropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnNotebook); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtNotebookPropertyChange private void txaContentsPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txaContentsPropertyChange if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnContents); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txaContentsPropertyChange private void txaContentsKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txaContentsKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnContents); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txaContentsKeyTyped private void txtNameKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtNameKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnName); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtNameKeyTyped private void txtContextKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtContextKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnContext); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtContextKeyTyped private void txtCreateDateKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtCreateDateKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnCreateDate); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtCreateDateKeyTyped private void txtUpdateDateKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUpdateDateKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnUpdateDate); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtUpdateDateKeyTyped private void txtFinishDateKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtFinishDateKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnFinishDate); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtFinishDateKeyTyped private void txtItemTypeKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtItemTypeKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnItemType); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtItemTypeKeyTyped private void txtAtomTypeKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtAtomTypeKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnAtomType); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtAtomTypeKeyTyped private void txtRelevanceKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtRelevanceKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnRelevance); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtRelevanceKeyTyped private void txtTimesUsedKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtTimesUsedKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnTimesUsed); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtTimesUsedKeyTyped private void txtClimaxSceneKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtClimaxSceneKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnClimaxScene); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtClimaxSceneKeyTyped private void txtUsagesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUsagesKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnUsages); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtUsagesKeyTyped private void txtCorrespondencesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtCorrespondencesKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnCorrespondences); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtCorrespondencesKeyTyped private void txtNotebookKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtNotebookKeyTyped if (this.iMyMode != Chicago.MODE_POPE && this.iMyMode != Chicago.MODE_MONGO ) return; setUIColors(Chicago.cnNotebook); this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_txtNotebookKeyTyped private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed // Set my shit back to x this.setAllMyShitToX(this.iMyCurrentItem); setMode2Priest(); }//GEN-LAST:event_btnCancelActionPerformed private void btnCancelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCancelMouseClicked // Nah, use the ActionPerformed method instead }//GEN-LAST:event_btnCancelMouseClicked private void btnCommitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCommitActionPerformed // Oh, I don't know. Maybe, save some data? // Set what's on the screen into the object model for this item // oh, unless we're in Priest mode, which should have been // impossible to get here under... if (iMyMode == Chicago.MODE_PRIEST) return; String sContext = txtContext.getText(); String sOldContext = sContext; String sItemType = txtItemType.getText(); String sOldItemType = sItemType; String sName = txtName.getText(); String sOldName = sName; String sDeleted = "0"; if (chkDeleted.isSelected()) sDeleted="1"; String sFinishDate = txtFinishDate.getText(); String sSize = String.valueOf(txaContents.getText().length()); String sVersion = txtVersion.getText(); String formattedDate = ""; try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss"); formattedDate = myDateObj.format(myFormatObj); } catch (Exception e) { System.out.println("Exception with pope commiting item. Problem with Create Date"); e.printStackTrace(); } utlStopAStopwatch(); int x = iMyCurrentItem; /* Pope mode allows you to change a few things on the screen w/o having to go over to the Item screen. Because you are changing only one item in a "version tree", you cannot change anything making up the primary key: context / item type / name. */ if (iMyMode == Chicago.MODE_POPE) { Chicago.sObjModel[x][Chicago.DIRTY_BIT] = String.valueOf(Chicago.DIRTY_BIT_UPDATE); Chicago.sObjModel[x][Chicago.cnAtomType] = txtAtomType.getText(); Chicago.sObjModel[x][Chicago.cnClimaxScene] = txtClimaxScene.getText(); if (Chicago.sObjModel[x][Chicago.cnClock] == null) { System.out.println("Clock is null, dipshit."); Chicago.sObjModel[x][Chicago.cnClock]=String.valueOf(0); } int ctu = (int) aStopwatch.elapsedMillis()/1000 + Integer.parseInt(Chicago.sObjModel[x][Chicago.cnClock]); Chicago.sObjModel[x][Chicago.cnClock] = String.valueOf(ctu); Chicago.sObjModel[x][Chicago.cnContents] = txaContents.getText(); Chicago.sObjModel[x][Chicago.cnContext] = sContext; Chicago.sObjModel[x][Chicago.cnCorrespondences] = txtCorrespondences.getText(); Chicago.sObjModel[x][Chicago.cnCreateDate] = txtCreateDate.getText(); // 0 value add Chicago.sObjModel[x][Chicago.cnDeleted] = sDeleted; Chicago.sObjModel[x][Chicago.cnFinishDate] = txtFinishDate.getText(); Chicago.sObjModel[x][Chicago.cnItemType] = sItemType; Chicago.sObjModel[x][Chicago.cnName] = sName; Chicago.sObjModel[x][Chicago.cnNotebook] = txtNotebook.getText(); Chicago.sObjModel[x][Chicago.cnRelevance] = txtRelevance.getText().trim(); Chicago.sObjModel[x][Chicago.cnSize] = sSize; Chicago.sObjModel[x][Chicago.cnTimesUsed] = txtTimesUsed.getText(); Chicago.sObjModel[x][Chicago.cnUpdateDate] = formattedDate; Chicago.sObjModel[x][Chicago.cnUsages] = txtUsages.getText(); // Do not update the version numbers while (sContext.length() < Chicago.CONTEXT_MAX_LEN) { sContext = sContext + " "; } if (sContext.length() > Chicago.CONTEXT_MAX_LEN) sContext = sContext.substring(0,Chicago.CONTEXT_MAX_LEN); while (sName.length() < Chicago.NAME_MAX_LEN) { sName = sName + " "; } if (sName.length() > Chicago.NAME_MAX_LEN) sName = sName.substring(0,Chicago.NAME_MAX_LEN); int iFour = 4; int iRelevance = Integer.parseInt(txtRelevance.getText()); if (iRelevance < 0) iRelevance = 0; if (iRelevance > 100) iRelevance = 100; String sRelevance = String.valueOf(iRelevance); while (sRelevance.length() < iFour) sRelevance = " " + sRelevance; // Only put 8 characters in the list string for finish date if (sFinishDate == null) sFinishDate = " "; if (sFinishDate.length() > 8) sName = sName.substring(0,8); while (sFinishDate.length() < 8) sRelevance = " " + sRelevance; int iVersion = Integer.parseInt(sVersion); if (iVersion < 0) iVersion = 0; if (iVersion > 100) iVersion = 100; sVersion = String.valueOf(iVersion); while (sVersion.length() < iFour) sVersion = " " + sVersion; String sListString = sContext + " > " + sItemType + " # " + sRelevance + " & " + sFinishDate + " : " + sName + " @ " + sVersion; Chicago.sObjModel[x][Chicago.cnListString] = sListString; try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss"); String formattedUpdateDate = myDateObj.format(myFormatObj); // Since this is an UPDATE and I stole this code from an INSERT, comment out: //Chicago.sObjModel[x][Chicago.cnCreateDate] = formattedDate; Chicago.sObjModel[x][Chicago.cnUpdateDate] = formattedUpdateDate; } catch (Exception e) { System.out.println("Exception in creating a suitable value for update date while in pope mode"); e.printStackTrace(); } // What could it possibly hurt? ... Chicago.utlAlertHomeScreen(x); // Turn off POPE/SAINT setMode2Priest(); // SOMEDAY, THE FOLLOWING METHOD WILL ACTUALLY FUCKING DO SOMETHING Chicago.utlProjectManagement(); } if (this.iMyMode == Chicago.MODE_MONGO) { /********************************************************************************** ***************** MONGO MODE ***************** * Mongo mode is used to change the "version tree" of an item. Pope mode only * changes one version, this mode is to change all version. Hence, the only * changeable items on the screen are non-primary key items (context/item type/name) ***********************************************************************************/ for ( int iCounter = 1; iCounter < Chicago.iRowCount; iCounter++) { // THE BELOW NEEDS TO BE FIXED FOR HOME SCREEN. ITS THE CODE FROM ITEM SCREEN if (Chicago.sObjModel[iCounter][Chicago.cnName] .equals(sOldName) && Chicago.sObjModel[iCounter][Chicago.cnItemType].equals(sOldItemType) && Chicago.sObjModel[iCounter][Chicago.cnContext] .equals(sOldContext)) { // Set iCounter to x Chicago.sObjModel[iCounter][Chicago.cnName] = Chicago.sObjModel[x][Chicago.cnName]; Chicago.sObjModel[iCounter][Chicago.cnItemType] = Chicago.sObjModel[x][Chicago.cnItemType]; Chicago.sObjModel[iCounter][Chicago.cnContext] = Chicago.sObjModel[x][Chicago.cnContext]; Chicago.sObjModel[iCounter][Chicago.cnAtomType] = Chicago.sObjModel[x][Chicago.cnAtomType]; Chicago.sObjModel[iCounter][Chicago.cnRelevance] = Chicago.sObjModel[x][Chicago.cnRelevance]; Chicago.sObjModel[iCounter][Chicago.cnTimesUsed] = Chicago.sObjModel[x][Chicago.cnTimesUsed]; Chicago.sObjModel[iCounter][Chicago.cnClimaxScene]= Chicago.sObjModel[x][Chicago.cnClimaxScene]; Chicago.sObjModel[iCounter][Chicago.cnNotebook] = Chicago.sObjModel[x][Chicago.cnNotebook]; Chicago.sObjModel[iCounter][Chicago.cnCorrespondences] = Chicago.sObjModel[x][Chicago.cnCorrespondences]; Chicago.sObjModel[iCounter][Chicago.cnUsages] = Chicago.sObjModel[x][Chicago.cnUsages]; Chicago.sObjModel[iCounter][Chicago.cnSize] = Chicago.sObjModel[x][Chicago.cnSize]; Chicago.sObjModel[iCounter][Chicago.cnClock] = Chicago.sObjModel[x][Chicago.cnClock]; // Not updating contents of previous versions by rule if (Integer.parseInt(Chicago.sObjModel[iCounter][Chicago.DIRTY_BIT]) != Chicago.DIRTY_BIT_INSERT) Chicago.sObjModel[iCounter][Chicago.DIRTY_BIT]= String.valueOf(Chicago.DIRTY_BIT_UPDATE); }}} if (iMyMode == Chicago.MODE_MATT) { // COPY CHICAGO.DB TO CHICAGO-YYYYMMDDHHMMSS.DB ChicagoUIOKDialog okConfirmMatt = new ChicagoUIOKDialog(new javax.swing.JFrame(), true); okConfirmMatt.setLabel("I'm going to do some shit on OK"); okConfirmMatt.setLocationRelativeTo(null); okConfirmMatt.setVisible(true); // Save a copy of the fucking database: try { String sPath = "/Users/lance/Chicago/"; File source = new File(sPath + "chicago.db"); String sDate = LocalDateTime.now() .format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")); File destination = new File(sPath + "chicago-" + sDate + ".db"); Chicago.utlCopyFile(source, destination); } catch (Exception e) { e.printStackTrace(); } // Prune the fucking database and set the versions all to 1: Chicago.utlMattMode(); // I'm done. Carry the fuck on. setMode2Priest(); setChkAndRad(); utlRedrawItemsList(); utlStartAStopwatch(true); setDefaultUIColorsAndTimePermittingFonts(); } }//GEN-LAST:event_btnCommitActionPerformed private void btnCommitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCommitMouseClicked // Nah, use the ActionPerformed method }//GEN-LAST:event_btnCommitMouseClicked private void btnReloadDataActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnReloadDataActionPerformed Chicago.utlSELECTIntoObjtModel(); setMode2Priest(); utlRedrawItemsList(); }//GEN-LAST:event_btnReloadDataActionPerformed private void btnReloadDataMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnReloadDataMouseClicked // Use the ActionPerformed instead }//GEN-LAST:event_btnReloadDataMouseClicked private void btnCopyItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCopyItemActionPerformed prfCopy2ItemScn(); }//GEN-LAST:event_btnCopyItemActionPerformed //1111111111111111111111111111111111111111111111111111111111111111111111111111 //111111111111111111 METHODS I'VE WRITTEN ONE LINERS FOR: 11111111111111111111 //1111111111111111111111111111111111111111111111111111111111111111111111111111 private void btnCopyItemMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCopyItemMouseClicked // I don't do shit anymore }//GEN-LAST:event_btnCopyItemMouseClicked //1111111111111111111111111111111111111111111111111111111111111111111111111111 //111111111111111111 METHODS I'VE WRITTEN ONE LINERS FOR: 11111111111111111111 //1111111111111111111111111111111111111111111111111111111111111111111111111111 private void btnEditInventoryItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnEditInventoryItemActionPerformed prfEdit2ItemScn(); }//GEN-LAST:event_btnEditInventoryItemActionPerformed //---------------------------------------------------------------------------- //------------------- METHODS I'VE NOT WRITTEN CODE FOR: --------------------- //---------------------------------------------------------------------------- private void btnEditInventoryItemMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnEditInventoryItemMouseClicked //performEditItem(); }//GEN-LAST:event_btnEditInventoryItemMouseClicked //GEN-FIRST:event_btnCreateInventoryItemActionPerformed //GEN-LAST:event_btnCreateInventoryItemActionPerformed //GEN-FIRST:event_btnCreateInventoryItemMouseClicked private void btnCreateInventoryItemMouseClicked(java.awt.event.MouseEvent evt) { this.prfCreate2ItemScn(); } //GEN-LAST:event_btnCreateInventoryItemMouseClicked private void btnDeepSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDeepSearchActionPerformed prfSearch(); }//GEN-LAST:event_btnDeepSearchActionPerformed private void btnCompareItemsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCompareItemsActionPerformed prfCompareScn(); }//GEN-LAST:event_btnCompareItemsActionPerformed private void chkDeletedItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkDeletedItemStateChanged // TODO add your handling code here: }//GEN-LAST:event_chkDeletedItemStateChanged private void chkDeletedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkDeletedMouseClicked // TODO add your handling code here: }//GEN-LAST:event_chkDeletedMouseClicked private void chkDeletedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkDeletedActionPerformed setUIColors(Chicago.cnDeleted); // If I've changed, then the radio button for Priest gets disabled. this.radModePriest.setEnabled(!utlScreenDiffersFromObjModel()); }//GEN-LAST:event_chkDeletedActionPerformed private void chkIsDeletedItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkIsDeletedItemStateChanged // TODO add your handling code here: }//GEN-LAST:event_chkIsDeletedItemStateChanged private void chkIsDeletedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkIsDeletedMouseClicked // TODO add your handling code here: }//GEN-LAST:event_chkIsDeletedMouseClicked private void chkIsDeletedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsDeletedActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsDeletedActionPerformed private void chkIsBookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkIsBookActionPerformed utlRedrawItemsList(); }//GEN-LAST:event_chkIsBookActionPerformed private void lblClockMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_lblClockMouseClicked // User is requesting to manually edit the clock if (iMyCurrentItem < 0) return; // Only execute this code if the objectModel contains this item // Open up a dialog to ask the user for the adjustment ChicagoUIOKDialog dlgClockAdjustor = new ChicagoUIOKDialog(new javax.swing.JFrame(), true); dlgClockAdjustor.iMyObjectIndex = this.iMyCurrentItem; dlgClockAdjustor.setLabel("Enter Adjustment Amount:"); String sClockAdjustment = dlgClockAdjustor.showDialog(); //System.out.println("Adjustment: " + sClockAdjustment); if (sClockAdjustment.equals("")) return; // Update the object model with the adjustment int iFirstColon = sClockAdjustment.indexOf(':', 0); String sHours = sClockAdjustment.substring(0, iFirstColon); int iSecondColon = sClockAdjustment.indexOf(':', iFirstColon+1); String sMinutes = sClockAdjustment.substring(iFirstColon+1,iSecondColon); String sSeconds = sClockAdjustment.substring(iSecondColon+1); // Calculate the int int iHours = 0; int iSeconds = 0; int iMinutes = 0; try { iHours = Integer.parseInt(sHours); } catch (Exception e) { iHours = 0; } try { iMinutes = Integer.parseInt(sMinutes); } catch (Exception e) { iMinutes = 0; } try { iSeconds = Integer.parseInt(sSeconds); } catch (Exception e) { iSeconds = 0; } int iTotalAdjustment = iSeconds + (60 * iMinutes) + (3600 * iHours); String sCurrentTime = Chicago.sObjModel[iMyCurrentItem][Chicago.cnClock]; int iCurrentTime = -1; try { iCurrentTime = Integer.parseInt(sCurrentTime); } catch (Exception e) { iCurrentTime = 0; } iCurrentTime = iCurrentTime + iTotalAdjustment; Chicago.sObjModel[iMyCurrentItem][Chicago.cnClock] = String.valueOf(iCurrentTime); }//GEN-LAST:event_lblClockMouseClicked private void radModeGodActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radModeGodActionPerformed setMode(); }//GEN-LAST:event_radModeGodActionPerformed private void radModeMattActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radModeMattActionPerformed setMode(); }//GEN-LAST:event_radModeMattActionPerformed private void txtStatusActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtStatusActionPerformed // TODO add your handling code here: }//GEN-LAST:event_txtStatusActionPerformed private void txtStatusPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_txtStatusPropertyChange // TODO add your handling code here: }//GEN-LAST:event_txtStatusPropertyChange private void txtStatusKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtStatusKeyTyped // TODO add your handling code here: }//GEN-LAST:event_txtStatusKeyTyped // // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel bgdBackground; private javax.swing.JButton btnCancel; private javax.swing.JButton btnCommit; private javax.swing.JButton btnCompareItems; private javax.swing.JButton btnCopyItem; private javax.swing.JButton btnCreate; private javax.swing.JButton btnDeepSearch; private javax.swing.JButton btnEditInventoryItem; private javax.swing.JButton btnReloadData; private javax.swing.JButton btnSearch; private javax.swing.ButtonGroup buttonGroup2; private javax.swing.ButtonGroup buttonGroup3; private javax.swing.ButtonGroup buttonGroup4; private javax.swing.JCheckBox chkChangeDatabase; private javax.swing.JCheckBox chkDeleted; private javax.swing.JCheckBox chkIsAtom; private javax.swing.JCheckBox chkIsBook; private javax.swing.JCheckBox chkIsDeleted; private javax.swing.JCheckBox chkIsEpisode; private javax.swing.JCheckBox chkIsOther; private javax.swing.JCheckBox chkIsPart; private javax.swing.JCheckBox chkIsSection; private javax.swing.ButtonGroup grpMode; private javax.swing.JLabel lblAtomType; private javax.swing.JLabel lblClimaxScene; private javax.swing.JLabel lblClock; private javax.swing.JLabel lblContents; private javax.swing.JLabel lblContext; private javax.swing.JLabel lblCorrespondences; private javax.swing.JLabel lblCreateDate; private javax.swing.JLabel lblFinishDate; private javax.swing.JLabel lblItemType; private javax.swing.JLabel lblMaxVersion; private javax.swing.JLabel lblMode; private javax.swing.JLabel lblName; private javax.swing.JLabel lblNotebook; private javax.swing.JLabel lblRelevance; private javax.swing.JLabel lblRowCount; private javax.swing.JLabel lblSize; private javax.swing.JLabel lblStatus; private javax.swing.JLabel lblTimesUsed; private javax.swing.JLabel lblUpdateDate; private javax.swing.JLabel lblUsages; private javax.swing.JLabel lblVersion; private javax.swing.JLabel lblzzzForWhatIDontFuckingKnow; private javax.swing.JLabel lblzzzForWhatIDontFuckingKnow1; private javax.swing.JLabel lblzzzNameWhyDaFukRThere2; private javax.swing.JList lstInventory; private javax.swing.JPanel panDetails; private javax.swing.JPanel panSearchCriteria; private javax.swing.JRadioButton radDoes; private javax.swing.JRadioButton radDoesNot; private javax.swing.JRadioButton radModeGod; private javax.swing.JRadioButton radModeMatt; private javax.swing.JRadioButton radModeMongo; private javax.swing.JRadioButton radModePope; private javax.swing.JRadioButton radModePriest; private javax.swing.JScrollPane sclScrollPane2; private javax.swing.JScrollPane sclScrollPane4; private javax.swing.JTextArea txaContents; private javax.swing.JTextField txtAppContext; private javax.swing.JTextField txtAtomType; private javax.swing.JTextField txtClimaxScene; private javax.swing.JTextField txtClock; private javax.swing.JTextField txtContext; private javax.swing.JTextField txtCorrespondences; private javax.swing.JTextField txtCreateDate; private javax.swing.JTextField txtFinishDate; private javax.swing.JTextField txtItemType; private javax.swing.JTextField txtName; private javax.swing.JTextField txtNotebook; private javax.swing.JTextField txtRelevance; private javax.swing.JTextField txtSearchContains; private javax.swing.JTextField txtSize; private javax.swing.JTextField txtStatus; private javax.swing.JTextField txtTimesUsed; private javax.swing.JTextField txtUpdateDate; private javax.swing.JTextField txtUsages; private javax.swing.JTextField txtVersion; // End of variables declaration//GEN-END:variables /////////////////////////////////////////////////////////////////////////// ///////////////////////// HERE'S MY CODE: /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ///////////////////////// METHODS /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ///////////////////////// PRIVATE /////////////////////////////// /////////////////////////////////////////////////////////////////////////// // Utility methods: find matches in the object model: /////////////////////////////////////////////////////////////////////////// // The method below figures out which clicked row matches an item in the // // object model. The matching index of the object model is returned // /////////////////////////////////////////////////////////////////////////// private int findAMatchForListItemSelected() { int iMatchingIndex = -1; try { String sSelectedInventoryItem = lstInventory.getSelectedValue(); //System.out.println("I think the row selected in the inventory list has a value of: " + sSelectedInventoryItem); iMatchingIndex = Chicago.utlDecodeListStringToIndex(sSelectedInventoryItem); } catch ( Exception e) { e.printStackTrace(); } return iMatchingIndex; } /////////////////////////////////////////////////////////////////////////// // The method below figures out which item in the object model is a // // iMatch based on the 'on-screen' info of sItemType+sName+version // /////////////////////////////////////////////////////////////////////////// private int findWhatMyScreenMatches() { int iMatchingIndex = -1; for ( int i = 1; i <= Chicago.iRowCount; i++ ) { if (Chicago.sObjModel[i][Chicago.cnName ].equals(txtName .getText()) && Chicago.sObjModel[i][Chicago.cnItemType].equals(txtItemType.getText()) && Chicago.sObjModel[i][Chicago.cnVersion ].equals(txtVersion .getText())) { iMatchingIndex = i; break; }} if ( iMatchingIndex == -1) { // Pop open a modal window alerting about the failure: ChicagoUIOKDialog fuck = new ChicagoUIOKDialog (new javax.swing.JFrame(), true); fuck.setLabel( "Could not match: "+ txtItemType.getText() + " : " + txtName.getText() + " @ " + txtVersion .getText()); fuck.setLocationRelativeTo(null); fuck.setVisible (true); } return iMatchingIndex; } // Action and/or UI update responders: private void prfCompareScn() { utlStopAStopwatch(); ComparisonScreen scnComparison = new ComparisonScreen( new javax.swing.JFrame(), false); scnComparison.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { scnComparison.dispose(); }}); int iMatchingIndex = -1; int iMaxVersionMatchingIndex = -1; int iMaxVersion = -1; for ( int i = 1; i <= Chicago.iRowCount; i++ ) { if ( Chicago.sObjModel[i][Chicago.cnName ].trim().equals(txtName .getText().trim()) && Chicago.sObjModel[i][Chicago.cnItemType].trim().equals(txtItemType.getText().trim()) && Chicago.sObjModel[i][Chicago.cnVersion ].trim().equals(txtVersion .getText().trim())) { iMatchingIndex = i; iMaxVersion = Integer.parseInt(Chicago.sObjModel[i][Chicago.cnMaxVersion]); break; }} if ( iMatchingIndex == -1 ) { // Pop open a modal window alerting me ChicagoUIOKDialog fuck = new ChicagoUIOKDialog(new javax.swing.JFrame(), true ); fuck.setLabel( "No match 4 what's on screen, chief"); fuck.setLocationRelativeTo(null); fuck.setVisible( true); return; } // need to find x's equivalent where version=maxVersion and set the right side to that index for ( int i = 1; i <= Chicago.iRowCount; i++ ) { if (Chicago.sObjModel[i][Chicago.cnName].equals(txtName.getText()) && Chicago.sObjModel[i][Chicago.cnItemType].equals(txtItemType.getText()) && Chicago.sObjModel[i][Chicago.cnVersion].equals(Chicago.sObjModel[i][Chicago.cnMaxVersion])) { iMaxVersionMatchingIndex = i; break; }} if ( iMaxVersionMatchingIndex == -1 ) { // Pop open a modal window alerting me ChicagoUIOKDialog fuck = new ChicagoUIOKDialog(new javax.swing.JFrame(), true); fuck.setLabel( "No match 4 what's on screen, chief"); fuck.setLocationRelativeTo(null); fuck.setVisible( true); return; } scnComparison.setItemTypeNameListsToDefault(); scnComparison.setInventoryCombos(lstInventory.getSelectedIndex()); scnComparison.setSomethingToX(iMatchingIndex,1); scnComparison.setSomethingToX(iMaxVersionMatchingIndex,2); // Also set the combo box to this item. scnComparison.utlStartStopwatch(); scnComparison.setVisible(true); utlStopAStopwatch(); } private void prfContextRightClick (java.awt.event.MouseEvent evt) { ////////////////////////// Rite Button ////////////////////////////// if ( SwingUtilities.isRightMouseButton(evt) ) { txtAppContext.setText(txtContext.getText()); Chicago.sAppContext = txtContext.getText(); utlRedrawItemsList(); } } private void prfCopy2ItemScn() { ItemScreen scnItem = new ItemScreen( new javax.swing.JFrame(), false ); scnItem.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { scnItem.dispose(); }}); scnItem.setDefaultValues(); scnItem.setTxtName(txtName.getText()+"-copy"); scnItem.setTxtItemType(txtItemType.getText()); scnItem.setTxtAtomType(txtAtomType.getText()); scnItem.setTxtClimaxScene(txtClimaxScene.getText()); scnItem.setTxtContext(txtContext.getText()); //scnItem.setCboStatus(this.txtStatus.getText()); scnItem.setCboStatusValue(this.txtStatus.getText()); scnItem.setTxtCorrespondences(txtCorrespondences.getText()); scnItem.setTxtRelevance(txtRelevance.getText()); scnItem.setTxtSize("0"); scnItem.setTxtTimesUsed(txtTimesUsed.getText()); scnItem.setTxtUsages(txtUsages.getText()); scnItem.setTxaContents(txaContents.getText()); scnItem.setTxtVersion("1"); scnItem.utlStartAStopwatch(true); scnItem.utlRunTask(); scnItem.setMyFunction(Chicago.SCREEN_COPY); scnItem.setVisible( true); utlStopAStopwatch();; } private void prfCreate2ItemScn() { ItemScreen scnItem = new ItemScreen(new javax.swing.JFrame(), false); scnItem.addWindowListener (new java.awt.event.WindowAdapter() { @Override public void windowClosing ( java.awt.event.WindowEvent e ) { // I NEED TO SAVE THE LAST TIME SPENT PRIOR TO CLOSING Chicago.utlProjectManagement(); scnItem.dispose(); }}); scnItem.setDefaultValues(); scnItem.utlStartAStopwatch(true); scnItem.utlRunTask(); scnItem.setMyFunction(Chicago.SCREEN_CREATE); scnItem.setVisible( true); utlStopAStopwatch(); } private void prfDelete() { if ( lstInventory.getSelectedIndex() >= 0 ) { int iItemSelected = lstInventory.getSelectedIndex(); String sItemSelected = lstInventory.getSelectedValue(); Chicago.utlDeleteAnItem(iItemSelected, sItemSelected); //String query = evaluateCheckBoxes (); utlRedrawItemsList(); } else { // Create a modal window and tell that asshole to select an item first ChicagoUIOKDialog fuck = new ChicagoUIOKDialog(new javax.swing.JFrame(), true ); fuck.setLabel ( "Please select an item first, asshole."); fuck.setLocationRelativeTo(null); fuck.setVisible ( true); } utlStopAStopwatch(); } // Utility: Delete public static void prfDeleteAnItem(int x) { Chicago.sObjModel[x][Chicago.cnDeleted] = String.valueOf(1); // TODO: call the commit method to UPDATE the column above... // Item x needs to have it's field iDeleted. // Since there is no primary key in the database (I should add one) // the way to determine which item is x would be to: // // find a iMatch } private void prfEdit2ItemScn() { ItemScreen scnItem = new ItemScreen(new javax.swing.JFrame(), false); scnItem.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { scnItem.dispose(); }}); int iTheItemOnMyScreen = findWhatMyScreenMatches(); if ( iTheItemOnMyScreen > -1 ) scnItem.setAllMyShitToX(iTheItemOnMyScreen); else System.out.println("****ERROR OPENING EDIT SCREEN***"); scnItem.utlRunTask(); scnItem.utlStartAStopwatch(true); scnItem.utlRunTask(); //Chicago.SCREEN_EDIT scnItem.setMyFunction(Chicago.SCREEN_EDIT); scnItem.setVisible(true); utlStopAStopwatch(); } private void prfInventoryClick ( java.awt.event.MouseEvent evt ) { ////////////////////////// Rite Button ////////////////////////////// if ( SwingUtilities.isRightMouseButton(evt) ) { // TODO: print the item selected } //////////////////////// Sinster Button ///////////////////////////// if ( SwingUtilities.isLeftMouseButton(evt) ) { // Because I added Pope/Mongo, don't let me leave unless no items have been changed if (this.iMyMode!=Chicago.MODE_PRIEST) { System.out.println("short ct due to mode"); return;} if (utlScreenDiffersFromObjModel()) { System.out.println("short ct scrrens fd up"); return;} // Because I shouldn't worry about matching the first time int iInventoryListIndex = -1; try { iInventoryListIndex = lstInventory.getSelectedIndex(); } catch ( Exception e) { System.out.println("Exception caught in klik"); } // If iOldIndex is not -1, save the stopwatch to iOldIndex if (iOldIndex != -1) { // Save the stopwatch and reset it // need to get the stopwatch into iMyCurrentItems clock. try { String sInitialClock = Chicago.sObjModel[iOldIndex][Chicago.cnClock].trim(); int iInitialClock = Integer.parseInt(sInitialClock); int iTotalClock = iInitialClock + (int) (aStopwatch.elapsedMillis()/1000); Chicago.sObjModel[iOldIndex][Chicago.cnClock] = String.valueOf(iTotalClock); Chicago.sObjModel[iOldIndex][Chicago.DIRTY_BIT] = String.valueOf(Chicago.DIRTY_BIT_UPDATE); aStopwatch.reset(); //aStopwatch.stop(); } catch (Exception e) { e.printStackTrace(); }} int iMatch = findAMatchForListItemSelected(); // Get ready to start all over again... if ( iMatch == -1) { // Create a modal window and tell that asshole I'm fucked ChicagoUIOKDialog fuck = new ChicagoUIOKDialog(new javax.swing.JFrame(), true ); fuck.setLabel ( "No match. I'm fucked."); fuck.setLocationRelativeTo(null); fuck.setVisible ( true); } else { // Allow editing maxversion field to switch to a different version if (iMyMode == Chicago.MODE_PRIEST) { lblMaxVersion.setEnabled(true); lblMaxVersion.setForeground(Chicago.COL_WHITE); } else lblMaxVersion.setEnabled(false); this.iMyCurrentItem = iMatch; this.iOldIndex = iMatch; // Redraw the right side of the screen with this inventory item setAllMyShitToX(iMyCurrentItem); // Enable the radio buttons (finally) if (iMyCurrentItem != -1) { this.radModePriest.setEnabled(true); this.radModePope.setEnabled(true); this.radModeMongo.setEnabled(true); this.radModeGod.setEnabled(true); this.radModeMatt.setEnabled(true); this.radModePriest.setSelected(true); } else { this.radModePriest.setEnabled(true); this.radModePope.setEnabled(false); this.radModeMongo.setEnabled(false); this.radModeGod.setEnabled(false); this.radModeGod.setEnabled(false); this.radModePriest.setSelected(true); } lstInventory.setSelectedIndex(iInventoryListIndex); }} } ////////////////////////////////////////////////////////////////////////// // Launch the search screen private void prfSearch() { SearchScreen scnSearch = new SearchScreen(new javax.swing.JFrame(), false); scnSearch.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { scnSearch.dispose(); }}); // Call the method to enable/disable everything scnSearch.setDefaultUI(); scnSearch.utlRedrawInventory(); scnSearch.setVisible(true); utlStopAStopwatch(); } ////////////////////////////////////////////////////////////////////////// // 1-LINER THAT CALLS REDRAWITEMSLIST private void prfSearchClick() { // TODO: 20230725: Need to change the code below. utlRedrawItemsList(); } private int prfUtilGetNewVersion() { // TO BE FAIR, I'M NOT CHECKING ANY OF THE TEXT BOXES, SO CAVEAT EMPTOR return Chicago.utlFindAMatch(null, txtItemType.getText(), txtName.getText(), txtVersion.getText()); // Oh, and find out who the okConfirmMatt uses me and why. } ////////////////////////////////////////////////////////////////////////// // When the combo box has an item selected, set the app context: ////////////////////////////////////////////////////////////////////////// private void setAppContext() { // This method will be called when the combo box is changed // It will set the Chicago.myContext to the sContextItem of the combo box // The comboBox will be a list of all the book items Chicago.sAppContext = txtContext.getText(); } ////////////////////////////////////////////////////////////////////////// // Getters: ////////////////////////////////////////////////////////////////////////// public int getOldSelectedValue() { return iOldIndex; } ////////////////////////////////////////////////////////////////////////// // Setters: ////////////////////////////////////////////////////////////////////////// // * Fonts public void setDefaultUIColorsAndTimePermittingFonts() { /////////////////////////////////////////////////////////////// // BACKGROUNDS bgdBackground.setBackground(Chicago.COL_BLACK); // Yeah, I used a fucking spreadsheet to create the below code: chkIsAtom.setBackground(Chicago.COL_BLACK); chkIsBook.setBackground(Chicago.COL_BLACK); chkIsEpisode.setBackground(Chicago.COL_BLACK); chkIsOther.setBackground(Chicago.COL_BLACK); chkIsPart.setBackground(Chicago.COL_BLACK); chkIsSection.setBackground(Chicago.COL_BLACK); txtAtomType.setBackground(Chicago.COL_BLACK); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClock.setBackground(Chicago.COL_BLACK); txaContents.setBackground(Chicago.COL_BLACK); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtName.setBackground(Chicago.COL_BLACK); txtSize.setBackground(Chicago.COL_BLACK); txtItemType.setBackground(Chicago.COL_BLACK); lblzzzForWhatIDontFuckingKnow.setBackground(Chicago.COL_BLACK); txtNotebook.setBackground(Chicago.COL_BLACK); txtRelevance.setBackground(Chicago.COL_BLACK); txtSearchContains.setBackground(Chicago.COL_BLACK); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtUsages.setBackground(Chicago.COL_BLACK); txtVersion.setBackground(Chicago.COL_BLACK); lblClimaxScene.setBackground(Chicago.COL_BLACK); lblClock.setBackground(Chicago.COL_BLACK); lblUsages.setBackground(Chicago.COL_BLACK); lblSize.setBackground(Chicago.COL_BLACK); lblNotebook.setBackground(Chicago.COL_BLACK); lblRelevance.setBackground(Chicago.COL_BLACK); lblCorrespondences.setBackground(Chicago.COL_BLACK); lblAtomType.setBackground(Chicago.COL_BLACK); lblContents.setBackground(Chicago.COL_BLACK); lblName.setBackground(Chicago.COL_BLACK); lblzzzNameWhyDaFukRThere2.setBackground(Chicago.COL_BLACK); lblItemType.setBackground(Chicago.COL_BLACK); lblTimesUsed.setBackground(Chicago.COL_BLACK); lblVersion.setBackground(Chicago.COL_BLACK); lblMaxVersion.setBackground(Chicago.COL_BLACK); radDoes.setBackground(Chicago.COL_BLACK); radDoesNot.setBackground(Chicago.COL_BLACK); panDetails.setBackground(Chicago.COL_BLACK); /////////////////////////////////////////////////////////////// // FOREGROUNDS chkIsAtom.setForeground(Chicago.COL_GHOST); chkIsBook.setForeground(Chicago.COL_GHOST); chkIsEpisode.setForeground(Chicago.COL_GHOST); chkIsOther.setForeground(Chicago.COL_GHOST); chkIsPart.setForeground(Chicago.COL_GHOST); chkIsSection.setForeground(Chicago.COL_GHOST); lblAtomType.setForeground(Chicago.COL_GHOST); lblClimaxScene.setForeground(Chicago.COL_GHOST); lblClock.setForeground(Chicago.COL_GHOST); lblContents.setForeground(Chicago.COL_GHOST); lblCorrespondences.setForeground(Chicago.COL_GHOST); lblItemType.setForeground(Chicago.COL_GHOST); // The label for max version is always ghost lblMaxVersion.setForeground(Chicago.COL_GHOST); lblName.setForeground(Chicago.COL_GHOST); lblNotebook.setForeground(Chicago.COL_GHOST); lblRelevance.setForeground(Chicago.COL_GHOST); lblSize.setForeground(Chicago.COL_GHOST); lblTimesUsed.setForeground(Chicago.COL_GHOST); lblUsages.setForeground(Chicago.COL_GHOST); lblVersion.setForeground(Chicago.COL_GHOST); lblzzzForWhatIDontFuckingKnow.setForeground(Chicago.COL_GHOST); lblzzzNameWhyDaFukRThere2.setForeground(Chicago.COL_GHOST); panDetails.setForeground(Chicago.COL_GHOST); radDoes.setForeground(Chicago.COL_GHOST); radDoesNot.setForeground(Chicago.COL_GHOST); txaContents.setForeground(Chicago.COL_GHOST); txtAtomType.setForeground(Chicago.COL_GHOST); txtClimaxScene.setForeground(Chicago.COL_GHOST); txtClock.setForeground(Chicago.COL_GHOST); txtCorrespondences.setForeground(Chicago.COL_GHOST); txtItemType.setForeground(Chicago.COL_GHOST); txtName.setForeground(Chicago.COL_GHOST); txtNotebook.setForeground(Chicago.COL_GHOST); txtRelevance.setForeground(Chicago.COL_GHOST); txtSearchContains.setForeground(Chicago.COL_GHOST); txtSize.setForeground(Chicago.COL_GHOST); txtTimesUsed.setForeground(Chicago.COL_GHOST); txtUsages.setForeground(Chicago.COL_GHOST); // Version is usually white except when you go into pope/mongo/god txtVersion.setForeground(Chicago.COL_WHITE); /////////////////////////////////////////////////////////////// // BORDERS bgdBackground.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); lstInventory.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lstInventory.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txaContents.setDisabledTextColor(Chicago.COL_GHOST); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); txtClock.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClock.setDisabledTextColor(Chicago.COL_GHOST); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtContext.setDisabledTextColor(Chicago.COL_GHOST); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); txtName.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtName.setDisabledTextColor(Chicago.COL_GHOST); txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); txtSearchContains.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSearchContains.setDisabledTextColor(Chicago.COL_GHOST); txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSize.setDisabledTextColor(Chicago.COL_GHOST); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtVersion.setDisabledTextColor(Chicago.COL_GHOST); //bgdBackground.setDisabledTextColor(Chicago.COL_GHOST); //lstItems.setDisabledTextColor(Chicago.COL_GHOST); } // * UI public void setAllMyShitToX( int x) { if (x == -1) return; iMyCurrentItem = x; try { if (aStopwatch.isRunning()) utlStopAStopwatch(); lblRowCount.setText(String.valueOf(Chicago.iRowCount)); txtName .setText( Chicago. sObjModel[x][Chicago.cnName ]); txtContext .setText( Chicago. sObjModel[x][Chicago.cnContext ]); txtItemType .setText( Chicago. sObjModel[x][Chicago.cnItemType ]); txtAtomType .setText( Chicago. sObjModel[x][Chicago.cnAtomType ]); txaContents .setText( Chicago. sObjModel[x][Chicago.cnContents ]); txtTimesUsed .setText( Chicago. sObjModel[x][Chicago.cnTimesUsed ]); txtClimaxScene .setText( Chicago. sObjModel[x][Chicago.cnClimaxScene]); txtNotebook .setText( Chicago. sObjModel[x][Chicago.cnNotebook ]); txtCorrespondences.setText( Chicago. sObjModel[x][Chicago.cnCorrespondences]); txtUsages .setText( Chicago. sObjModel[x][Chicago.cnUsages ]); if (Chicago.sObjModel[x][Chicago.cnRelevance]==null) Chicago.sObjModel[x][Chicago.cnRelevance]="0"; txtRelevance .setText(Chicago.sObjModel[x][Chicago.cnRelevance].toString()); if (Chicago.sObjModel[x][Chicago.cnSize]==null) Chicago.sObjModel[x][Chicago.cnSize]="0"; txtSize .setText(Chicago.sObjModel[x][Chicago.cnSize ].toString()); if (Chicago.sObjModel[x][Chicago.cnVersion]==null) Chicago.sObjModel[x][Chicago.cnVersion]="1"; txtVersion .setText(Chicago.sObjModel[x][Chicago.cnVersion ].toString()); if (Chicago.sObjModel[x][Chicago.cnDeleted]==null) Chicago.sObjModel[x][Chicago.cnDeleted]="0"; int iDeleted = Integer.parseInt(Chicago.sObjModel[x][Chicago.cnDeleted]); txtCreateDate .setText( Chicago. sObjModel[x][Chicago.cnCreateDate ]); txtUpdateDate .setText( Chicago. sObjModel[x][Chicago.cnUpdateDate ]); txtFinishDate .setText( Chicago. sObjModel[x][Chicago.cnFinishDate ]); if (Chicago.sObjModel[x][Chicago.cnDeleted].equals("0")) chkDeleted.setSelected(false); else chkDeleted.setSelected(true); txtStatus.setText(Chicago.sObjModel[x][Chicago.cnStatus]); } catch (Exception ex) { System.out.println("Got a null in CSH:setAllMyShitToX..."); ex.printStackTrace(); } int clockTime = Integer.parseInt(Chicago.sObjModel[x][Chicago.cnClock]); txtClock.setText(utlConvertIntToClock(Integer.parseInt(Chicago.sObjModel[x][Chicago.cnClock]))); txaContents.setCaretPosition(0); if (x > -1 && iMyMode == Chicago.MODE_PRIEST) { lblMaxVersion.setEnabled(true); lblMaxVersion.setText(" of "+Chicago.sObjModel[x][Chicago.cnMaxVersion]); lblMaxVersion.setForeground(Chicago.COL_GHOST); } else lblMaxVersion.setEnabled(false); //utlStartAStopwatch(true); } // Checkboxes & Radio Buttons Inital Values public void setChkAndRad() { chkIsBook .setSelected( true ); chkIsPart .setSelected( true ); chkIsEpisode.setSelected( true ); chkIsSection.setSelected( true ); chkIsAtom .setSelected( true ); chkIsOther .setSelected( true ); chkIsDeleted.setSelected(false); radDoes.setSelected(true); radModePriest.setSelected(true); radModePriest.setEnabled(true); radModePriest.setSelected(true); radModePope.setEnabled(false); radModeMongo.setEnabled(false); radModeGod.setEnabled(false); radModeMatt.setEnabled(true); } // Clock public void setClock(String s) { lblClock.setText(s); } // Context: public void setContext(String sContext) { txtContext.setText(sContext); } // List Box: public void setItemListItemSelected(int x) { lstInventory.setSelectedIndex(x); } public void setMode() { if (radModePriest.isSelected()) setMode2Priest(); if (radModePope.isSelected()) setMode2Pope(); if (radModeMongo.isSelected()) setMode2Mongo(); if (radModeGod.isSelected()) setMode2God(); if (radModeMatt.isSelected()) setMode2Matt(); } public void setMode2Priest() { iMyMode = Chicago.MODE_PRIEST; utlDisableEditMode(); setUIColors(0); this.radModePriest.setSelected(true); this.radModePriest.setEnabled(true); if (iMyCurrentItem == -1) { this.radModePope.setEnabled(false); this.radModeMongo.setEnabled(false); this.radModeGod.setEnabled(false); this.radModeMatt.setEnabled(true); } else { this.radModePope.setEnabled(true); this.radModeMongo.setEnabled(true); this.radModeGod.setEnabled(true); this.radModeMatt.setEnabled(true); } lblMaxVersion.setEnabled(true); lblMaxVersion.setForeground(Chicago.COL_WHITE); txtVersion.setEnabled(true); txtVersion.setForeground(Chicago.COL_WHITE); txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); this.lstInventory.setEnabled(true); this.lstInventory.setBackground(Chicago.COL_BLACK); btnCommit.setEnabled(false); btnCancel.setEnabled(false); } public void setMode2Pope() { iMyMode = Chicago.MODE_POPE; utlEnableHighModes(); setUIColors(0); this.radModePriest.setEnabled(false); this.radModePope.setSelected(true); this.radModePope.setEnabled(true); this.radModeMongo.setEnabled(false); this.radModeGod.setEnabled(false); this.radModeMatt.setEnabled(false); this.lstInventory.setEnabled(false); this.lstInventory.setBackground(Chicago.COL_BLACK); this.lstInventory.setForeground(Chicago.COL_GHOST); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } public void setMode2Mongo() { iMyMode = Chicago.MODE_MONGO; utlEnableHighModes(); setUIColors(0); this.radModePriest.setEnabled(false); this.radModePope.setEnabled(false); this.radModeMongo.setSelected(true); this.radModeMongo.setEnabled(true); this.radModeGod.setEnabled(false); this.radModeMatt.setEnabled(false); this.lstInventory.setEnabled(false); this.lstInventory.setBackground(Chicago.COL_BLACK); this.lstInventory.setForeground(Chicago.COL_GHOST); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } public void setMode2God() { iMyMode = Chicago.MODE_GOD; utlEnableHighModes(); txtVersion.setEnabled(false); lblMaxVersion.setEnabled(false); setUIColors(0); this.radModePriest.setEnabled(false); this.radModePope.setEnabled(false); this.radModeMongo.setEnabled(false); this.radModeGod.setSelected(true); this.radModeGod.setEnabled(true); this.radModeMatt.setEnabled(false); this.lstInventory.setEnabled(false); this.lstInventory.setEnabled(false); this.lstInventory.setBackground(Chicago.COL_BLACK); this.lstInventory.setForeground(Chicago.COL_GHOST); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } public void setMode2Matt() { iMyMode = Chicago.MODE_MATT; utlEnableHighModes(); setUIColors(0); this.radModePriest.setEnabled(false); this.radModePope.setEnabled(false); this.radModeMongo.setEnabled(false); this.radModeGod.setEnabled(false); this.radModeMatt.setSelected(true); this.radModeMatt.setEnabled(true); this.lstInventory.setBackground(Chicago.COL_BLACK); this.lstInventory.setForeground(Chicago.COL_GHOST); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } public void setUIColors(int iColumn) { if (iMyCurrentItem < 1) return; // Do stuff Color colBgdBackground = Chicago.COL_BLACK; Color colChkBackground = Chicago.COL_BLACK; Color colChkForeground = Chicago.COL_BLACK; Color colLblBackground = Chicago.COL_BLACK; Color colLblForeground = Chicago.COL_BLACK; Color colLstItemsBackground = Chicago.COL_BLACK; Color colLstItemsForeground = Chicago.COL_BLACK; Color colPanelBackground = Chicago.COL_BLACK; Color colPanelBackgroundMongoRed = Chicago.COL_BLACK; Color colPanelBackgroundMongoBlk = Chicago.COL_BLACK; Color colRadBackground = Chicago.COL_BLACK; Color colRadForeground = Chicago.COL_BLACK; Color colTxaBackground = Chicago.COL_BLACK; Color colTxaForeground = Chicago.COL_BLACK; Color colTxaBorder = Chicago.COL_BLACK; Color colTxtBackground = Chicago.COL_BLACK; Color colTxtForeground = Chicago.COL_BLACK; Color colTxtForegroundDisabled = Chicago.COL_BLACK; Color colTxtBorder = Chicago.COL_BLACK; Color colTxtVersionAll = Chicago.COL_WHITE; if (iColumn == ALL_COLUMNS) { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { // ALL ITEMS ON THE UI GET SET TO THEIR DEFAULTS FOR THE SKIN // Stuff for DARK PRIEST colBgdBackground = Chicago.COL_BLACK; colChkBackground = Chicago.COL_BLACK; colChkForeground = Chicago.COL_GHOST; colLblBackground = Chicago.COL_BLACK; colLblForeground = Chicago.COL_GHOST; colLstItemsBackground = Chicago.COL_BLACK; colLstItemsForeground = Chicago.COL_GHOST; colPanelBackground = Chicago.COL_BLACK; colRadBackground = Chicago.COL_BLACK; colRadForeground = Chicago.COL_GHOST; colTxaBackground = Chicago.COL_BLACK; colTxaForeground = Chicago.COL_GHOST; colTxaBorder = Chicago.COL_GHOST; colTxtBackground = Chicago.COL_BLACK; colTxtForeground = Chicago.COL_GHOST; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_GHOST; } if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_POPE) { // Stuff for DARK POPE // ENABLE SOME SHIT colBgdBackground = Chicago.COL_POPE_BLACK; colChkBackground = Chicago.COL_POPE_BLACK; colChkForeground = Chicago.COL_GHOST; colLblBackground = Chicago.COL_POPE_BLACK; colLblForeground = Chicago.COL_WHITE; colLstItemsBackground = Chicago.COL_POPE_BLACK; colLstItemsForeground = Chicago.COL_GHOST; colPanelBackground = Chicago.COL_POPE_BLACK; colRadBackground = Chicago.COL_POPE_BLACK; colRadForeground = Chicago.COL_WHITE; colTxaBackground = Chicago.COL_POPE_BLACK; colTxaForeground = Chicago.COL_WHITE; colTxaBorder = Chicago.COL_WHITE; colTxtBackground = Chicago.COL_POPE_BLACK; colTxtForeground = Chicago.COL_WHITE; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_WHITE; } if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_MONGO) { // Stuff for DARK MONGO // ENABLE SOME SHIT AND BE ANNOYING ABOUT BEING IN THIS MODE //colBgdBackground = Chicago.COL_CYAN; colChkBackground = Chicago.COL_POPE_BLACK; colChkForeground = Chicago.COL_GHOST; colLblBackground = Chicago.COL_POPE_BLACK; colLblForeground = Chicago.COL_GHOST; colLstItemsBackground = Chicago.COL_POPE_BLACK; colLstItemsForeground = Chicago.COL_GHOST; colPanelBackgroundMongoRed = Chicago.COL_BLACK; colPanelBackgroundMongoBlk = Chicago.COL_POPE_BLACK; colRadBackground = Chicago.COL_POPE_BLACK; colRadForeground = Chicago.COL_GHOST; colTxaBackground = Chicago.COL_POPE_BLACK; colTxaForeground = Chicago.COL_GHOST; colTxaBorder = Chicago.COL_GHOST; colTxtBackground = Chicago.COL_POPE_BLACK; colTxtForeground = Chicago.COL_WHITE; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_WHITE; } if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_GOD) { // Stuff for DARK MONGO // ENABLE SOME SHIT AND BE ANNOYING ABOUT BEING IN THIS MODE //colBgdBackground = Chicago.COL_CYAN; colChkBackground = Chicago.COL_POPE_BLACK; colChkForeground = Chicago.COL_GHOST; colLblBackground = Chicago.COL_POPE_BLACK; colLblForeground = Chicago.COL_GHOST; colLstItemsBackground = Chicago.COL_POPE_BLACK; colLstItemsForeground = Chicago.COL_GHOST; colPanelBackgroundMongoRed = Chicago.COL_BLACK; colPanelBackgroundMongoBlk = Chicago.COL_POPE_BLACK; colRadBackground = Chicago.COL_POPE_BLACK; colRadForeground = Chicago.COL_GHOST; colTxaBackground = Chicago.COL_POPE_BLACK; colTxaForeground = Chicago.COL_GHOST; colTxaBorder = Chicago.COL_GHOST; colTxtBackground = Chicago.COL_POPE_BLACK; colTxtForeground = Chicago.COL_WHITE; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_GHOST; } if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_MATT) { // Stuff for DARK MONGO // ENABLE SOME SHIT AND BE ANNOYING ABOUT BEING IN THIS MODE //colBgdBackground = Chicago.COL_CYAN; colChkBackground = Chicago.COL_POPE_BLACK; colChkForeground = Chicago.COL_GHOST; colLblBackground = Chicago.COL_POPE_BLACK; colLblForeground = Chicago.COL_GHOST; colLstItemsBackground = Chicago.COL_POPE_BLACK; colLstItemsForeground = Chicago.COL_GHOST; colPanelBackgroundMongoRed = Chicago.COL_BLACK; colPanelBackgroundMongoBlk = Chicago.COL_POPE_BLACK; colRadBackground = Chicago.COL_POPE_BLACK; colRadForeground = Chicago.COL_GHOST; colTxaBackground = Chicago.COL_POPE_BLACK; colTxaForeground = Chicago.COL_GHOST; colTxaBorder = Chicago.COL_GHOST; colTxtBackground = Chicago.COL_POPE_BLACK; colTxtForeground = Chicago.COL_GHOST; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_GHOST; } // CONTINUE ON COPYING THE 3 IFS ABOVE (4 IF GOD IS INVITED) FOR EACH SKIN // NOW SET EVERYTHING TO THE COLORS ARRANGED ABOVE //BACKGROUNDS bgdBackground.setBackground(colBgdBackground); //////////////////////////////////////////////////////////////// ////////// MONGO ///////// //////////////////////////////////////////////////////////////// if (iMyMode==Chicago.MODE_MONGO) panDetails.setBackground(colPanelBackgroundMongoRed); else panDetails.setBackground(colPanelBackground); if (iMyMode==Chicago.MODE_MONGO) panSearchCriteria.setBackground(colPanelBackgroundMongoBlk); else panSearchCriteria.setBackground(colPanelBackground); // RADIOS radDoes.setBackground(colRadBackground); radDoesNot.setBackground(colRadBackground); radModeMongo.setBackground(colRadBackground); radModePope.setBackground(colRadBackground); radModePriest.setBackground(colRadBackground); // INVENTORY LIST lstInventory.setBackground(colLstItemsBackground); // CHECK BOXES chkIsAtom.setBackground(colChkBackground); chkIsBook.setBackground(colChkBackground); chkIsEpisode.setBackground(colChkBackground); chkIsOther.setBackground(colChkBackground); chkIsPart.setBackground(colChkBackground); chkIsSection.setBackground(colChkBackground); chkIsAtom.setForeground(colChkForeground); chkIsBook.setForeground(colChkForeground); chkIsEpisode.setForeground(colChkForeground); chkIsOther.setForeground(colChkForeground); chkIsPart.setForeground(colChkForeground); chkIsSection.setForeground(colChkForeground); // LABELS lblAtomType.setBackground(colLblBackground); lblClimaxScene.setBackground(colLblBackground); lblClock.setBackground(colLblBackground); lblContents.setBackground(colLblBackground); lblContext.setBackground(colLblBackground); lblUsages.setBackground(colLblBackground); lblCreateDate.setBackground(colLblBackground); lblFinishDate.setBackground(colLblBackground); lblItemType.setBackground(colLblBackground); lblMaxVersion.setBackground(colLblBackground); // Always white in priest if (iMyMode == Chicago.MODE_PRIEST) { lblMaxVersion.setForeground(Chicago.COL_WHITE); } lblRowCount.setBackground(colLblBackground); lblName.setBackground(colLblBackground); lblNotebook.setBackground(colLblBackground); lblRelevance.setBackground(colLblBackground); lblSize.setBackground(colLblBackground); lblTimesUsed.setBackground(colLblBackground); lblUpdateDate.setBackground(colLblBackground); lblCorrespondences.setBackground(colLblBackground); lblVersion.setBackground(colLblBackground); lblzzzForWhatIDontFuckingKnow.setBackground(Chicago.COL_CYAN); lblzzzForWhatIDontFuckingKnow1.setBackground(Chicago.COL_CYAN); //lblzzzForWhatIDontFuckingKnow2.setBackground(Chicago.COL_CYAN); lblzzzNameWhyDaFukRThere2.setBackground(Chicago.COL_CYAN); // TEXT AREA txaContents.setBackground(colTxaBackground); // TEXT BOXES txtAppContext.setBackground(colTxtBackground); txtAtomType.setBackground(colTxtBackground); txtClimaxScene.setBackground(colTxtBackground); txtContext.setBackground(colTxtBackground); txtCorrespondences.setBackground(colTxtBackground); txtCreateDate.setBackground(colTxtBackground); txtItemType.setBackground(colTxtBackground); txtName.setBackground(colTxtBackground); txtNotebook.setBackground(colTxtBackground); txtRelevance.setBackground(colTxtBackground); txtSearchContains.setBackground(colTxtBackground); txtSize.setBackground(colTxtBackground); txtTimesUsed.setBackground(colTxtBackground); txtUpdateDate.setBackground(colTxtBackground); txtUsages.setBackground(colTxtBackground); txtVersion.setBackground(colTxtBackground); // Always white in priest if (iMyMode == Chicago.MODE_PRIEST) txtVersion.setForeground(Chicago.COL_WHITE); // FOREGROUNDS // RADIOS this.radDoes.setForeground(colRadForeground); this.radDoesNot.setForeground(colRadForeground); this.radModeMongo.setForeground(colRadForeground); this.radModePope.setForeground(colRadForeground); this.radModePriest.setForeground(colRadForeground); // INVENTORY LIST this.lstInventory.setForeground(colLstItemsForeground); // LABELS lblAtomType.setForeground(colLblForeground); lblClimaxScene.setForeground(colLblForeground); lblClock.setForeground(colLblForeground); lblContents.setForeground(colLblForeground); lblContext.setForeground(colLblForeground); lblUsages.setForeground(colLblForeground); lblCreateDate.setForeground(colLblForeground); lblFinishDate.setForeground(colLblForeground); lblItemType.setForeground(colLblForeground); // I'M DIFFERENT if (iMyMode != Chicago.MODE_PRIEST) { lblMaxVersion.setForeground(Chicago.COL_WHITE); lblMaxVersion.setEnabled(true); } else lblMaxVersion.setEnabled(false); lblRowCount.setForeground(colLblForeground); lblName.setForeground(colLblForeground); lblNotebook.setForeground(colLblForeground); lblRelevance.setForeground(colLblForeground); lblSize.setForeground(colLblForeground); lblTimesUsed.setForeground(colLblForeground); lblUpdateDate.setForeground(colLstItemsForeground); lblCorrespondences.setForeground(colLblForeground); // I'M DIFFERENT lblVersion.setForeground(colTxtVersionAll); lblzzzForWhatIDontFuckingKnow.setForeground(colLblForeground); lblzzzForWhatIDontFuckingKnow1.setForeground(colLblForeground); //lblzzzForWhatIDontFuckingKnow2.setForeground(colLblForeground); lblzzzNameWhyDaFukRThere2.setForeground(colLblForeground); // TEXT AREA txaContents.setForeground(colTxaForeground); // TEXT BOXES txtAppContext.setForeground(colTxtForeground); txtAtomType.setForeground(colTxtForeground); txtClimaxScene.setForeground(colTxtForeground); txtContext.setForeground(colTxtForeground); txtCorrespondences.setForeground(colTxtForeground); txtCreateDate.setForeground(colTxtForeground); txtFinishDate.setForeground(colTxtForeground); txtItemType.setForeground(colTxtForeground); txtName.setForeground(colTxtForeground); txtNotebook.setForeground(colTxtForeground); txtRelevance.setForeground(colTxtForeground); txtSearchContains.setForeground(colTxtForeground); txtSize.setForeground(colTxtForeground); txtTimesUsed.setForeground(colTxtForeground); txtUpdateDate.setForeground(colLstItemsForeground); txtUsages.setForeground(colTxtForeground); txtVersion.setForeground(colTxtVersionAll); if (iMyMode == Chicago.MODE_PRIEST) { lblMaxVersion.setEnabled(true); txtVersion.setForeground(Chicago.COL_WHITE); txtVersion.setEnabled(true); } if (iMyMode != Chicago.MODE_PRIEST) { lblMaxVersion.setEnabled(false); txtVersion.setForeground(Chicago.COL_GHOST); txtVersion.setEnabled(false); } // TEXT BOXES - DISABLED txtAtomType.setDisabledTextColor(colTxtForegroundDisabled); txtClimaxScene.setDisabledTextColor(colTxtForegroundDisabled); txtContext.setDisabledTextColor(colTxtForegroundDisabled); txtCorrespondences.setDisabledTextColor(colTxtForegroundDisabled); txtCreateDate.setDisabledTextColor(colTxtForegroundDisabled); txtFinishDate.setDisabledTextColor(colTxtForegroundDisabled); txtItemType.setDisabledTextColor(colTxtForegroundDisabled); txtName.setDisabledTextColor(colTxtForegroundDisabled); txtNotebook.setDisabledTextColor(colTxtForegroundDisabled); txtRelevance.setDisabledTextColor(colTxtForegroundDisabled); txtSearchContains.setDisabledTextColor(colTxtForegroundDisabled); txtSize.setDisabledTextColor(colTxtForegroundDisabled); txtTimesUsed.setDisabledTextColor(colTxtForegroundDisabled); txtUpdateDate.setDisabledTextColor(colTxtForegroundDisabled); txtUsages.setDisabledTextColor(colTxtForegroundDisabled); // I'M DIFFERENT: txtVersion.setDisabledTextColor(colTxtVersionAll); // BORDERS txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(colTxaBorder)); txtAppContext.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtCreateDate.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtName.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtSearchContains.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); txtUpdateDate.setBorder(javax.swing.BorderFactory.createLineBorder(colLstItemsBackground)); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); // I'M DIFFERENT txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); if (iMyMode == Chicago.MODE_PRIEST) txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); if (iMyMode != Chicago.MODE_PRIEST) txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); //////////////////////////////////////////////////////////////// ////////// POPE ///////// //////////////////////////////////////////////////////////////// if (iMyMode==Chicago.MODE_POPE || iMyMode==Chicago.MODE_MONGO) { lblContext.setForeground(Chicago.COL_GHOST); lblItemType.setForeground(Chicago.COL_GHOST); lblName.setForeground(Chicago.COL_GHOST); lblSize.setForeground(Chicago.COL_GHOST); lblCreateDate.setForeground(Chicago.COL_GHOST); lblVersion.setForeground(Chicago.COL_GHOST); txtVersion.setEnabled(false); lblMaxVersion.setEnabled(false); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtName.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCreateDate.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); } //////////////////////////////////////////////////////////////// ////////// GOD ///////// //////////////////////////////////////////////////////////////// if (iMyMode==Chicago.MODE_GOD) { this.utlDisableEditMode(); txtContext.setEnabled(true); lblMaxVersion.setEnabled(false); txtContext.setForeground(Chicago.COL_WHITE); txtContext.setBackground(Chicago.COL_BLACK); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); } } // That's the last time I'm doin' shit for errythang else if (iColumn == Chicago.cnAtomType) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnAtomType].equals(txtAtomType.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblAtomType.setForeground(Chicago.COL_GHOST); lblAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setForeground(Chicago.COL_GHOST); txtAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblAtomType.setForeground(Chicago.COL_WHITE); lblAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setForeground(Chicago.COL_WHITE); txtAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblAtomType.setForeground(Chicago.COL_GHOST); lblAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setForeground(Chicago.COL_GHOST); txtAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblAtomType.setForeground(Chicago.COL_CYAN); lblAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setForeground(Chicago.COL_CYAN); txtAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnClimaxScene) { // Update UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnClimaxScene].equals(txtClimaxScene.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblClimaxScene.setForeground(Chicago.COL_GHOST); lblClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setForeground(Chicago.COL_GHOST); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblClimaxScene.setForeground(Chicago.COL_WHITE); lblClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setForeground(Chicago.COL_WHITE); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblClimaxScene.setForeground(Chicago.COL_GHOST); lblClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setForeground(Chicago.COL_GHOST); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblClimaxScene.setForeground(Chicago.COL_CYAN); lblClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setForeground(Chicago.COL_CYAN); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnClock) { // Always disabled } else if (iColumn == Chicago.cnContents) { // Update UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnContents].equals(txaContents.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblContents.setForeground(Chicago.COL_GHOST); lblContents.setBackground(Chicago.COL_BLACK); txaContents.setForeground(Chicago.COL_GHOST); txaContents.setBackground(Chicago.COL_BLACK); txaContents.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblContents.setForeground(Chicago.COL_WHITE); lblContents.setBackground(Chicago.COL_BLACK); txaContents.setForeground(Chicago.COL_WHITE); txaContents.setBackground(Chicago.COL_BLACK); txaContents.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblContents.setForeground(Chicago.COL_GHOST); lblContents.setBackground(Chicago.COL_BLACK); txaContents.setForeground(Chicago.COL_GHOST); txaContents.setBackground(Chicago.COL_BLACK); txaContents.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblContents.setForeground(Chicago.COL_CYAN); lblContents.setBackground(Chicago.COL_BLACK); txaContents.setForeground(Chicago.COL_CYAN); txaContents.setBackground(Chicago.COL_BLACK); txaContents.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnContext) { // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblContext.setForeground(Chicago.COL_WHITE); lblContext.setBackground(Chicago.COL_BLACK); txtContext.setForeground(Chicago.COL_WHITE); txtContext.setBackground(Chicago.COL_BLACK); txtContext.setDisabledTextColor(Chicago.COL_GHOST); } else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblContext.setForeground(Chicago.COL_GHOST); lblContext.setBackground(Chicago.COL_BLACK); txtContext.setForeground(Chicago.COL_GHOST); txtContext.setBackground(Chicago.COL_BLACK); txtContext.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblContext.setForeground(Chicago.COL_CYAN); lblContext.setBackground(Chicago.COL_BLACK); txtContext.setForeground(Chicago.COL_CYAN); txtContext.setBackground(Chicago.COL_BLACK); txtContext.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnCorrespondences) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnCorrespondences].equals(txtCorrespondences.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblCorrespondences.setForeground(Chicago.COL_GHOST); lblCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setForeground(Chicago.COL_GHOST); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblCorrespondences.setForeground(Chicago.COL_WHITE); lblCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setForeground(Chicago.COL_WHITE); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblCorrespondences.setForeground(Chicago.COL_GHOST); lblCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setForeground(Chicago.COL_GHOST); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblCorrespondences.setForeground(Chicago.COL_CYAN); lblCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setForeground(Chicago.COL_CYAN); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnCreateDate) { // Update the Atom Type UI elements based on whether it differs from the object model //System.out.println("Checking CreateDate"); if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnCreateDate].equals(txtCreateDate.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblCreateDate.setForeground(Chicago.COL_GHOST); lblCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setForeground(Chicago.COL_GHOST); txtCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblCreateDate.setForeground(Chicago.COL_WHITE); lblCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setForeground(Chicago.COL_WHITE); txtCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setDisabledTextColor(Chicago.COL_GHOST); }} else { //System.out.println("CreateDate different"); if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblCreateDate.setForeground(Chicago.COL_GHOST); lblCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setForeground(Chicago.COL_GHOST); txtCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblCreateDate.setForeground(Chicago.COL_CYAN); lblCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setForeground(Chicago.COL_CYAN); txtCreateDate.setBackground(Chicago.COL_BLACK); txtCreateDate.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnDeleted) { // Update the Atom Type UI elements based on whether it differs from the object model //System.out.println("Checking Deleted"); String sDeleted = "0"; if (this.chkDeleted.isSelected()) sDeleted="1"; if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnDeleted].equals(sDeleted)) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { chkDeleted.setForeground(Chicago.COL_GHOST); chkDeleted.setBackground(Chicago.COL_BLACK); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { chkDeleted.setForeground(Chicago.COL_WHITE); chkDeleted.setBackground(Chicago.COL_BLACK); }} else { //System.out.println("Deleted different"); if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { chkDeleted.setForeground(Chicago.COL_WHITE); chkDeleted.setBackground(Chicago.COL_BLACK); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { chkDeleted.setForeground(Chicago.COL_CYAN); chkDeleted.setBackground(Chicago.COL_BLACK); }}} else if (iColumn == Chicago.cnFinishDate) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnFinishDate]==null) Chicago.sObjModel[iMyCurrentItem][Chicago.cnFinishDate]=""; if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnFinishDate].equals(txtFinishDate.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblFinishDate.setForeground(Chicago.COL_GHOST); lblFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setForeground(Chicago.COL_GHOST); txtFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblFinishDate.setForeground(Chicago.COL_WHITE); lblFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setForeground(Chicago.COL_WHITE); txtFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblFinishDate.setForeground(Chicago.COL_GHOST); lblFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setForeground(Chicago.COL_GHOST); txtFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblFinishDate.setForeground(Chicago.COL_CYAN); lblFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setForeground(Chicago.COL_CYAN); txtFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnItemType) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnItemType].equals(txtItemType.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblItemType.setForeground(Chicago.COL_GHOST); lblItemType.setBackground(Chicago.COL_BLACK); txtItemType.setForeground(Chicago.COL_GHOST); txtItemType.setBackground(Chicago.COL_BLACK); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblItemType.setForeground(Chicago.COL_WHITE); lblItemType.setBackground(Chicago.COL_BLACK); txtItemType.setForeground(Chicago.COL_WHITE); txtItemType.setBackground(Chicago.COL_BLACK); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblItemType.setForeground(Chicago.COL_GHOST); lblItemType.setBackground(Chicago.COL_BLACK); txtItemType.setForeground(Chicago.COL_GHOST); txtItemType.setBackground(Chicago.COL_BLACK); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblItemType.setForeground(Chicago.COL_CYAN); lblItemType.setBackground(Chicago.COL_BLACK); txtItemType.setForeground(Chicago.COL_CYAN); txtItemType.setBackground(Chicago.COL_BLACK); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnMaxVersion) { // No changes to version numbers } else if (iColumn == Chicago.cnName) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnName].equals(txtName.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblName.setForeground(Chicago.COL_GHOST); lblName.setBackground(Chicago.COL_BLACK); txtName.setForeground(Chicago.COL_GHOST); txtName.setBackground(Chicago.COL_BLACK); txtName.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblName.setForeground(Chicago.COL_WHITE); lblName.setBackground(Chicago.COL_BLACK); txtName.setForeground(Chicago.COL_WHITE); txtName.setBackground(Chicago.COL_BLACK); txtName.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblName.setForeground(Chicago.COL_GHOST); lblName.setBackground(Chicago.COL_BLACK); txtName.setForeground(Chicago.COL_GHOST); txtName.setBackground(Chicago.COL_BLACK); txtName.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblName.setForeground(Chicago.COL_CYAN); lblName.setBackground(Chicago.COL_BLACK); txtName.setForeground(Chicago.COL_CYAN); txtName.setBackground(Chicago.COL_BLACK); txtName.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnNotebook) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnNotebook].equals(txtNotebook.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblNotebook.setForeground(Chicago.COL_GHOST); lblNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setForeground(Chicago.COL_GHOST); txtNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblNotebook.setForeground(Chicago.COL_WHITE); lblNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setForeground(Chicago.COL_WHITE); txtNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblNotebook.setForeground(Chicago.COL_GHOST); lblNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setForeground(Chicago.COL_GHOST); txtNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblNotebook.setForeground(Chicago.COL_CYAN); lblNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setForeground(Chicago.COL_CYAN); txtNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnRelevance) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnRelevance].equals(txtRelevance.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblRelevance.setForeground(Chicago.COL_GHOST); lblRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setForeground(Chicago.COL_GHOST); txtRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblRelevance.setForeground(Chicago.COL_WHITE); lblRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setForeground(Chicago.COL_WHITE); txtRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblRelevance.setForeground(Chicago.COL_GHOST); lblRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setForeground(Chicago.COL_GHOST); txtRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblRelevance.setForeground(Chicago.COL_CYAN); lblRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setForeground(Chicago.COL_CYAN); txtRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnSize) { // Always disabled } else if (iColumn == Chicago.cnTimesUsed) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnTimesUsed].equals(txtTimesUsed.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblTimesUsed.setForeground(Chicago.COL_GHOST); lblTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setForeground(Chicago.COL_GHOST); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblTimesUsed.setForeground(Chicago.COL_WHITE); lblTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setForeground(Chicago.COL_WHITE); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblTimesUsed.setForeground(Chicago.COL_GHOST); lblTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setForeground(Chicago.COL_GHOST); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblTimesUsed.setForeground(Chicago.COL_CYAN); lblTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setForeground(Chicago.COL_CYAN); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnUpdateDate) { // Always disabled } else if (iColumn == Chicago.cnUsages) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnUsages].equals(txtUsages.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblUsages.setForeground(Chicago.COL_GHOST); lblUsages.setBackground(Chicago.COL_BLACK); txtUsages.setForeground(Chicago.COL_GHOST); txtUsages.setBackground(Chicago.COL_BLACK); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); } // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblUsages.setForeground(Chicago.COL_WHITE); lblUsages.setBackground(Chicago.COL_BLACK); txtUsages.setForeground(Chicago.COL_WHITE); txtUsages.setBackground(Chicago.COL_BLACK); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode == Chicago.MODE_PRIEST) { lblUsages.setForeground(Chicago.COL_GHOST); lblUsages.setBackground(Chicago.COL_BLACK); txtUsages.setForeground(Chicago.COL_GHOST); txtUsages.setBackground(Chicago.COL_BLACK); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); } // Set everything to stand out for this mode // THE BELOW MAY NEED TO BE REWRITTEN IF GOD MODE IS DIFF THAN POPE/SAINT if (Chicago.iMySkin == Chicago.SKIN_DARK && iMyMode != Chicago.MODE_PRIEST) { lblUsages.setForeground(Chicago.COL_CYAN); lblUsages.setBackground(Chicago.COL_BLACK); txtUsages.setForeground(Chicago.COL_CYAN); txtUsages.setBackground(Chicago.COL_BLACK); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnVersion) { // Always enabled } } ////////////////////////////////////////////////////////////////////////// // Utility: Clock: Change Int to String public static String utlConvertIntToClock(int clockSecs) { int hours = clockSecs / 3600 ; int minutes = ( clockSecs - ( hours * 3600) ) / 60 ; int seconds = clockSecs - ( hours * 3600) - ( minutes * 60 ) ; String s = hours + ":" + utlPadClock(minutes,2) + ":" + utlPadClock(seconds,2); return s; } public void utlDisableEditMode() { // Disable what is ineditable--note that this will be wierd if returning to none from p or g // Just note that unless you are in mode p or mode g none of the dirty bits are getting set txtName.setEnabled(false); txtName.setForeground(Chicago.COL_GHOST); txtName.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); chkDeleted.setEnabled(false); chkDeleted.setForeground(Chicago.COL_GHOST); txtContext.setEnabled(false); txtContext.setForeground(Chicago.COL_GHOST); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCreateDate.setEnabled(false); txtCreateDate.setForeground(Chicago.COL_GHOST); txtCreateDate.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUpdateDate.setEnabled(false); txtUpdateDate.setForeground(Chicago.COL_GHOST); txtUpdateDate.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtFinishDate.setEnabled(false); txtFinishDate.setForeground(Chicago.COL_GHOST); txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); // Setting version to false since it shouldn't be used at some times txtVersion.setEnabled(false); txtVersion.setForeground(Chicago.COL_GHOST); txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); if (iMyCurrentItem == -1 || iMyMode != Chicago.MODE_PRIEST) lblMaxVersion.setEnabled(false); else lblMaxVersion.setEnabled(true); lblMaxVersion.setForeground(Chicago.COL_GHOST); if (iMyMode != Chicago.MODE_PRIEST) lblMaxVersion.setEnabled(false); txtItemType.setEnabled(false); txtItemType.setForeground(Chicago.COL_GHOST); txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtAtomType.setEnabled(false); txtAtomType.setForeground(Chicago.COL_GHOST); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtRelevance.setEnabled(false); txtRelevance.setForeground(Chicago.COL_GHOST); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtTimesUsed.setEnabled(false); txtTimesUsed.setForeground(Chicago.COL_GHOST); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClimaxScene.setEnabled(false); txtClimaxScene.setForeground(Chicago.COL_GHOST); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCorrespondences.setEnabled(false); txtCorrespondences.setForeground(Chicago.COL_GHOST); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUsages.setEnabled(false); txtUsages.setForeground(Chicago.COL_GHOST); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSize.setEnabled(false); txtSize.setForeground(Chicago.COL_GHOST); txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txaContents.setEnabled(false); txaContents.setForeground(Chicago.COL_GHOST); txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); this.btnCancel.setEnabled(false); this.btnCommit.setEnabled(false); if (iMyCurrentItem == -1) lblMaxVersion.setEnabled(false); } public void utlEnableHighModes() { utlDisableEditMode(); if (iMyMode == Chicago.MODE_POPE) { // allow these fields to be edited chkDeleted.setEnabled(true); chkDeleted.setForeground(Chicago.COL_WHITE); txaContents.setEnabled(true); txaContents.setForeground(Chicago.COL_WHITE); txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtAtomType.setEnabled(true); txtAtomType.setForeground(Chicago.COL_WHITE); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtClimaxScene.setEnabled(true); txtClimaxScene.setForeground(Chicago.COL_WHITE); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtCorrespondences.setEnabled(true); txtCorrespondences.setForeground(Chicago.COL_WHITE); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtFinishDate.setEnabled(true); txtFinishDate.setForeground(Chicago.COL_WHITE); txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtNotebook.setEnabled(true); txtNotebook.setForeground(Chicago.COL_WHITE); txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtRelevance.setEnabled(true); txtRelevance.setForeground(Chicago.COL_WHITE); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtTimesUsed.setEnabled(true); txtTimesUsed.setForeground(Chicago.COL_WHITE); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtUsages.setEnabled(true); txtUsages.setForeground(Chicago.COL_WHITE); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } if (iMyMode == Chicago.MODE_MONGO) { // allow these fields to be edited chkDeleted.setEnabled(true); txtAtomType.setEnabled(true); txtAtomType.setForeground(Chicago.COL_WHITE); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtClimaxScene.setEnabled(true); txtClimaxScene.setForeground(Chicago.COL_WHITE); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtCorrespondences.setEnabled(true); txtCorrespondences.setForeground(Chicago.COL_WHITE); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtFinishDate.setEnabled(true); txtFinishDate.setForeground(Chicago.COL_WHITE); txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtNotebook.setEnabled(true); txtNotebook.setForeground(Chicago.COL_WHITE); txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtRelevance.setEnabled(true); txtRelevance.setForeground(Chicago.COL_WHITE); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtTimesUsed.setEnabled(true); txtTimesUsed.setForeground(Chicago.COL_WHITE); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtUsages.setEnabled(true); txtUsages.setForeground(Chicago.COL_WHITE); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } // The whole point of god mode is to change the context of all items in the context of the original context // to the new context. This is real fucking simple in database land and a pain in the ass in java. // // .|. // if (iMyMode == Chicago.MODE_GOD) { txtContext.setEnabled(true); txtContext.setForeground(Chicago.COL_WHITE); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); btnCommit.setEnabled(true); btnCancel.setEnabled(true); } // The whole point of Matt mode is to: // 1. Save the database to databasename + YYYYMMDDHHMMSS + .db // 2. Delete all minor versions from the database for the context on the screen at the // time of entering Matt mode // 3. Set version and max version to "1" for all items with the context set at the // time of entering the screen // 4. Oh, yeah. Ask me what the name of the new context should be and I'll reset it // // .|. // if (iMyMode == Chicago.MODE_MATT) { // MATT MODE MAKES GOD MODE LOOK LIKE BATSHIT IN A SNOW STORM // Don't worry about the fucking screen anymore, we're // going to pop open a modal window and get confirmation // to save and prune the database. Maybe I should compact it // after the deletes. btnCommit.setEnabled(true); btnCancel.setEnabled(true); } } public boolean utlScreenDiffersFromObjModel() { if (this.iMyCurrentItem==-1) return false; try{ if (Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnName].equals(txtName.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnContext].equals(txtContext.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnCreateDate].equals(txtCreateDate.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnFinishDate].equals(txtFinishDate.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnUpdateDate].equals(txtUpdateDate.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnItemType].equals(txtItemType.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnAtomType].equals(txtAtomType.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnRelevance].equals(txtRelevance.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnTimesUsed].equals(txtTimesUsed.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnClimaxScene].equals(txtClimaxScene.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnCorrespondences].equals(txtCorrespondences.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnUsages].equals(txtUsages.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnNotebook].equals(txtNotebook.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnContents].equals(txaContents.getText())) return false; String sDeleted = Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnDeleted]; int iDeleted = Integer.parseInt(sDeleted); if (chkDeleted.isSelected() && iDeleted==1) return false; else return true; } catch (Exception e) { return true; } } // Utility: Clock: Pad integers as neccessary public static String utlPadClock(int value, int padLength) { return String.format("%0" + padLength + "d", value); } ////////////////////////////////////////////////////////////////////////// // I'M REALLY FUCKING IMPORTANT // I PERFORM THE FILTERING FOR THE ITEMS LIST AND THEN // I DO THE SIMPLE SHIT LIKE REDRAWING. SO MAYBE NAME // ME A LITTLER BETTER. UNTIL THEN, HERE'S A BUNCH // OF FUCKING COMMENTS public void utlRedrawItemsList() { // First loop through the object model making sure the check boxes // have their affect on what items make it through this first 'filter' // Next, let's let the 'contains/does not contain' do its work // Thus, we'll remove any items that don't iMatch this 2nd 'filter' // That's it. ArrayList sInventoryArrayList = new ArrayList<>(); int iRelevance =0; String sContext; String sDeleted; String sDelimeterLeft; String sDelimeterRight; String sFinishDate = " "; String sItemType; String sListStringRowWithRelevanceCompliment; String sName; String sRelevance; String sVersion; String sVersionMax; lstInventory.removeAll(); ////////////////////////////////////////////////////////////////////// /////////////////////////////// Step 1 /////////////////////////////// ////////////////////////////////////////////////////////////////////// int totRows = Chicago.iRowCount; for ( int iCount = 1; iCount <= totRows; iCount++ ) { sDelimeterLeft = " "; sDelimeterRight = " "; ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Home Screen Specific ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// sVersion = Chicago.sObjModel[iCount][Chicago.cnVersion]; sVersionMax = Chicago.sObjModel[iCount][Chicago.cnMaxVersion]; if (sVersion.equals(sVersionMax)) { ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // end Home Screen Specific ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // WE'RE ADDING THIS ROW TO THE INVENTORY LIST sName = Chicago.sObjModel[iCount][Chicago.cnName]; sContext = Chicago.sObjModel[iCount][Chicago.cnContext]; sItemType = Chicago.sObjModel[iCount][Chicago.cnItemType]; sRelevance = Chicago.sObjModel[iCount][Chicago.cnRelevance]; sVersion = Chicago.sObjModel[iCount][Chicago.cnVersion]; sVersionMax = Chicago.sObjModel[iCount][Chicago.cnMaxVersion]; sDeleted = Chicago.sObjModel[iCount][Chicago.cnDeleted]; // PARSE OUT AND SORT sFinishDate = ""; try { if (Chicago.sObjModel[iCount][Chicago.cnFinishDate].equals("")) { sFinishDate = "ZZZZZZZZ"; } // If the field has an integer in it, get it, otherwise set FinishDate to "ZZZZZZZZ" // If the field has 8 integers in it, then the date is an absolute date" // If Integer.parseInt() returns a value < 20230101, then assume // it's an OFFSET from today. // // In the case of an offset of -365 (~1 year AGO), the parseInt would work fine // and yield a number >= -9999999 and <= 9999999 // Which would get sorted earlier than 8 digit dates // // If parseInt comes back with an 8 digit number greater than 20230101, assume absolute date // If parseInt throws an exception, set date to "ZZZZZZZZ" // // .|. // // Author here. The fucking dates being converted to integers is fine as // long as they are not used for comparison to an offset. If they are going // to be used to say "between 7 days ago and 2 days from now", (notice // where I place the comma relative to the quote--it's the correct way, so // don't you dare right "sic") then we have to take the 8 digits and // use a date formatter to convert it to YYYYMMDD before doing the // arithetic. This is because in the integer world August 1, 2023 equals // 20230801 and July 31, 2023 equals 20230731 and 20230731 + 1 does not equal // 20230801. // // .|. // //////////////////////////////////////////////////////////////////////////// if (!(sFinishDate.equals("ZZZZZZZZ"))) { String sSomeFuckingNumber = ""; try { sSomeFuckingNumber = Chicago.sObjModel[iCount][Chicago.cnFinishDate] .substring(0, 8).trim(); } catch (Exception e) { // If the above line threw and exception // and because we know that the value of finish date // is NOT "", then what's in finish date is either // "45" or " 45". What we want to do is to sort // it as " 45" so that it sorts in front of any // absolute dates like "20230715" (with the same priority ;-) ). sSomeFuckingNumber = Chicago.sObjModel[iCount][Chicago.cnFinishDate].trim(); } int iSomeFuckingNumber = Integer.parseInt(sSomeFuckingNumber); if (iSomeFuckingNumber < 19690929) { sFinishDate = String.valueOf(iSomeFuckingNumber); } // Else, it must have an 8 digit absolute day in the first 8 characters of the field // ...I do not care in the least what the okConfirmMatt is in columns 9+ of any date field else { sFinishDate = Chicago.sObjModel[iCount][Chicago.cnFinishDate] .substring(0,8); }}} catch (Exception e) { //System.out.println("If you could fix this FinishDate exception, it would be great."); sFinishDate = "ZZZZZZZZ"; } while (sFinishDate.length() < 8) sFinishDate = " " + sFinishDate; /////// END OF FINISH DATE while (sContext.length() < Chicago.CONTEXT_MAX_LEN) sContext = sContext + " "; if (sContext.length() > Chicago.CONTEXT_MAX_LEN) sContext = sContext.substring(0,Chicago.CONTEXT_MAX_LEN); while (sName.length() < Chicago.NAME_MAX_LEN) sName = sName + " "; if (sName.length() > Chicago.NAME_MAX_LEN) sName = sName.substring(0,Chicago.NAME_MAX_LEN); int iVersion = Integer.parseInt(sVersion); if (iVersion < 0) iVersion = 0; if (iVersion > 100) iVersion = 100; sVersion = String.valueOf(iVersion); int iThree = 3; while (sVersion.length() < iThree) sVersion = " " + sVersion; iRelevance = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnRelevance].trim()); if (iRelevance < 0) iRelevance = 0; if (iRelevance > 100) iRelevance = 100; sRelevance = String.valueOf(iRelevance); while (sRelevance.length() < iThree) sRelevance = " " + sRelevance; /************************** INJECT ********************************** * To change the sorting mechanisms do some klugey shit, indeed... * 1. Make Relevance show as the compliment of Relevance (Relevance = abs(Relevance-100)) * 2. Make Item Type sort correctly b > p > e > s > a > x ****************************************************************************/ int iRelevanceCompliment = Math.abs(100-iRelevance); String sRelevanceCompliment = String.valueOf(iRelevanceCompliment); while (sRelevanceCompliment.length() < iThree) sRelevanceCompliment = " " + sRelevanceCompliment; sRelevance = sRelevanceCompliment; if (sItemType.equals("b")) sItemType = "0"; if (sItemType.equals("p")) sItemType = "1"; if (sItemType.equals("e")) sItemType = "2"; if (sItemType.equals("s")) sItemType = "3"; if (sItemType.equals("a")) sItemType = "4"; if (sItemType.equals("x")) sItemType = "5"; sListStringRowWithRelevanceCompliment = sContext + " > " + sItemType + " # " + sRelevanceCompliment + " &" + sDelimeterLeft + sFinishDate + sDelimeterRight + ": " + sName + " @ " + sVersion; ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // Home Screen Specific ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// if (chkIsBook .isSelected() && sItemType.equals("0" )) sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); if ( chkIsPart .isSelected() && sItemType.equals("1" )) sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); if ( chkIsEpisode.isSelected() && sItemType.equals("2" )) sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); if ( chkIsSection.isSelected() && sItemType.equals("3" )) sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); if ( chkIsAtom .isSelected() && sItemType.equals("4" )) sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); if ( chkIsOther .isSelected() && sItemType.equals("5" )) sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); // Remove deleted items if IsDeleted is not set if (!chkIsDeleted.isSelected() && sDeleted .equals("1" )) sInventoryArrayList.remove(sListStringRowWithRelevanceCompliment); }} //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// // txtContains is now worked into the search //////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////// if (!txtSearchContains.getText().equals("")) { //System.out.println("OK, you cheeky bastard, I'm going to search..."); for (int iCounter = 0; iCounter < sInventoryArrayList.size(); iCounter++ ) { String search = txtSearchContains.getText(); boolean does = radDoes.isSelected(); // TODO: 20230810: THE ARRAY LIST IS IN AN INJECTED STATE SO THE METHOD CALLED DOESN'T DECODE PROPERLY int itemNo = Chicago.utlDecodeListStringToIndex(sInventoryArrayList.get(iCounter)); if (itemNo > -1) { // ATOM TYPE if (does) { //System.out.println("Goddammit, I'm in Atom Type and does Chicago.sObjModel[itemNo][Chicago.cnAtomType] (***" + Chicago.sObjModel[itemNo][Chicago.cnAtomType] + "*** contain: " + search); if (!Chicago.sObjModel[itemNo][Chicago.cnAtomType].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; }} // 20230810: had to remove the break because it only operated on one // object in the object model--I thought it would just break // out of the if statement. else { if ( Chicago.sObjModel[itemNo][Chicago.cnAtomType].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; }} /* 20230810: ISOLATING THIS CODE BECAUSE I WANT TO COMMANDEER THE SEARCH STRING FOR ATOM USE ONLY TO FIND THE FUCKING DIFF ATOM TYPES // CLIMAX SCENE if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnClimaxScene].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnClimaxScene].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnContents].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnContents].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnCorrespondences].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnCorrespondences].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnFinishDate].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnFinishDate].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnNotebook].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnNotebook].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnTimesUsed].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnTimesUsed].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } if (does) if (!Chicago.sObjModel[itemNo][Chicago.cnUsages].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } else if ( Chicago.sObjModel[itemNo][Chicago.cnUsages].contains(search)) { sInventoryArrayList.remove(iCounter); iCounter--; break; } */ } else { System.out.println("i=-1: sInventoryArrayList.get(iCounter):" + sInventoryArrayList.get(iCounter)); } }} // If txtAppContext has a value (at least 2 characters), // then let's filter out anything without that context if ( txtAppContext.getText().length() > 1) for (int i = sInventoryArrayList.size()-1; i >= 0; i-- ) { if (!sInventoryArrayList.get(i).contains(txtAppContext.getText())) sInventoryArrayList.remove(i); } // END THIS CODE IS SPECIFIC TO THE SEARCH SCREEN //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// ////////////// SORT ////////////// ////////////////////////////////////////////////////////////////// Collections.sort(sInventoryArrayList); // We sorted the above with Relevance's compliment. Now reverse the "injection" for (int iCount=0; iCount < sInventoryArrayList.size(); iCount++) { String sTempListItem = sInventoryArrayList.get(iCount); String sTempContext = sTempListItem.substring(0, Chicago.CONTEXT_MAX_LEN); String sTempItemType = sTempListItem.substring(Chicago.CONTEXT_MAX_LEN + 3,Chicago.CONTEXT_MAX_LEN + 4); String sRelevanceCompliment = sTempListItem .substring(Chicago.RELEVANCE_POSIT,Chicago.RELEVANCE_POSIT + 3).trim(); try { iRelevance = 100 - Integer.parseInt(sRelevanceCompliment); } catch (Exception e) { System.out.println("Relevance is fucked up, setting to 0..."); iRelevance = 0; } String sTempRelevance = String.valueOf(iRelevance); while (sTempRelevance.length() < 3) sTempRelevance = " " + sTempRelevance; String sTempFinishDate = sTempListItem .substring(Chicago.FINISH_DATE_POS, Chicago.FINISH_DATE_POS+8); if (sTempFinishDate.equals("ZZZZZZZZ")) sTempFinishDate = " "; int iFinishDate; try { iFinishDate = Integer.parseInt(sTempFinishDate); } catch (Exception e) { iFinishDate = 0; } // Get the time now and establish the date of the year then do some simple math sDelimeterLeft = " "; sDelimeterRight = " "; LocalDate ldtToday = LocalDate.now(); if (iFinishDate > 0) { int iFinishDateYear = Integer.parseInt(sTempFinishDate.substring(0,4)); int iFinishDateMonth = Integer.parseInt(sTempFinishDate.substring(4,6)); int iFinishDateDay = Integer.parseInt(sTempFinishDate.substring(6,8)); LocalDate ldtFinishDate = LocalDate.of(iFinishDateYear, iFinishDateMonth, iFinishDateDay); long daysBetween = ChronoUnit.DAYS.between(ldtToday, ldtFinishDate); if (daysBetween < 14) { sDelimeterLeft = "+"; sDelimeterRight = "+"; } if (daysBetween < 4) { sDelimeterLeft = "*"; sDelimeterRight = "*"; } if (daysBetween == 0) { sDelimeterLeft = "="; sDelimeterRight = "="; } if (daysBetween < 0) { sDelimeterLeft = "<"; sDelimeterRight = ">"; }} String sTempName = sTempListItem .substring(Chicago.NAME_POSITION, Chicago.NAME_POSITION + Chicago.NAME_MAX_LEN); String sTempVersion = sTempListItem .substring(Chicago.VERSION_POSITION, Chicago.VERSION_POSITION + 3); if (sTempItemType.equals("0")) sTempItemType = "b"; if (sTempItemType.equals("1")) sTempItemType = "p"; if (sTempItemType.equals("2")) sTempItemType = "e"; if (sTempItemType.equals("3")) sTempItemType = "s"; if (sTempItemType.equals("4")) sTempItemType = "a"; if (sTempItemType.equals("5")) sTempItemType = "x"; String sNewListString = sTempContext + " > " + sTempItemType + " # " + sTempRelevance + " &" + sDelimeterLeft + sTempFinishDate + sDelimeterRight + ": " + sTempName + " @ " + sTempVersion; sInventoryArrayList.set(iCount, sNewListString); } String[] listData = sInventoryArrayList.toArray(new String[0]); lstInventory.removeAll(); lstInventory.setListData(listData); } ///////////////////////////////////////////////////////////////////////// /////// SCHEDULE THE CLOCk UPDATE TASK ////// public void utlRunTask() { TimerTask updateClock = new TimerTask() { public void run() { try { if (iMyCurrentItem < 0) return; int iSeconds = Integer.parseInt(Chicago.sObjModel[iMyCurrentItem][Chicago.cnClock ]) + (int)(aStopwatch.elapsedMillis()/1000); String s = utlConvertIntToClock (iSeconds); txtClock.setText(s); } catch (Exception e) { e.printStackTrace(); }}}; myScheduler.scheduleAtFixedRate(updateClock, 0, 1000); } // Start Stopwatch public void utlStartAStopwatch(boolean bReset) { if ( aStopwatch.isRunning() ) return; txtClock.setBackground(Chicago.COL_BLACK); txtClock.setDisabledTextColor(Chicago.COL_GHOST); if (bReset) aStopwatch.reset(); aStopwatch.start(); } // Stop Stopwatch public void utlStopAStopwatch() { if (aStopwatch.isRunning()) { aStopwatch.stop(); txtClock.setBackground(Chicago.COL_GHOST); txtClock.setDisabledTextColor(Chicago.COL_BLACK); } else return; } public void btnCreateMouseClicked(java.awt.event.MouseEvent evt){ this.prfCreate2ItemScn(); } public void btnCreateActionPerformed(java.awt.event.ActionEvent evt){ // Not used. MouseClicked does what needs to be done } ///////////////////////////////////////////////////////////////////////// /////// NOW FOR THE REASON WHY YOU ARE HERE, MY MAIN MAN ... ////// ///////////////////////////////////////////////////////////////////////// /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(HomeScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // // // // /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { //Connect to the database and load in the data // 230616: Actually, I don't need a new database connection. I should be passed // one that already exists. Also, I should not need to read the database // at this point. I should just have the retrieval of information // in the Chicago.class be put into my variables instead of // variables in the Chicago.class. (done) // Thus, when you get to this point of the code, all the data should // already been in my member variables. I just need the database // connection to update the database later, if needed. HomeScreen chs = new HomeScreen(); chs.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { // 20230616: I might want to do some custom code here. See Design Notebook for ldtToday chs.dispose(); } }); chs.setVisible(true); // Don't I need to set the values of the UI? // no, becuase Chicago is going to do it for me... } }); } } /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JDialog.java to edit this template */ package com.mattmclaurine.chicago; import com.google.common.base.Stopwatch; import java.awt.Color; import javax.swing.Timer; import java.awt.event.ActionListener; import java.awt.event.ActionEvent; import java.lang.StringBuffer; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.util.HashSet; import java.util.Set; import java.util.TimerTask; import static com.mattmclaurine.chicago.HomeScreen.utlConvertIntToClock; import java.awt.Desktop; import java.io.File; import javax.swing.SwingUtilities; import java.util.regex.Pattern; import java.util.regex.Matcher; ////////////////////////////////////////////////////////////////////////////// /////////////////////// WELCOME TO THE ITEM SCREEN /////////////////////// ////////////////////////////////////////////////////////////////////////////// /** * * @author lance */ public class ItemScreen extends javax.swing.JDialog { private static final java.util.Timer myScheduler = new java.util.Timer(); private Stopwatch aStopwatch = new Stopwatch(); public int iMyCurrentItem = -1; private int iMyOldX = -1; private int iMyFunction = -1; private int UNCHANGED = 0; private int CHANGED = 1; private int ALL_COLUMNS = 0; private static final boolean blnPrintTitles = false; ItemScreen() { throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody } /** * Creates new form jdialogVersionCompareTool */ public ItemScreen(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN-BEGIN:initComponents private void initComponents() { chkDeleted = new javax.swing.JCheckBox(); panHomeScreen = new javax.swing.JPanel(); lblName = new javax.swing.JLabel(); txtName = new javax.swing.JTextField(); lblItemType = new javax.swing.JLabel(); txtItemType = new javax.swing.JTextField(); lblAtomType = new javax.swing.JLabel(); txtAtomType = new javax.swing.JTextField(); scrPane2 = new javax.swing.JScrollPane(); txaContents = new javax.swing.JTextArea(); lblRelevance = new javax.swing.JLabel(); txtRelevance = new javax.swing.JTextField(); lblTimesUsed = new javax.swing.JLabel(); txtTimesUsed = new javax.swing.JTextField(); lblClimaxScene = new javax.swing.JLabel(); txtClimaxScene = new javax.swing.JTextField(); lblNotebook = new javax.swing.JLabel(); txtNotebook = new javax.swing.JTextField(); lblCorrespondences = new javax.swing.JLabel(); txtCorrespondences = new javax.swing.JTextField(); lblUsages = new javax.swing.JLabel(); txtUsages = new javax.swing.JTextField(); lblClock = new javax.swing.JLabel(); txtClock = new javax.swing.JTextField(); lblSize = new javax.swing.JLabel(); txtSize = new javax.swing.JTextField(); btnCancel = new javax.swing.JButton(); btnCommit = new javax.swing.JButton(); txtVersion = new javax.swing.JTextField(); lblContext = new javax.swing.JLabel(); txtContext = new javax.swing.JTextField(); lblContents = new javax.swing.JLabel(); lblCreateDate = new javax.swing.JLabel(); txtCreateDate = new javax.swing.JTextField(); lblUpdateDate = new javax.swing.JLabel(); txtUpdateDate = new javax.swing.JTextField(); txtFinishDate = new javax.swing.JTextField(); lblFinishDate = new javax.swing.JLabel(); chkDeletedTheRightOne = new javax.swing.JCheckBox(); lblStatus = new javax.swing.JLabel(); cboStatus = new javax.swing.JComboBox<>(); chkDeleted.setBackground(new java.awt.Color(0, 0, 0)); chkDeleted.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N chkDeleted.setForeground(new java.awt.Color(204, 204, 255)); chkDeleted.setSelected(true); chkDeleted.setText("Deleted"); chkDeleted.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); chkDeleted.setEnabled(false); chkDeleted.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); chkDeleted.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chkDeletedItemStateChanged(evt); } }); chkDeleted.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkDeletedMouseClicked(evt); } }); chkDeleted.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkDeletedActionPerformed(evt); } }); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setBackground(new java.awt.Color(0, 0, 0)); setForeground(new java.awt.Color(0, 0, 0)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosed(java.awt.event.WindowEvent evt) { formWindowClosed(evt); } }); panHomeScreen.setBackground(new java.awt.Color(0, 0, 0)); panHomeScreen.setForeground(new java.awt.Color(255, 255, 255)); panHomeScreen.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { panHomeScreenFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { panHomeScreenFocusLost(evt); } }); lblName.setBackground(new java.awt.Color(0, 0, 0)); lblName.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblName.setForeground(new java.awt.Color(204, 204, 255)); lblName.setText("Item Name:"); lblName.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtName.setBackground(new java.awt.Color(0, 0, 0)); txtName.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtName.setForeground(new java.awt.Color(204, 204, 255)); txtName.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtName.setCaretColor(new java.awt.Color(153, 153, 255)); txtName.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtName.setSelectionColor(new java.awt.Color(255, 255, 0)); txtName.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtNameMouseClicked(evt); } }); txtName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtNameActionPerformed(evt); } }); txtName.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtNameKeyTyped(evt); } }); lblItemType.setBackground(new java.awt.Color(0, 0, 0)); lblItemType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblItemType.setForeground(new java.awt.Color(204, 204, 255)); lblItemType.setText("Type:"); lblItemType.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtItemType.setBackground(new java.awt.Color(0, 0, 0)); txtItemType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtItemType.setForeground(new java.awt.Color(204, 204, 255)); txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtItemType.setCaretColor(new java.awt.Color(153, 153, 255)); txtItemType.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtItemType.setSelectionColor(new java.awt.Color(255, 255, 0)); txtItemType.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtItemTypeActionPerformed(evt); } }); txtItemType.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtItemTypeKeyTyped(evt); } }); lblAtomType.setBackground(new java.awt.Color(0, 0, 0)); lblAtomType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblAtomType.setForeground(new java.awt.Color(204, 204, 255)); lblAtomType.setText("Atom Type:"); lblAtomType.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtAtomType.setBackground(new java.awt.Color(0, 0, 0)); txtAtomType.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtAtomType.setForeground(new java.awt.Color(204, 204, 255)); txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtAtomType.setCaretColor(new java.awt.Color(153, 153, 255)); txtAtomType.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); txtAtomType.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtAtomType.setSelectionColor(new java.awt.Color(255, 255, 0)); txtAtomType.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtAtomTypeActionPerformed(evt); } }); txtAtomType.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtAtomTypeKeyTyped(evt); } }); txaContents.setBackground(new java.awt.Color(0, 0, 0)); txaContents.setColumns(20); txaContents.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txaContents.setForeground(new java.awt.Color(204, 204, 255)); txaContents.setLineWrap(true); txaContents.setRows(5); txaContents.setWrapStyleWord(true); txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txaContents.setCaretColor(new java.awt.Color(255, 0, 51)); txaContents.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); txaContents.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txaContents.setSelectionColor(new java.awt.Color(255, 255, 0)); txaContents.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txaContentsMouseClicked(evt); } }); txaContents.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txaContentsKeyTyped(evt); } }); scrPane2.setViewportView(txaContents); lblRelevance.setBackground(new java.awt.Color(0, 0, 0)); lblRelevance.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblRelevance.setForeground(new java.awt.Color(204, 204, 255)); lblRelevance.setText("Relevance:"); lblRelevance.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtRelevance.setBackground(new java.awt.Color(0, 0, 0)); txtRelevance.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtRelevance.setForeground(new java.awt.Color(204, 204, 255)); txtRelevance.setHorizontalAlignment(javax.swing.JTextField.RIGHT); txtRelevance.setText("0"); txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtRelevance.setCaretColor(new java.awt.Color(153, 153, 255)); txtRelevance.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtRelevance.setSelectionColor(new java.awt.Color(255, 255, 0)); txtRelevance.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtRelevanceActionPerformed(evt); } }); txtRelevance.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtRelevanceKeyTyped(evt); } }); lblTimesUsed.setBackground(new java.awt.Color(0, 0, 0)); lblTimesUsed.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblTimesUsed.setForeground(new java.awt.Color(204, 204, 255)); lblTimesUsed.setText("Times Used:"); lblTimesUsed.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtTimesUsed.setBackground(new java.awt.Color(0, 0, 0)); txtTimesUsed.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtTimesUsed.setForeground(new java.awt.Color(204, 204, 255)); txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtTimesUsed.setCaretColor(new java.awt.Color(153, 153, 255)); txtTimesUsed.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtTimesUsed.setSelectionColor(new java.awt.Color(255, 255, 0)); txtTimesUsed.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtTimesUsedActionPerformed(evt); } }); txtTimesUsed.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtTimesUsedKeyTyped(evt); } }); lblClimaxScene.setBackground(new java.awt.Color(0, 0, 0)); lblClimaxScene.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblClimaxScene.setForeground(new java.awt.Color(204, 204, 255)); lblClimaxScene.setText("Climax Scene:"); lblClimaxScene.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtClimaxScene.setBackground(new java.awt.Color(0, 0, 0)); txtClimaxScene.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtClimaxScene.setForeground(new java.awt.Color(204, 204, 255)); txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtClimaxScene.setCaretColor(new java.awt.Color(153, 153, 255)); txtClimaxScene.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtClimaxScene.setSelectionColor(new java.awt.Color(255, 255, 0)); txtClimaxScene.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtClimaxSceneActionPerformed(evt); } }); txtClimaxScene.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtClimaxSceneKeyTyped(evt); } }); lblNotebook.setBackground(new java.awt.Color(0, 0, 0)); lblNotebook.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblNotebook.setForeground(new java.awt.Color(204, 204, 255)); lblNotebook.setText("Notebook:"); lblNotebook.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtNotebook.setBackground(new java.awt.Color(0, 0, 0)); txtNotebook.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtNotebook.setForeground(new java.awt.Color(204, 204, 255)); txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtNotebook.setCaretColor(new java.awt.Color(153, 153, 255)); txtNotebook.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtNotebook.setSelectionColor(new java.awt.Color(255, 255, 0)); txtNotebook.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtNotebookActionPerformed(evt); } }); txtNotebook.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtNotebookKeyTyped(evt); } }); lblCorrespondences.setBackground(new java.awt.Color(0, 0, 0)); lblCorrespondences.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblCorrespondences.setForeground(new java.awt.Color(204, 204, 255)); lblCorrespondences.setText("Correspondences:"); lblCorrespondences.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtCorrespondences.setBackground(new java.awt.Color(0, 0, 0)); txtCorrespondences.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtCorrespondences.setForeground(new java.awt.Color(204, 204, 255)); txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtCorrespondences.setCaretColor(new java.awt.Color(153, 153, 255)); txtCorrespondences.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtCorrespondences.setSelectionColor(new java.awt.Color(255, 255, 0)); txtCorrespondences.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCorrespondencesActionPerformed(evt); } }); txtCorrespondences.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCorrespondencesKeyTyped(evt); } }); lblUsages.setBackground(new java.awt.Color(0, 0, 0)); lblUsages.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblUsages.setForeground(new java.awt.Color(204, 204, 255)); lblUsages.setText("Usages:"); lblUsages.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtUsages.setBackground(new java.awt.Color(0, 0, 0)); txtUsages.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtUsages.setForeground(new java.awt.Color(204, 204, 255)); txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtUsages.setCaretColor(new java.awt.Color(153, 153, 255)); txtUsages.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtUsages.setSelectionColor(new java.awt.Color(255, 255, 0)); txtUsages.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtUsagesActionPerformed(evt); } }); txtUsages.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUsagesKeyTyped(evt); } }); lblClock.setBackground(new java.awt.Color(0, 0, 0)); lblClock.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblClock.setForeground(new java.awt.Color(204, 204, 255)); lblClock.setText("Clock Time:"); lblClock.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtClock.setBackground(new java.awt.Color(0, 0, 0)); txtClock.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtClock.setForeground(new java.awt.Color(204, 204, 255)); txtClock.setHorizontalAlignment(javax.swing.JTextField.RIGHT); txtClock.setText("0"); txtClock.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtClock.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txtClockMouseClicked(evt); } }); txtClock.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtClockActionPerformed(evt); } }); lblSize.setBackground(new java.awt.Color(0, 0, 0)); lblSize.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblSize.setForeground(new java.awt.Color(204, 204, 255)); lblSize.setText("Size:"); lblSize.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtSize.setBackground(new java.awt.Color(0, 0, 0)); txtSize.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtSize.setForeground(new java.awt.Color(204, 204, 255)); txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtSize.setCaretColor(new java.awt.Color(153, 153, 255)); txtSize.setEnabled(false); txtSize.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtSize.setSelectionColor(new java.awt.Color(255, 255, 0)); txtSize.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtSizeActionPerformed(evt); } }); btnCancel.setBackground(new java.awt.Color(102, 102, 102)); btnCancel.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N btnCancel.setForeground(new java.awt.Color(255, 255, 255)); btnCancel.setText(" Cancel "); btnCancel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); btnCommit.setBackground(new java.awt.Color(102, 102, 102)); btnCommit.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N btnCommit.setForeground(new java.awt.Color(255, 255, 255)); btnCommit.setText(" Commit "); btnCommit.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); btnCommit.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btnCommitMouseClicked(evt); } }); txtVersion.setBackground(new java.awt.Color(0, 0, 0)); txtVersion.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtVersion.setForeground(new java.awt.Color(204, 204, 255)); txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtVersion.setCaretColor(new java.awt.Color(153, 153, 255)); txtVersion.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtVersion.setSelectionColor(new java.awt.Color(255, 255, 0)); txtVersion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtVersionActionPerformed(evt); } }); lblContext.setBackground(new java.awt.Color(0, 0, 0)); lblContext.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblContext.setForeground(new java.awt.Color(204, 204, 255)); lblContext.setText("Context:"); lblContext.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtContext.setBackground(new java.awt.Color(0, 0, 0)); txtContext.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtContext.setForeground(new java.awt.Color(204, 204, 255)); txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtContext.setCaretColor(new java.awt.Color(153, 153, 255)); txtContext.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtContext.setSelectionColor(new java.awt.Color(255, 255, 0)); txtContext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtContextActionPerformed(evt); } }); txtContext.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtContextKeyTyped(evt); } }); lblContents.setBackground(new java.awt.Color(0, 0, 0)); lblContents.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblContents.setForeground(new java.awt.Color(204, 204, 255)); lblContents.setText("Contents:"); lblContents.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); lblCreateDate.setBackground(new java.awt.Color(0, 0, 0)); lblCreateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblCreateDate.setForeground(new java.awt.Color(204, 204, 255)); lblCreateDate.setText("Create Date:"); lblCreateDate.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtCreateDate.setBackground(new java.awt.Color(0, 0, 0)); txtCreateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtCreateDate.setForeground(new java.awt.Color(204, 204, 255)); txtCreateDate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtCreateDate.setCaretColor(new java.awt.Color(153, 153, 255)); txtCreateDate.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtCreateDate.setSelectionColor(new java.awt.Color(255, 255, 0)); txtCreateDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCreateDateActionPerformed(evt); } }); txtCreateDate.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCreateDateKeyTyped(evt); } }); lblUpdateDate.setBackground(new java.awt.Color(0, 0, 0)); lblUpdateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblUpdateDate.setForeground(new java.awt.Color(204, 204, 255)); lblUpdateDate.setText("Update Date:"); lblUpdateDate.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); txtUpdateDate.setBackground(new java.awt.Color(0, 0, 0)); txtUpdateDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtUpdateDate.setForeground(new java.awt.Color(204, 204, 255)); txtUpdateDate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtUpdateDate.setCaretColor(new java.awt.Color(153, 153, 255)); txtUpdateDate.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtUpdateDate.setSelectionColor(new java.awt.Color(255, 255, 0)); txtUpdateDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtUpdateDateActionPerformed(evt); } }); txtUpdateDate.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUpdateDateKeyTyped(evt); } }); txtFinishDate.setBackground(new java.awt.Color(0, 0, 0)); txtFinishDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N txtFinishDate.setForeground(new java.awt.Color(204, 204, 255)); txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 255))); txtFinishDate.setCaretColor(new java.awt.Color(153, 153, 255)); txtFinishDate.setSelectedTextColor(new java.awt.Color(51, 51, 255)); txtFinishDate.setSelectionColor(new java.awt.Color(255, 255, 0)); txtFinishDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtFinishDateActionPerformed(evt); } }); txtFinishDate.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtFinishDateKeyTyped(evt); } }); lblFinishDate.setBackground(new java.awt.Color(0, 0, 0)); lblFinishDate.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblFinishDate.setForeground(new java.awt.Color(204, 204, 255)); lblFinishDate.setText("Finish Date:"); lblFinishDate.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); chkDeletedTheRightOne.setBackground(new java.awt.Color(0, 0, 0)); chkDeletedTheRightOne.setFont(new java.awt.Font("Courier New", 0, 12)); // NOI18N chkDeletedTheRightOne.setForeground(new java.awt.Color(255, 255, 255)); chkDeletedTheRightOne.setText("Deleted"); chkDeletedTheRightOne.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chkDeletedTheRightOneActionPerformed(evt); } }); lblStatus.setBackground(new java.awt.Color(0, 0, 0)); lblStatus.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N lblStatus.setForeground(new java.awt.Color(204, 204, 255)); lblStatus.setText("Status:"); lblStatus.setToolTipText("\"b=BOOK/p=PART/e=EPISODE/s=SECTION/a=ATOM"); cboStatus.setFont(new java.awt.Font("Courier New", 0, 14)); // NOI18N cboStatus.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "00-Not Started", "10-Drafting", "20-Draft Review", "30-In Progress", "40-In Final Review", "50-In Rewrite", "60-In Rewrite Review", "90-Review Complete", "99-Complete" })); javax.swing.GroupLayout panHomeScreenLayout = new javax.swing.GroupLayout(panHomeScreen); panHomeScreen.setLayout(panHomeScreenLayout); panHomeScreenLayout.setHorizontalGroup( panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(29, 29, 29) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addComponent(btnCommit) .addGap(18, 18, 18) .addComponent(btnCancel)) .addGroup(panHomeScreenLayout.createSequentialGroup() .addComponent(lblContents) .addGap(18, 18, 18) .addComponent(scrPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 900, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(36, 36, 36) .addComponent(lblContext, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panHomeScreenLayout.createSequentialGroup() .addContainerGap() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblNotebook) .addComponent(lblCreateDate)))) .addGap(6, 6, 6)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panHomeScreenLayout.createSequentialGroup() .addComponent(lblName) .addGap(18, 18, 18))) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panHomeScreenLayout.createSequentialGroup() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txtCreateDate) .addComponent(txtNotebook, javax.swing.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addComponent(lblCorrespondences) .addGap(18, 18, 18) .addComponent(txtCorrespondences, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblUsages) .addGap(12, 12, 12) .addComponent(txtUsages, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lblSize) .addGap(18, 18, 18) .addComponent(txtSize, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panHomeScreenLayout.createSequentialGroup() .addComponent(lblUpdateDate) .addGap(18, 18, 18) .addComponent(txtUpdateDate, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addComponent(lblFinishDate) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lblStatus) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(cboStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE))) .addGap(46, 46, 46)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panHomeScreenLayout.createSequentialGroup() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addComponent(txtContext, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblAtomType) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtAtomType, javax.swing.GroupLayout.PREFERRED_SIZE, 251, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblRelevance) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtRelevance, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(chkDeletedTheRightOne)) .addGroup(panHomeScreenLayout.createSequentialGroup() .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 397, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtVersion, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblItemType) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addComponent(txtItemType, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lblClock) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtClock, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(47, 47, 47)))) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(13, 13, 13) .addComponent(lblTimesUsed) .addGap(18, 18, 18) .addComponent(txtTimesUsed, javax.swing.GroupLayout.PREFERRED_SIZE, 447, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblClimaxScene) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(txtClimaxScene, javax.swing.GroupLayout.PREFERRED_SIZE, 270, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(46, 46, 46)))) .addContainerGap(23, Short.MAX_VALUE)) ); panHomeScreenLayout.setVerticalGroup( panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(13, 13, 13) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblName)) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblClock) .addComponent(txtClock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(txtItemType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(1, 1, 1) .addComponent(lblItemType))) .addGap(13, 13, 13) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 1, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(1, 1, 1) .addComponent(lblRelevance)) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtRelevance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chkDeletedTheRightOne, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(13, 13, 13) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtClimaxScene, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblClimaxScene) .addComponent(txtTimesUsed, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblTimesUsed))) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtAtomType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblAtomType) .addComponent(txtContext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblContext))) .addGap(19, 19, 19) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtNotebook, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblNotebook)) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCorrespondences, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblUsages) .addComponent(txtUsages, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblSize) .addComponent(txtSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panHomeScreenLayout.createSequentialGroup() .addGap(1, 1, 1) .addComponent(lblCorrespondences))) .addGap(1, 1, 1))) .addGap(15, 15, 15) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblCreateDate) .addComponent(txtCreateDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblUpdateDate) .addComponent(txtUpdateDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblFinishDate) .addComponent(txtFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblStatus) .addComponent(cboStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(scrPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 634, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblContents)) .addGap(18, 18, 18) .addGroup(panHomeScreenLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnCommit) .addComponent(btnCancel)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); getContentPane().add(panHomeScreen, java.awt.BorderLayout.CENTER); pack(); }// //GEN-END:initComponents ////////////////////////////////////////////////////////////////////////////// ////// SAVE THE TIME SPENT AND CLOSE: private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed utlStopAStopwatch(); this.dispose(); }//GEN-LAST:event_formWindowClosed ////////////////////////////////////////////////////////////////////////////// /////////////////////// BULLSHIT METHODS /////////////////////// ////////////////////////////////////////////////////////////////////////////// private void txtItemTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtItemTypeActionPerformed }//GEN-LAST:event_txtItemTypeActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtAtomTypeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtAtomTypeActionPerformed }//GEN-LAST:event_txtAtomTypeActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtNameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNameActionPerformed }//GEN-LAST:event_txtNameActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtRelevanceActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtRelevanceActionPerformed }//GEN-LAST:event_txtRelevanceActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtTimesUsedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtTimesUsedActionPerformed }//GEN-LAST:event_txtTimesUsedActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtClimaxSceneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtClimaxSceneActionPerformed }//GEN-LAST:event_txtClimaxSceneActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtNotebookActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtNotebookActionPerformed }//GEN-LAST:event_txtNotebookActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtCorrespondencesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCorrespondencesActionPerformed }//GEN-LAST:event_txtCorrespondencesActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtUsagesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUsagesActionPerformed }//GEN-LAST:event_txtUsagesActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtClockActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtClockActionPerformed if ( aStopwatch.isRunning() ) { utlStopAStopwatch(); System.out.println("stopping and changing foreground to black"); txtClock.setBackground(new java.awt.Color(127, 127, 127)); txtClock.setForeground(Color.black); } else { utlStartAStopwatch(false); txtClock.setBackground( Color.BLACK); txtClock.setForeground(new java.awt.Color(204,204,255)); } }//GEN-LAST:event_txtClockActionPerformed /////////////////////// MORE BULLSHIT ////////////////////////// private void txtSizeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtSizeActionPerformed }//GEN-LAST:event_txtSizeActionPerformed ////////////////////////////////////////////////////////////////////////////// /////////////////////// METHODS I'VE WRITTEN CODE FOR: /////////////////////// ////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// ////// COMMIT THE CHANGES: private void btnCommitMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnCommitMouseClicked prfCommit(); }//GEN-LAST:event_btnCommitMouseClicked /////////////////////////////////////////////////////////////////////////// ////// SAVE THE TIME SPENT AND CLOSE: private void btnCancelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelActionPerformed // Before closing, make sure the time is saved // also I couuuuld save the caret position for this item // and open the sContents to that position next time in... // ...just sayin' .|. // utlStopAStopwatch(); dispose(); }//GEN-LAST:event_btnCancelActionPerformed ///////////////////// MORE BULLSHIT ////////////////////////// private void panHomeScreenFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_panHomeScreenFocusGained utlStartAStopwatch(false); }//GEN-LAST:event_panHomeScreenFocusGained ///////////////////// MORE BULLSHIT //////////////////////// private void panHomeScreenFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_panHomeScreenFocusLost utlStopAStopwatch(); }//GEN-LAST:event_panHomeScreenFocusLost ///////////////////// TODO: WRITE ME //////////////////////// private void txtVersionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtVersionActionPerformed // TODO: 20230709: AT THIS POINT I WANT TO GO FIND WHAT X WOULD // BE FOR A DIFF VERSION AND SET MY SHIT TO X if (txtVersion.isEnabled()) txtVersion.setEnabled(false); }//GEN-LAST:event_txtVersionActionPerformed ///////////////////// TODO: WRITE ME //////////////////////// private void txtContextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtContextActionPerformed }//GEN-LAST:event_txtContextActionPerformed private void txtClockMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtClockMouseClicked if ( aStopwatch.isRunning() ) { utlStopAStopwatch(); txtClock.setBackground(new java.awt.Color(127, 127, 127)); txtClock.setForeground(Color.black); } else { utlStartAStopwatch(false); txtClock.setBackground( Color.BLACK); txtClock.setForeground(new java.awt.Color(204,204,255)); } }//GEN-LAST:event_txtClockMouseClicked private void txtNameKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtNameKeyTyped setUIColors(Chicago.cnName); }//GEN-LAST:event_txtNameKeyTyped private void txtItemTypeKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtItemTypeKeyTyped setUIColors(Chicago.cnItemType); }//GEN-LAST:event_txtItemTypeKeyTyped private void txtContextKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtContextKeyTyped setUIColors(Chicago.cnContext); }//GEN-LAST:event_txtContextKeyTyped private void txtAtomTypeKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtAtomTypeKeyTyped setUIColors(Chicago.cnAtomType); }//GEN-LAST:event_txtAtomTypeKeyTyped private void txtRelevanceKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtRelevanceKeyTyped setUIColors(Chicago.cnRelevance); }//GEN-LAST:event_txtRelevanceKeyTyped private void txtTimesUsedKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtTimesUsedKeyTyped setUIColors(Chicago.cnTimesUsed); }//GEN-LAST:event_txtTimesUsedKeyTyped private void txtClimaxSceneKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtClimaxSceneKeyTyped setUIColors(Chicago.cnClimaxScene); }//GEN-LAST:event_txtClimaxSceneKeyTyped private void txtNotebookKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtNotebookKeyTyped setUIColors(Chicago.cnNotebook); }//GEN-LAST:event_txtNotebookKeyTyped private void txtCorrespondencesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtCorrespondencesKeyTyped setUIColors(Chicago.cnCorrespondences); }//GEN-LAST:event_txtCorrespondencesKeyTyped private void txtUsagesKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUsagesKeyTyped setUIColors(Chicago.cnUsages); }//GEN-LAST:event_txtUsagesKeyTyped private void txaContentsKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txaContentsKeyTyped setUIColors(Chicago.cnContents); }//GEN-LAST:event_txaContentsKeyTyped private void txtCreateDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtCreateDateActionPerformed }//GEN-LAST:event_txtCreateDateActionPerformed private void txtCreateDateKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtCreateDateKeyTyped }//GEN-LAST:event_txtCreateDateKeyTyped private void txtUpdateDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtUpdateDateActionPerformed }//GEN-LAST:event_txtUpdateDateActionPerformed private void txtUpdateDateKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtUpdateDateKeyTyped }//GEN-LAST:event_txtUpdateDateKeyTyped private void txtFinishDateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txtFinishDateActionPerformed }//GEN-LAST:event_txtFinishDateActionPerformed private void txtFinishDateKeyTyped(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtFinishDateKeyTyped setUIColors(Chicago.cnFinishDate); }//GEN-LAST:event_txtFinishDateKeyTyped private void chkDeletedItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_chkDeletedItemStateChanged }//GEN-LAST:event_chkDeletedItemStateChanged private void chkDeletedMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_chkDeletedMouseClicked }//GEN-LAST:event_chkDeletedMouseClicked private void chkDeletedActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkDeletedActionPerformed setUIColors(Chicago.cnDeleted); }//GEN-LAST:event_chkDeletedActionPerformed private void chkDeletedTheRightOneActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkDeletedTheRightOneActionPerformed setUIColors(Chicago.cnDeleted); }//GEN-LAST:event_chkDeletedTheRightOneActionPerformed private void txaContentsMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txaContentsMouseClicked // TODO add your handling code here: // Right click launch app if ( SwingUtilities.isRightMouseButton(evt) ) { String filename = txaContents.getSelectedText(); // Open the default app for the file, whatever the fuck that is: try { Desktop.getDesktop().open(new File( filename)); } catch (Exception e) { e.printStackTrace(); } } }//GEN-LAST:event_txaContentsMouseClicked private void txtNameMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_txtNameMouseClicked // I am being asked to print if ( SwingUtilities.isRightMouseButton(evt) ) { // call the print routine with the index of this item this.utlPrint(this.iMyCurrentItem); } }//GEN-LAST:event_txtNameMouseClicked // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnCancel; private javax.swing.JButton btnCommit; private javax.swing.JComboBox cboStatus; private javax.swing.JCheckBox chkDeleted; private javax.swing.JCheckBox chkDeletedTheRightOne; private javax.swing.JLabel lblAtomType; private javax.swing.JLabel lblClimaxScene; private javax.swing.JLabel lblClock; private javax.swing.JLabel lblContents; private javax.swing.JLabel lblContext; private javax.swing.JLabel lblCorrespondences; private javax.swing.JLabel lblCreateDate; private javax.swing.JLabel lblFinishDate; private javax.swing.JLabel lblItemType; private javax.swing.JLabel lblName; private javax.swing.JLabel lblNotebook; private javax.swing.JLabel lblRelevance; private javax.swing.JLabel lblSize; private javax.swing.JLabel lblStatus; private javax.swing.JLabel lblTimesUsed; private javax.swing.JLabel lblUpdateDate; private javax.swing.JLabel lblUsages; private javax.swing.JPanel panHomeScreen; private javax.swing.JScrollPane scrPane2; private javax.swing.JTextArea txaContents; private javax.swing.JTextField txtAtomType; private javax.swing.JTextField txtClimaxScene; private javax.swing.JTextField txtClock; private javax.swing.JTextField txtContext; private javax.swing.JTextField txtCorrespondences; private javax.swing.JTextField txtCreateDate; private javax.swing.JTextField txtFinishDate; private javax.swing.JTextField txtItemType; private javax.swing.JTextField txtName; private javax.swing.JTextField txtNotebook; private javax.swing.JTextField txtRelevance; private javax.swing.JTextField txtSize; private javax.swing.JTextField txtTimesUsed; private javax.swing.JTextField txtUpdateDate; private javax.swing.JTextField txtUsages; private javax.swing.JTextField txtVersion; // End of variables declaration//GEN-END:variables /////////////////////////////////////////////////////////////////////////// ///////////////////////// HERE'S MY CODE: /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ///////////////////////// METHODS /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ///////////////////////// PRIVATE /////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// ////// IF YOU SEE ANY OTHER BUSINESS LOGIC IN THIS CLASS, THAT'S NEWS 2 ME private void prfCommit() { if (!txtItemType.getText().equals("") && !txtName.getText().equals("")) { utlStopAStopwatch(); Chicago.iRowCount++; // we're going to use this row for the new data int x = Chicago.iRowCount; // Note that setAllMyShitToX should have set iMyOldX Chicago.sObjModel[x][Chicago.DIRTY_BIT] = String.valueOf(Chicago.DIRTY_BIT_INSERT); String sItemType = txtItemType.getText(); Chicago.sObjModel[x][Chicago.cnItemType] = sItemType; String sName = txtName.getText(); Chicago.sObjModel[x][Chicago.cnName] = sName; Chicago.sObjModel[x][Chicago.cnAtomType ] = txtAtomType .getText(); Chicago.sObjModel[x][Chicago.cnContents ] = txaContents .getText(); Chicago.sObjModel[x][Chicago.cnTimesUsed ] = txtTimesUsed .getText(); Chicago.sObjModel[x][Chicago.cnClimaxScene ] = txtClimaxScene .getText(); Chicago.sObjModel[x][Chicago.cnNotebook ] = txtNotebook .getText(); Chicago.sObjModel[x][Chicago.cnCorrespondences] = txtCorrespondences.getText(); Chicago.sObjModel[x][Chicago.cnUsages ] = txtUsages .getText(); Chicago.sObjModel[x][Chicago.cnRelevance ] = txtRelevance .getText(); // Cast long to int to add to an int to cast to a String. Chef's FUCKING KISS. MUAH. int iNewClock = 0; if (iMyOldX == -1) iNewClock = (int)(this.aStopwatch.elapsedMillis()/1000); else iNewClock = Integer.parseInt(Chicago.sObjModel[iMyOldX][Chicago.cnClock]) + (int) (this.aStopwatch.elapsedMillis()/1000); Chicago.sObjModel[x][Chicago.cnClock] = String.valueOf(iNewClock); Chicago.sObjModel[x][Chicago.cnSize] = String.valueOf(txaContents.getText().length()); String sVersion = txtVersion.getText(); Chicago.sObjModel[x][Chicago.cnVersion] = sVersion; Chicago.sObjModel[x][Chicago.cnMaxVersion] = sVersion; String sContext = txtContext.getText(); Chicago.sObjModel[x][Chicago.cnContext] = sContext; String sListString = sContext + " > " + sItemType + " # " + txtRelevance.getText() + " & " + txtFinishDate.getText() + " : " + sName + " @ " + sVersion; Chicago.sObjModel[x][Chicago.cnListString] = sListString; // Update date is always calculated String sFormattedDate = ""; try { LocalDateTime myDateObj = LocalDateTime.now(); DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern("yyyyMMdd HH:mm:ss"); sFormattedDate = myDateObj.format(myFormatObj); Chicago.sObjModel[x][Chicago.cnUpdateDate] = sFormattedDate; } catch (Exception e) { e.printStackTrace(); } // Create date depends on Function. I.e, if function is Create, CreateDate = UpdateDate above if (iMyFunction == Chicago.SCREEN_CREATE) Chicago.sObjModel[x][Chicago.cnCreateDate] = Chicago.sObjModel[x][Chicago.cnUpdateDate]; // 20230806 - Update date is always blank for some reason. I'm going to comment out the code that sets it: else Chicago.sObjModel[x][Chicago.cnCreateDate] = txtCreateDate.getText(); //System.out.println("Date for update set to ***" + sFormattedDate + "***"); // Welcome to the Belagio. Guess what? createDate may have been fucked up if (Chicago.sObjModel[x][Chicago.cnCreateDate].length()<8) { Chicago.sObjModel[x][Chicago.cnCreateDate] = sFormattedDate; } // Finish date is always what some motherfucker typed in Chicago.sObjModel[x][Chicago.cnFinishDate] = this.txtFinishDate.getText(); // TODO Status Chicago.sObjModel[x][Chicago.cnStatus] = this.cboStatus.getSelectedItem().toString(); String sDeleted = "0"; if (this.chkDeletedTheRightOne.isSelected()) sDeleted="1"; Chicago.sObjModel[x][Chicago.cnDeleted] = sDeleted; iMyOldX = x; ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////// // For previous versions of Name/ItemType/Context, update the size, clock, and max version // Loop from 1 to < iRowCount since the item at iRowCount is correct for ( int iCount = 1; iCount < Chicago.iRowCount; iCount++ ) { if (Chicago.sObjModel[iCount][Chicago.cnName] .equals(Chicago.sObjModel[iMyOldX][Chicago.cnName]) && Chicago.sObjModel[iCount][Chicago.cnItemType] .equals(Chicago.sObjModel[iMyOldX][Chicago.cnItemType]) && Chicago.sObjModel[iCount][Chicago.cnContext] .equals(Chicago.sObjModel[iMyOldX][Chicago.cnContext]) && iMyFunction == Chicago.SCREEN_EDIT) { // Set iCount to iMyOldX Chicago.sObjModel[iCount][Chicago.cnSize] = Chicago.sObjModel[iMyOldX][Chicago.cnSize]; Chicago.sObjModel[iCount][Chicago.cnClock] = Chicago.sObjModel[iMyOldX][Chicago.cnClock]; Chicago.sObjModel[iCount][Chicago.cnMaxVersion] = Chicago.sObjModel[iMyOldX][Chicago.cnMaxVersion]; if (Integer.parseInt(Chicago.sObjModel[iCount][Chicago.DIRTY_BIT].trim()) != Chicago.DIRTY_BIT_INSERT) Chicago.sObjModel[iCount][Chicago.DIRTY_BIT] = String.valueOf(Chicago.DIRTY_BIT_UPDATE); }} // At this point, set the iMyCurrentItem to be the new item and change the version on the screen iMyCurrentItem = x; int iNewVersion = Integer.parseInt(Chicago.sObjModel[x][Chicago.cnVersion].trim()) + 1; txtVersion.setText(String.valueOf(iNewVersion)); txtVersion.setEnabled(false); this.setUIColors(0); Chicago.utlAlertHomeScreen(x); Chicago.utlProjectManagement(); utlStartAStopwatch(true); this.iMyFunction = Chicago.SCREEN_EDIT; } else { // Pop open a modal window alerting me ChicagoUIOKDialog fuck = new ChicagoUIOKDialog(new javax.swing.JFrame(), true); fuck.setLabel( "I ain't savin' that."); fuck.setLocationRelativeTo(null); fuck.setVisible( true); } } /////////////////////////////////////////////////////////////////////////// ///////////////////////// PUBLIC /////////////////////////////// /////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////// ///////////////////////// UI /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ////// ALLOW HOME SCREEN TO SET THE TEXT BOX CONTROLS: public void setTxtAtomType(String arg) { txtAtomType.setText(arg); } public void setCboStatus(String arg) { this.cboStatus.addItem(arg); } public void setCboStatusValue(String arg) { this.cboStatus.setSelectedItem(arg); } public void setTxtClimaxScene(String arg) { txtTimesUsed.setText(arg); } public void setTxtClock(String arg) { txtClock.setText(arg); } public void setTxtContext(String arg) { txtContext.setText(arg); } public void setTxtCorrespondences(String arg) { txtCorrespondences.setText(arg); } public void setTxtItemType(String arg) { txtItemType.setText(arg); } public void setTxtVersion(String arg) { txtVersion.setText(arg); txtVersion.setEnabled(false); } public void setTxtName(String arg) { txtName.setText(arg); } public void setTxtRelevance(String arg) { txtRelevance.setText(arg); } public void setTxtSize(String arg) { txtSize.setText(arg); } public void setTxtTimesUsed(String arg) { txtTimesUsed.setText(arg); } public void setTxtUsages(String arg) { txtUsages.setText(arg); } ////// TEXT AREA CONTROL: public void setTxaContents(String arg) { txaContents.setText(arg); } /////////////////////////////////////////////////////////////////////////// ///////////////////////// GET + SET SHIT /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ////// GETTERS: ////// I KNOW, I KNOW. THIS ISN'T USED ELSEWHERE. WTF DID I NEED IT? public int getTimeSpent() { return (int) (aStopwatch.elapsedMillis() / 1000); } ////// SET ALL OF MY VARIABLES TO WHAT IS CURRENTLY IN THE XTH ////// ITEM OF THE CHICAGO.SOBJMODEL: public void setAllMyShitToX(int x) { int itemNumber = x; iMyCurrentItem = x; iMyOldX = x; txtItemType .setText(Chicago.sObjModel[x][Chicago.cnItemType]); txtAtomType .setText(Chicago.sObjModel[x][Chicago.cnAtomType]); txtName .setText(Chicago.sObjModel[x][Chicago.cnName]); txaContents .setText(Chicago.sObjModel[x][Chicago.cnContents]); txaContents .setCaretPosition(0); txtContext .setText(Chicago.sObjModel[x][Chicago.cnContext]); txtRelevance .setText(Chicago.sObjModel[x][Chicago.cnRelevance]); txtTimesUsed .setText(Chicago.sObjModel[x][Chicago.cnTimesUsed]); txtClimaxScene .setText(Chicago.sObjModel[x][Chicago.cnClimaxScene]); txtNotebook .setText(Chicago.sObjModel[x][Chicago.cnNotebook]); txtCorrespondences.setText(Chicago.sObjModel[x][Chicago.cnCorrespondences]); txtUsages .setText(Chicago.sObjModel[x][Chicago.cnUsages]); txtContext .setText(Chicago.sObjModel[x][Chicago.cnContext]); txtClock .setText(Chicago.sObjModel[x][Chicago.cnClock]); txtSize .setText(Chicago.sObjModel[x][Chicago.cnSize]); int iCurrentVersion = Integer.parseInt(Chicago.sObjModel[x][Chicago.cnVersion]); iCurrentVersion++; txtVersion .setText(String.valueOf(iCurrentVersion)); txtVersion.setEnabled(false); txtCreateDate.setText(Chicago.sObjModel[x][Chicago.cnCreateDate]); //System.out.println("I think the create date of this item is " + txtCreateDate.getText()); //Currently, status is not being updated, so, set it's value to x's value this.cboStatus.setSelectedItem(Chicago.sObjModel[x][Chicago.cnStatus]); txtUpdateDate.setText(Chicago.sObjModel[x][Chicago.cnUpdateDate]); txtFinishDate.setText(Chicago.sObjModel[x][Chicago.cnFinishDate]); txtCreateDate.setEnabled(false); txtUpdateDate.setEnabled(false); } public void setMyFunction(int i) { iMyFunction = i; if (iMyFunction == Chicago.SCREEN_EDIT) txtName.setEnabled(false); else txtName.setEnabled(true); txtVersion.setEnabled(false); } ////// SET ALL OF MY VARIABLES TO ESSENTIALLY BLANK: public void setDefaultValues() { String sItemType = ""; txtItemType.setText( ""); String sAtomType = ""; txtAtomType.setText( ""); txtName.setText("Please Enter a Name"); txaContents.setText(""); int iRelevance = 0; txtRelevance.setText("" + iRelevance); String sNA = "n/a"; txtTimesUsed.setText("UNREAD"); String sTBD = "TBD"; txtClimaxScene.setText(sTBD); txtNotebook.setText(sNA); txtCorrespondences.setText(sNA); txtContext.setText(Chicago.sAppContext); txtUsages.setText(sNA); txtClock.setText("0"); txtSize.setText("0"); txtVersion.setText("1"); txtVersion.setEnabled(false); iMyCurrentItem=0; } public void setUIColors(int iColumn) { if (this.iMyCurrentItem==-1) return; Color colLblBackground = Chicago.COL_BLACK; Color colLblForeground = Chicago.COL_BLACK; Color colPanelBackground = Chicago.COL_BLACK; Color colTxaBackground = Chicago.COL_BLACK; Color colTxaForeground = Chicago.COL_BLACK; Color colTxaBorder = Chicago.COL_BLACK; Color colTxtBackground = Chicago.COL_BLACK; Color colTxtForeground = Chicago.COL_BLACK; Color colTxtForegroundDisabled = Chicago.COL_BLACK; Color colTxtBorder = Chicago.COL_BLACK; Color colTxtVersionAll = Chicago.COL_WHITE; if (iColumn == ALL_COLUMNS) { if (!blnScreenChanged()) { // Screen unchanged colLblBackground = Chicago.COL_BLACK; colLblForeground = Chicago.COL_GHOST; colPanelBackground = Chicago.COL_BLACK; colTxaBackground = Chicago.COL_BLACK; colTxaForeground = Chicago.COL_GHOST; colTxaBorder = Chicago.COL_GHOST; colTxtBackground = Chicago.COL_BLACK; colTxtForeground = Chicago.COL_GHOST; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_GHOST; } else { // Screen updated //System.out.println("I think the screen is different"); colLblBackground = Chicago.COL_BLACK; colLblForeground = Chicago.COL_CYAN; colPanelBackground = Chicago.COL_BLACK; colTxaBackground = Chicago.COL_BLACK; colTxaForeground = Chicago.COL_CYAN; colTxaBorder = Chicago.COL_CYAN; colTxtBackground = Chicago.COL_BLACK; colTxtForeground = Chicago.COL_CYAN; colTxtForegroundDisabled = Chicago.COL_GHOST; colTxtBorder = Chicago.COL_CYAN; } // NOW SET EVERYTHING TO THE COLORS ARRANGED ABOVE //BACKGROUNDS //this.panHomeScreen.setBackground(colPanelBackground); // LABELS this.lblAtomType.setBackground(colLblBackground); this.lblClimaxScene.setBackground(colLblBackground); this.lblClock.setBackground(colLblBackground); this.lblContents.setBackground(colLblBackground); this.lblContext.setBackground(colLblBackground); this.lblUsages.setBackground(colLblBackground); //this.lblCreateDate.setBackground(colLblBackground); //this.lblFinishDate.setBackground(colLblBackground); this.lblItemType.setBackground(colLblBackground); //this.lblMaxVersion.setBackground(colLblBackground); this.lblName.setBackground(colLblBackground); this.lblNotebook.setBackground(colLblBackground); this.lblRelevance.setBackground(colLblBackground); this.lblSize.setBackground(colLblBackground); this.lblTimesUsed.setBackground(colLblBackground); //this.lblUpdateDate.setBackground(colLblBackground); this.lblCorrespondences.setBackground(colLblBackground); //this.lblVersion.setBackground(colLblBackground); // TEXT AREA this.txaContents.setBackground(colTxaBackground); // TEXT BOXES this.txtAtomType.setBackground(colTxtBackground); this.txtClimaxScene.setBackground(colTxtBackground); this.txtContext.setBackground(colTxtBackground); this.txtCorrespondences.setBackground(colTxtBackground); this.txtCreateDate.setBackground(colTxtBackground); this.txtFinishDate.setBackground(colTxtBackground); this.txtItemType.setBackground(colTxtBackground); this.txtName.setBackground(colTxtBackground); this.txtNotebook.setBackground(colTxtBackground); this.txtRelevance.setBackground(colTxtBackground); this.txtSize.setBackground(colTxtBackground); this.txtTimesUsed.setBackground(colTxtBackground); this.txtUpdateDate.setBackground(colTxtBackground); this.txtUsages.setBackground(colTxtBackground); this.txtVersion.setBackground(colTxtBackground); this.chkDeleted.setBackground(colTxtBackground); // FOREGROUNDS // LABELS this.lblAtomType.setForeground(colLblForeground); this.lblClimaxScene.setForeground(colLblForeground); this.lblClock.setForeground(colLblForeground); this.lblContents.setForeground(colLblForeground); this.lblContext.setForeground(colLblForeground); this.lblUsages.setForeground(colLblForeground); this.lblCreateDate.setForeground(colLblForeground); this.lblFinishDate.setForeground(colLblForeground); this.lblItemType.setForeground(colLblForeground); //this.lblMaxVersion.setForeground(colLblForeground); this.lblName.setForeground(colLblForeground); this.lblNotebook.setForeground(colLblForeground); this.lblRelevance.setForeground(colLblForeground); this.lblSize.setForeground(colLblForeground); this.lblTimesUsed.setForeground(colLblForeground); this.lblUpdateDate.setForeground(colLblForeground); this.lblCorrespondences.setForeground(colLblForeground); // TEXT AREA this.txaContents.setForeground(colTxaForeground); // TEXT BOXES this.txtAtomType.setForeground(colTxtForeground); this.txtClimaxScene.setForeground(colTxtForeground); this.txtContext.setForeground(colTxtForeground); this.txtCorrespondences.setForeground(colTxtForeground); this.txtCreateDate.setForeground(colTxtForeground); this.txtFinishDate.setForeground(colTxtForeground); this.txtItemType.setForeground(colTxtForeground); this.txtName.setForeground(colTxtForeground); this.txtNotebook.setForeground(colTxtForeground); this.txtRelevance.setForeground(colTxtForeground); this.txtSize.setForeground(colTxtForeground); this.txtTimesUsed.setForeground(colTxtForeground); this.txtUpdateDate.setForeground(colTxtForeground); this.txtUsages.setForeground(colTxtForeground); this.txtVersion.setForeground(colTxtVersionAll); this.chkDeleted.setForeground(colTxtForeground); // TEXT BOXES - DISABLED this.txtAtomType.setDisabledTextColor(colTxtForegroundDisabled); this.txtClimaxScene.setDisabledTextColor(colTxtForegroundDisabled); this.txtContext.setDisabledTextColor(colTxtForegroundDisabled); this.txtCorrespondences.setDisabledTextColor(colTxtForegroundDisabled); this.txtCreateDate.setDisabledTextColor(colTxtForegroundDisabled); this.txtFinishDate.setDisabledTextColor(colTxtForegroundDisabled); this.txtItemType.setDisabledTextColor(colTxtForegroundDisabled); this.txtName.setDisabledTextColor(colTxtForegroundDisabled); this.txtNotebook.setDisabledTextColor(colTxtForegroundDisabled); this.txtRelevance.setDisabledTextColor(colTxtForegroundDisabled); this.txtSize.setDisabledTextColor(colTxtForegroundDisabled); this.txtTimesUsed.setDisabledTextColor(colTxtForegroundDisabled); this.txtUpdateDate.setDisabledTextColor(colTxtForegroundDisabled); this.txtUsages.setDisabledTextColor(colTxtForegroundDisabled); // I'M DIFFERENT: this.txtVersion.setDisabledTextColor(colTxtVersionAll); // BORDERS this.txaContents.setBorder(javax.swing.BorderFactory.createLineBorder(colTxaBorder)); this.txtAtomType.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtClimaxScene.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtContext.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtCorrespondences.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtCreateDate.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtFinishDate.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtItemType.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtName.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtNotebook.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtRelevance.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtSize.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtTimesUsed.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtUpdateDate.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); this.txtUsages.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtBorder)); // I'M DIFFERENT this.txtVersion.setBorder(javax.swing.BorderFactory.createLineBorder(colTxtVersionAll)); } else if (iColumn == Chicago.cnAtomType) { // Update the Atom Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnAtomType]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnAtomType].equals(txtAtomType.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblAtomType.setForeground(Chicago.COL_GHOST); lblAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setForeground(Chicago.COL_GHOST); txtAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblAtomType.setForeground(Chicago.COL_CYAN); lblAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setForeground(Chicago.COL_CYAN); txtAtomType.setBackground(Chicago.COL_BLACK); txtAtomType.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnName) { // Update the Name UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnName]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnName].equals(txtName.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblName.setForeground(Chicago.COL_GHOST); lblName.setBackground(Chicago.COL_BLACK); txtName.setForeground(Chicago.COL_GHOST); txtName.setBackground(Chicago.COL_BLACK); txtName.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblName.setForeground(Chicago.COL_CYAN); lblName.setBackground(Chicago.COL_BLACK); txtName.setForeground(Chicago.COL_CYAN); txtName.setBackground(Chicago.COL_BLACK); txtName.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnItemType) { // Update the Item Type UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnItemType]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnItemType].equals(txtItemType.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblItemType.setForeground(Chicago.COL_GHOST); lblItemType.setBackground(Chicago.COL_BLACK); txtItemType.setForeground(Chicago.COL_GHOST); txtItemType.setBackground(Chicago.COL_BLACK); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblItemType.setForeground(Chicago.COL_CYAN); lblItemType.setBackground(Chicago.COL_BLACK); txtItemType.setForeground(Chicago.COL_CYAN); txtItemType.setBackground(Chicago.COL_BLACK); txtItemType.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnContext) { // Update the Context UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnContext]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnContext].equals(txtContext.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblContext.setForeground(Chicago.COL_GHOST); lblContext.setBackground(Chicago.COL_BLACK); txtContext.setForeground(Chicago.COL_GHOST); txtContext.setBackground(Chicago.COL_BLACK); txtContext.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblContext.setForeground(Chicago.COL_CYAN); lblContext.setBackground(Chicago.COL_BLACK); txtContext.setForeground(Chicago.COL_CYAN); txtContext.setBackground(Chicago.COL_BLACK); txtContext.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnRelevance) { // Update the Relevance UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnRelevance]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnRelevance].equals(txtRelevance.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblRelevance.setForeground(Chicago.COL_GHOST); lblRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setForeground(Chicago.COL_GHOST); txtRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblRelevance.setForeground(Chicago.COL_CYAN); lblRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setForeground(Chicago.COL_CYAN); txtRelevance.setBackground(Chicago.COL_BLACK); txtRelevance.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnTimesUsed) { // Update the Times Used UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnTimesUsed]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnTimesUsed].equals(txtTimesUsed.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblTimesUsed.setForeground(Chicago.COL_GHOST); lblTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setForeground(Chicago.COL_GHOST); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblTimesUsed.setForeground(Chicago.COL_CYAN); lblTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setForeground(Chicago.COL_CYAN); txtTimesUsed.setBackground(Chicago.COL_BLACK); txtTimesUsed.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnClimaxScene) { // Update the Climax Scene UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnClimaxScene]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnClimaxScene].equals(txtClimaxScene.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblClimaxScene.setForeground(Chicago.COL_GHOST); lblClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setForeground(Chicago.COL_GHOST); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblClimaxScene.setForeground(Chicago.COL_CYAN); lblClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setForeground(Chicago.COL_CYAN); txtClimaxScene.setBackground(Chicago.COL_BLACK); txtClimaxScene.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnNotebook) { // Update the Notebook UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnNotebook]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnNotebook].equals(txtNotebook.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblNotebook.setForeground(Chicago.COL_GHOST); lblNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setForeground(Chicago.COL_GHOST); txtNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblNotebook.setForeground(Chicago.COL_CYAN); lblNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setForeground(Chicago.COL_CYAN); txtNotebook.setBackground(Chicago.COL_BLACK); txtNotebook.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnCorrespondences) { // Update the Correspondences UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnCorrespondences]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnCorrespondences].equals(txtCorrespondences.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblCorrespondences.setForeground(Chicago.COL_GHOST); lblCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setForeground(Chicago.COL_GHOST); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblCorrespondences.setForeground(Chicago.COL_CYAN); lblCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setForeground(Chicago.COL_CYAN); txtCorrespondences.setBackground(Chicago.COL_BLACK); txtCorrespondences.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnUsages) { // Update the Usages UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnUsages]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnUsages].equals(txtUsages.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblUsages.setForeground(Chicago.COL_GHOST); lblUsages.setBackground(Chicago.COL_BLACK); txtUsages.setForeground(Chicago.COL_GHOST); txtUsages.setBackground(Chicago.COL_BLACK); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblUsages.setForeground(Chicago.COL_CYAN); lblUsages.setBackground(Chicago.COL_BLACK); txtUsages.setForeground(Chicago.COL_CYAN); txtUsages.setBackground(Chicago.COL_BLACK); txtUsages.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnContents) { // Update the Contents UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnContents]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnContents].equals(txaContents.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblContents.setForeground(Chicago.COL_GHOST); lblContents.setBackground(Chicago.COL_BLACK); txaContents.setForeground(Chicago.COL_GHOST); txaContents.setBackground(Chicago.COL_BLACK); txaContents.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblContents.setForeground(Chicago.COL_CYAN); lblContents.setBackground(Chicago.COL_BLACK); txaContents.setForeground(Chicago.COL_CYAN); txaContents.setBackground(Chicago.COL_BLACK); txaContents.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnFinishDate) { // Update the Finish Date UI elements based on whether it differs from the object model if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnFinishDate]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnFinishDate].equals(txtFinishDate.getText())) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblFinishDate.setForeground(Chicago.COL_GHOST); lblFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setForeground(Chicago.COL_GHOST); txtFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setDisabledTextColor(Chicago.COL_GHOST); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { lblFinishDate.setForeground(Chicago.COL_CYAN); lblFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setForeground(Chicago.COL_CYAN); txtFinishDate.setBackground(Chicago.COL_BLACK); txtFinishDate.setDisabledTextColor(Chicago.COL_GHOST); }}} else if (iColumn == Chicago.cnDeleted) { // Update the Deleted UI elements based on whether it differs from the object model String sDeleted = "0"; if (chkDeleted.isSelected()) sDeleted="1"; if (Chicago.sObjModel[iMyCurrentItem][Chicago.cnDeleted]!=null && Chicago.sObjModel[iMyCurrentItem][Chicago.cnDeleted].equals(sDeleted)) { // Set everything back to normal for this mode if (Chicago.iMySkin == Chicago.SKIN_DARK) { chkDeleted.setForeground(Chicago.COL_GHOST); chkDeleted.setBackground(Chicago.COL_BLACK); }} else { if (Chicago.iMySkin == Chicago.SKIN_DARK) { chkDeleted.setForeground(Chicago.COL_CYAN); chkDeleted.setBackground(Chicago.COL_BLACK); }}} } /////////////////////////////////////////////////////////////////////////// ///////////////////////// UTILITY /////////////////////////////// /////////////////////////////////////////////////////////////////////////// ////// UTILITY: // Clock: public static String utlConvertIntToClock(int clockSecs) { int hours = clockSecs / 3600 ; int minutes = ( clockSecs - ( hours * 3600) ) / 60 ; int seconds = clockSecs - ( hours * 3600) - ( minutes * 60 ) ; String s = hours + ":" + utlPadClock(minutes,2) + ":" + utlPadClock(seconds,2); return s; } public boolean blnScreenChanged() { try{ if (Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnName].equals(txtName.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnContext].equals(txtContext.getText()) && //Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnCreateDate].equals(txtCreateDate.getText()) && //Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnFinishDate].equals(txtCreateDate.getText()) && //Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnUpdateDate].equals(txtUpdateDate.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnItemType].equals(txtItemType.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnAtomType].equals(txtAtomType.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnRelevance].equals(txtRelevance.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnTimesUsed].equals(txtTimesUsed.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnClimaxScene].equals(txtClimaxScene.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnCorrespondences].equals(txtCorrespondences.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnUsages].equals(txtUsages.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnNotebook].equals(txtNotebook.getText()) && Chicago.sObjModel[this.iMyCurrentItem][Chicago.cnContents].equals(txaContents.getText())) return false; else return true; } catch (Exception e) { return false; } } /////////////////////////////// Pattern Matching Support /////////////////////////////// public static int runTest(String regex, String text) { Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(text); int matches = 0; while (matcher.find()) matches++; return matches; } public void utlPrint(int iItemIndex) { String sItemType = Chicago.sObjModel[iItemIndex][Chicago.cnItemType]; String sItemName = Chicago.sObjModel[iItemIndex][Chicago.cnName]; String sContents = Chicago.sObjModel[iItemIndex][Chicago.cnContents]; boolean bBegin = false; boolean bEnd = false; if (sItemType.equals("s")) { //System.out.println("This section: " + Chicago.sObjModel[iItemIndex][Chicago.cnContents]); //StringBuffer sbBuffer = new StringBuffer(); String[] arrOfStr = sContents.split("\n"); /////////////////////////////////////////////////////////////////////////////////// ////////////////////// TOTAL REPLACEMENTS ////////////////////// /////////////////////////////////////////////////////////////////////////////////// for (String sLine : arrOfStr) { // look in a for "begin" if (sLine.equals("[begin]")) bBegin = true; if (sLine.equals("[end]")) bEnd = true; if (bBegin == true && bEnd == false) { String sRegex = "\\[begin\\]"; if (runTest(sRegex, sLine) > 0) { // Finding "begin" should not print the html here. // This header should already be printed // Otherwise it gets repeated when you print a container Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("\n" + " \n" + " \n" + "\n" + ""); sLine = sNewString; } sRegex = "\\[end\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll(""); sLine = sNewString; } sRegex = "\\[triplespace\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("
"); sLine = sNewString; } //[fyi:60's bob is a character in Infinite Jest] //TODO: need a way to convert these annotations to printed annotations also! sRegex = "\\[fyi:.*\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll(""); sLine = sNewString; } ////////////////////////////////////////////////////////////////// ////////////////////////// p1 ////////////////////////// ////////////////////////////////////////////////////////////////// //[p1-fname] sRegex = "\\[p1-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Blake"); sLine = sNewString; } //[p1-mname] sRegex = "\\[p1-mname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Holdem"); sLine = sNewString; } //[p1-lname] sRegex = "\\[p1-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Fulford"); sLine = sNewString; } //[p1-suffix] sRegex = "\\[p1-suffix\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll(", III"); sLine = sNewString; } //[p1-full] sRegex = "\\[p1-full\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Blake Holden Fulford, III"); sLine = sNewString; } //[p1sp-casinodress] sRegex = "\\[p1sp-casinodress\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[pisp-fname] sRegex = "\\[p1sp-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } ////////////////////////////////////////////////////////////////// ////////////////////////// p2 ////////////////////////// ////////////////////////////////////////////////////////////////// //[p2-fname] sRegex = "\\[p2-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Thomas"); sLine = sNewString; } //[p2-lname] sRegex = "\\[p2-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Prize"); sLine = sNewString; } //[p2-fullname] sRegex = "\\[p2-fullname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Thomas Prize"); sLine = sNewString; } ////////////////////////////////////////////////////////////////// //////////////////////// inlaw ///////////////////////// ////////////////////////////////////////////////////////////////// //[finlaw-fname] sRegex = "\\[finlaw-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Wayne"); sLine = sNewString; } //[finlaw-funame] sRegex = "\\[finlaw-funame\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Wayne \"Quag\" Meier"); sLine = sNewString; } //[minlaw-fname] sRegex = "\\[minlaw-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Felicia"); sLine = sNewString; } //[inlaw-lname] sRegex = "\\[inlaw-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Meier"); sLine = sNewString; } ////////////////////////////////////////////////////////////////// ///////////////////////// cro ////////////////////////// ////////////////////////////////////////////////////////////////// //[cro-fname] sRegex = "\\[cro-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Samantha"); sLine = sNewString; } //[cro-mname] sRegex = "\\[cro-mname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Sara"); sLine = sNewString; } //[cro-lname] sRegex = "\\[cro-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Smith"); sLine = sNewString; } //[cro-full] sRegex = "\\[cro-full\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Samantha Sara Smith"); //she kinda a fucking snake //but she's really samsara sLine = sNewString; } //[cro] sRegex = "\\[cro\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); // I shouldn't exist sLine = sNewString; } //[crosp-fname] sRegex = "\\[crosp-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Mitchell"); sLine = sNewString; } //[crosp-mname] sRegex = "\\[crosp-mname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Jay"); // for homer sLine = sNewString; } //[crosp-lname] sRegex = "\\[crosp-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Wolf"); sLine = sNewString; } ///////////////////////////////////////////////////////////////////// /////////////////////////// coup /////////////////////////// ///////////////////////////////////////////////////////////////////// //[coup1-fname] sRegex = "\\[coup1-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[coup1-mname] sRegex = "\\[coup1-mname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[coup1-lname] sRegex = "\\[coup1-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[coup2-fname] sRegex = "\\[coup2-fname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[coup2-mname] sRegex = "\\[coup2-mname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[coup2-lname] sRegex = "\\[coup2-lname\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } ////////////////////////////////////////////////////////////////// ///////////// OTHERS ///////////// ////////////////////////////////////////////////////////////////// //[dogwalker] sRegex = "\\[dogwalker\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Dr. Joshi"); // personal sLine = sNewString; } //Bendemann sRegex = "\\[fallr\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("Bendemann"); // who drowned in Kafka sLine = sNewString; } //[ahchoo3] sRegex = "\\[ahchoo3\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("ah(choo)3"); sLine = sNewString; } //[BULDINGNEXTTO500WM] sRegex = "\\[BULDINGNEXTTO500WM\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[[ANNULARSHIT]] sRegex = "\\[ANNULARSHIT\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("FUCKME"); sLine = sNewString; } //[1st] sRegex = "\\[1st\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("1st"); sLine = sNewString; } //[2nd] sRegex = "\\[2nd\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("2nd"); sLine = sNewString; } //[3rd] sRegex = "\\[3rd\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("3rd"); sLine = sNewString; } //[br] sRegex = "\\[br\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("
"); sLine = sNewString; } //[sametime] sRegex = "\\[sametime\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); sLine = sNewString; } //[nexttime] sRegex = "\\[nexttime\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); sLine = sNewString; } //[pagebreak] sRegex = "\\[pagebreak\\]"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("
"); sLine = sNewString; } /////////////////////////////////////////////////////////////////////////////////// ////////////////////// INNER REPLACEMENTS ////////////////////// /////////////////////////////////////////////////////////////////////////////////// sRegex = "\\[preamble:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll("

"); sLine = sNewString; } //[title=good day, Sunshine] sRegex = "\\[title:"; if (runTest(sRegex, sLine) > 0 ) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll("

"); sLine = sNewString; if (!blnPrintTitles) sLine = ""; } //[inscription=For Andy, who can't dream] sRegex = "\\[inscription:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll("

"); sLine = sNewString; } //[unary:06301259] sRegex = "\\[unary:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); sLine = sNewString; } //[image=*.jpg] sRegex = "\\[image\\="; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); sLine = sNewString; } //[i:the italicised text] sRegex = "\\[i:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll(""); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll(""); sLine = sNewString; } //[center:the centered text] sRegex = "\\[center:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("
"); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll("
"); sLine = sNewString; } //[quote:the quoted text] sRegex = "\\[quote:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll(""); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll(""); sLine = sNewString; } //////////////////////////////// Paragraphs //////////////////////////////// //[p:the text] sRegex = "\\[p:"; if (runTest(sRegex, sLine) > 0) { Pattern p = Pattern.compile(sRegex); Matcher m = p.matcher(sLine); String sNewString = m.replaceAll("

"); p = Pattern.compile("\\]"); m = p.matcher(sNewString); sNewString = m.replaceAll("

"); sLine = sNewString; } // In order to copy/paste this text into a file that can be rendered by a browser: System.out.println(sLine); }}} ///////////////////////////// Now handle the b, p and e types: ///////////////////////////// else if (sItemType.equals("b") || sItemType.equals("p") || sItemType.equals("e")) { // call this fuction using the list I will establish... //System.out.println("I am in " + sItemName + ", type: " + sItemType + " , contents: "); // Get the list via contents String[] arrOfStr = sContents.split("\n"); for (String a : arrOfStr) { System.out.println("=" + a); // Need to find the object that matches "a" in it's name and version=maxversion for (int i=1; i<=Chicago.iRowCount; i++) { if (Chicago.sObjModel[i][Chicago.cnName ].equals(a.toString()) && Chicago.sObjModel[i][Chicago.cnVersion].equals(Chicago.sObjModel[i][Chicago.cnMaxVersion])) { // This is the match we are looking for, so call this method with i // probably want to do something about only printing the html once... utlPrint(i); } else { //System.out.println(a.toString() + " +++ " + Chicago.sObjModel[i][Chicago.cnName]); }}}} } public void utlStartAStopwatch(boolean bReset) { /* TODO: 20230705: At this point, the stopwatch is an instance variable so, I can schedule the task to occur each 1 second so that the screen will update */ if ( aStopwatch.isRunning() ) return; if ( bReset ) { aStopwatch = new Stopwatch(); } txtClock.setBackground(new java.awt.Color(0, 0, 0)); txtClock.setForeground(Chicago.COL_GHOST); txtClock.setDisabledTextColor(new java.awt.Color(204, 204, 255)); aStopwatch.start(); } public void utlStopAStopwatch() { if ( aStopwatch.isRunning()) { aStopwatch.stop(); txtClock.setBackground(new java.awt.Color(255,255,255)); txtClock.setDisabledTextColor(new java.awt.Color(0, 0, 0)); } else return; } public static String utlPadClock(int value, int paddingLength) { return String.format("%0" + paddingLength + "d", value); } ///////////////////////////////////////////////////////////////////////// /////// SCHEDULE THE CLOCL UPDATE TASK ////// ///////////////////////////////////////////////////////////////////////// public void utlRunTask() { TimerTask updateClock = new TimerTask() { public void run() { try { if (iMyCurrentItem < 1 && iMyFunction==Chicago.SCREEN_EDIT) return; if (iMyFunction==Chicago.SCREEN_CREATE || iMyFunction==Chicago.SCREEN_COPY) { String s = utlConvertIntToClock((int)(aStopwatch.elapsedMillis()/1000)); txtClock.setText(s); } else { int iSeconds = Integer.parseInt(Chicago.sObjModel[iMyCurrentItem][Chicago.cnClock]) + (int)(aStopwatch.elapsedMillis()/1000); String s = utlConvertIntToClock (iSeconds); //System.out.println("Clock: " + s); txtClock.setText(s); }} catch (Exception e) { e.printStackTrace(); }}}; myScheduler.scheduleAtFixedRate(updateClock, 0, 1000); } ///////////////////////////////////////////////////////////////////////// /////// NOW FOR THE REASON WHY YOU ARE HERE, MY MAIN MAN ... ////// ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// ////// MAIN: /** * @param args the command line arguments */ public static void main(String args[]) throws Exception { /* Set the Nimbus look and feel */ // /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ItemScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ItemScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ItemScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ItemScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { ItemScreen csi = new ItemScreen(new javax.swing.JFrame(), false); csi.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { // 20230616: I might want to do some custom code here. See Design Notebook for today System.out.println("csi is closing via override"); //System.exit(0); }}); ActionListener taskPerformer = new ActionListener() { public void actionPerformed(ActionEvent evt) { System.out.println("Action performed..."); }}; Timer myTimer = new Timer(1000, taskPerformer); myTimer.start(); try { Thread.sleep(5000); } catch (Exception e) { System.out.println("Hey, sexy"); } csi.setVisible(true); System.out.println("Window should be visible"); } }); } } /* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JDialog.java to edit this template */ package com.mattmclaurine.chicago; import java.time.LocalDate; import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; import java.time.temporal.ChronoUnit; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import javax.swing.SwingUtilities; import javax.swing.event.ChangeListener; import javax.swing.event.ChangeEvent; /** * * @author lance */ public class SearchScreen extends javax.swing.JDialog { // I have like 4 variables to define. So here they fucking are: private javax.swing.JCheckBox chkIsAtomTypeOn; private javax.swing.JCheckBox chkIsClimaxSceneOn; private javax.swing.JCheckBox chkIsClockOn; private javax.swing.JCheckBox chkIsContentsOn; private javax.swing.JCheckBox chkIsContextOn; private javax.swing.JCheckBox chkIsCorrespondencesOn; private javax.swing.JCheckBox chkIsCreateDateOn; private javax.swing.JCheckBox chkIsDeletedOn; private javax.swing.JCheckBox chkIsFinishDateOn; private javax.swing.JCheckBox chkIsItemTypeOn; private javax.swing.JCheckBox chkIsNameOn; private javax.swing.JCheckBox chkIsNotebookOn; private javax.swing.JCheckBox chkIsRelevanceOn; private javax.swing.JCheckBox chkIsSizeOn; private javax.swing.JCheckBox chkIsStatusOn; private javax.swing.JCheckBox chkIsTimesUsedOn; private javax.swing.JCheckBox chkIsUpdateDateOn; private javax.swing.JCheckBox chkIsUsagesOn; private javax.swing.JCheckBox chkIsVersionOn; private javax.swing.JComboBox cboAtomType; private javax.swing.JComboBox cboClock; private javax.swing.JComboBox cboContext; private javax.swing.JComboBox cboCreateDate; private javax.swing.JComboBox cboDeleted; private javax.swing.JComboBox cboFinishDate; private javax.swing.JComboBox cboItemTypeSearch; private javax.swing.JComboBox cboName; private javax.swing.JComboBox cboRelevance; private javax.swing.JComboBox cboSize; private javax.swing.JComboBox cboStatus; private javax.swing.JComboBox cboUpdateDate; private javax.swing.JComboBox cboVersion; private javax.swing.JLabel lblAtomType; private javax.swing.JLabel lblClimaxScene; private javax.swing.JLabel lblClimaxSceneContains; private javax.swing.JLabel lblClock; private javax.swing.JLabel lblClockAnd; private javax.swing.JLabel lblContents; private javax.swing.JLabel lblContentsContains; private javax.swing.JLabel lblContext; private javax.swing.JLabel lblCorrespondences; private javax.swing.JLabel lblCorrespondencesContains; private javax.swing.JLabel lblCreateDate; private javax.swing.JLabel lblCreateDateAnd; private javax.swing.JLabel lblDeleted; private javax.swing.JLabel lblFinishDate; private javax.swing.JLabel lblFinishDateAnd; private javax.swing.JLabel lblItemType; private javax.swing.JLabel lblItemTypeEquals; private javax.swing.JLabel lblName; private javax.swing.JLabel lblNotebook; private javax.swing.JLabel lblNotebookContains; private javax.swing.JLabel lblRelevance; private javax.swing.JLabel lblRelevanceAnd; private javax.swing.JLabel lblSize; private javax.swing.JLabel lblSizeAnd; private javax.swing.JLabel lblStatus; private javax.swing.JLabel lblTimesUsed; private javax.swing.JLabel lblTimesUsedContains; private javax.swing.JLabel lblUpdateDate; private javax.swing.JLabel lblUpdateDateAnd; private javax.swing.JLabel lblUsages; private javax.swing.JLabel lblUsagesContains; private javax.swing.JLabel lblVersion; private javax.swing.JLabel lblVersionAnd; private javax.swing.JList lstInventory; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JPanel panSearch; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JSpinner spnRelevanceSearch1; private javax.swing.JSpinner spnRelevanceSearch2; private javax.swing.JTextField txtAtomTypeSearch; private javax.swing.JTextField txtClimaxSceneSearch; private javax.swing.JTextField txtClockSearch1; private javax.swing.JTextField txtClockSearch2; private javax.swing.JTextField txtContentsSearch; private javax.swing.JTextField txtContextSearch; private javax.swing.JTextField txtContextSearch1; private javax.swing.JTextField txtCorrespondencesSearch; private javax.swing.JTextField txtCreateDateSearch1; private javax.swing.JTextField txtCreateDateSearch2; private javax.swing.JTextField txtFinishDateSearch1; private javax.swing.JTextField txtFinishDateSearch2; private javax.swing.JTextField txtNameSearch; private javax.swing.JTextField txtNotebookSearch; private javax.swing.JTextField txtSizeSearch1; private javax.swing.JTextField txtSizeSearch2; private javax.swing.JTextField txtTimesUsedSearch; private javax.swing.JTextField txtUpdateDateSearch1; private javax.swing.JTextField txtUpdateDateSearch2; private javax.swing.JTextField txtUsagesSearch; private javax.swing.JTextField txtVersionSearch1; private javax.swing.JTextField txtVersionSearch2; /** * Creates new form SearchScreen */ public SearchScreen(java.awt.Frame parent, boolean modal) { super(parent, modal); initComponents(); } /** * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The * content of this method is always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") private void initComponents() { cboAtomType = new javax.swing.JComboBox<>(); cboClock = new javax.swing.JComboBox<>(); cboContext = new javax.swing.JComboBox<>(); cboCreateDate = new javax.swing.JComboBox<>(); cboDeleted = new javax.swing.JComboBox<>(); cboFinishDate = new javax.swing.JComboBox<>(); cboItemTypeSearch = new javax.swing.JComboBox<>(); cboName = new javax.swing.JComboBox<>(); cboRelevance = new javax.swing.JComboBox<>(); cboSize = new javax.swing.JComboBox<>(); cboStatus = new javax.swing.JComboBox<>(); cboUpdateDate = new javax.swing.JComboBox<>(); cboVersion = new javax.swing.JComboBox<>(); chkIsAtomTypeOn = new javax.swing.JCheckBox(); chkIsClimaxSceneOn = new javax.swing.JCheckBox(); chkIsClockOn = new javax.swing.JCheckBox(); chkIsContentsOn = new javax.swing.JCheckBox(); chkIsContextOn = new javax.swing.JCheckBox(); chkIsCorrespondencesOn = new javax.swing.JCheckBox(); chkIsCreateDateOn = new javax.swing.JCheckBox(); chkIsDeletedOn = new javax.swing.JCheckBox(); chkIsFinishDateOn = new javax.swing.JCheckBox(); chkIsItemTypeOn = new javax.swing.JCheckBox(); chkIsNameOn = new javax.swing.JCheckBox(); chkIsNotebookOn = new javax.swing.JCheckBox(); chkIsRelevanceOn = new javax.swing.JCheckBox(); chkIsSizeOn = new javax.swing.JCheckBox(); chkIsStatusOn = new javax.swing.JCheckBox(); chkIsTimesUsedOn = new javax.swing.JCheckBox(); chkIsUpdateDateOn = new javax.swing.JCheckBox(); chkIsUsagesOn = new javax.swing.JCheckBox(); chkIsVersionOn = new javax.swing.JCheckBox(); lstInventory = new javax.swing.JList<>(); jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jPanel3 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); lblAtomType = new javax.swing.JLabel(); lblClimaxScene = new javax.swing.JLabel(); lblClimaxSceneContains = new javax.swing.JLabel(); lblClock = new javax.swing.JLabel(); lblClockAnd = new javax.swing.JLabel(); lblContents = new javax.swing.JLabel(); lblContentsContains = new javax.swing.JLabel(); lblContext = new javax.swing.JLabel(); lblCorrespondences = new javax.swing.JLabel(); lblCorrespondencesContains = new javax.swing.JLabel(); lblCreateDate = new javax.swing.JLabel(); lblCreateDateAnd = new javax.swing.JLabel(); lblDeleted = new javax.swing.JLabel(); lblFinishDate = new javax.swing.JLabel(); lblFinishDateAnd = new javax.swing.JLabel(); lblItemType = new javax.swing.JLabel(); lblItemTypeEquals = new javax.swing.JLabel(); lblName = new javax.swing.JLabel(); lblNotebook = new javax.swing.JLabel(); lblNotebookContains = new javax.swing.JLabel(); lblRelevance = new javax.swing.JLabel(); lblRelevanceAnd = new javax.swing.JLabel(); lblSize = new javax.swing.JLabel(); lblSizeAnd = new javax.swing.JLabel(); lblStatus = new javax.swing.JLabel(); lblTimesUsed = new javax.swing.JLabel(); lblTimesUsedContains = new javax.swing.JLabel(); lblUpdateDate = new javax.swing.JLabel(); lblUpdateDateAnd = new javax.swing.JLabel(); lblUsages = new javax.swing.JLabel(); lblUsagesContains = new javax.swing.JLabel(); lblVersion = new javax.swing.JLabel(); lblVersionAnd = new javax.swing.JLabel(); panSearch = new javax.swing.JPanel(); spnRelevanceSearch1 = new javax.swing.JSpinner(); spnRelevanceSearch2 = new javax.swing.JSpinner(); txtAtomTypeSearch = new javax.swing.JTextField(); txtClimaxSceneSearch = new javax.swing.JTextField(); txtClockSearch1 = new javax.swing.JTextField(); txtClockSearch2 = new javax.swing.JTextField(); txtContentsSearch = new javax.swing.JTextField(); txtContextSearch = new javax.swing.JTextField(); txtContextSearch1 = new javax.swing.JTextField(); txtCorrespondencesSearch = new javax.swing.JTextField(); txtCreateDateSearch1 = new javax.swing.JTextField(); txtCreateDateSearch2 = new javax.swing.JTextField(); txtFinishDateSearch1 = new javax.swing.JTextField(); txtFinishDateSearch2 = new javax.swing.JTextField(); txtNameSearch = new javax.swing.JTextField(); txtNotebookSearch = new javax.swing.JTextField(); txtSizeSearch1 = new javax.swing.JTextField(); txtSizeSearch2 = new javax.swing.JTextField(); txtTimesUsedSearch = new javax.swing.JTextField(); txtUpdateDateSearch1 = new javax.swing.JTextField(); txtUpdateDateSearch2 = new javax.swing.JTextField(); txtUsagesSearch = new javax.swing.JTextField(); txtVersionSearch1 = new javax.swing.JTextField(); txtVersionSearch2 = new javax.swing.JTextField(); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 100, Short.MAX_VALUE) ); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); panSearch.setBackground(Chicago.COL_BLACK); panSearch.setForeground(Chicago.COL_GHOST); // Events panSearch.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { panSearchMouseClicked(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 1. Name chkIsNameOn.setBackground(Chicago.COL_BLACK); chkIsNameOn.setFont(Chicago.COURIER12); chkIsNameOn.setForeground(Chicago.COL_GHOST); // Events chkIsNameOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsNameOnMouseClicked(evt); } }); lblName.setBackground(Chicago.COL_BLACK); lblName.setFont(Chicago.COURIER12); lblName.setForeground(Chicago.COL_GHOST); lblName.setText("Name"); cboName.setBackground(Chicago.COL_GHOST); cboName.setFont(Chicago.COURIER12); cboName.setForeground(Chicago.COL_BLACK); cboName.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Contains", "Equals", "Is Before", "Is Between", "Is After" })); // Events cboName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboNameActionPerformed(evt); } }); txtNameSearch.setBackground(Chicago.COL_BLACK); txtNameSearch.setFont(Chicago.COURIER12); txtNameSearch.setForeground(Chicago.COL_GHOST); txtNameSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtNameSearch.setDisabledTextColor(Chicago.COL_GHOST); txtNameSearch.setSelectedTextColor(Chicago.COL_BLACK); txtNameSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtNameSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtNameSearchKeyTyped(evt); // public void txtNameSearchKeyTyped(java.awt.event.KeyEvent evt) {} } }); /////////////////////////////////////////////////////////////////////////////////// // 2. Context chkIsContextOn.setBackground(Chicago.COL_BLACK); chkIsContextOn.setFont(Chicago.COURIER12); chkIsContextOn.setForeground(Chicago.COL_GHOST); // Events chkIsContextOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsContextOnMouseClicked(evt); } }); lblContext.setBackground(Chicago.COL_BLACK); lblContext.setFont(Chicago.COURIER12); lblContext.setForeground(Chicago.COL_GHOST); lblContext.setText("Context"); cboContext.setBackground(Chicago.COL_GHOST); cboContext.setFont(Chicago.COURIER12); cboContext.setForeground(Chicago.COL_BLACK); cboContext.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Contains", "Equals", "Is Before", "Is Between", "Is After" })); // Events cboContext.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboContextActionPerformed(evt); // private void cboContextActionPerformed(java.awt.event.ActionEvent evt) { }}); txtContextSearch.setBackground(Chicago.COL_BLACK); txtContextSearch.setFont(Chicago.COURIER12); txtContextSearch.setForeground(Chicago.COL_GHOST); txtContextSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtContextSearch.setDisabledTextColor(Chicago.COL_GHOST); txtContextSearch.setSelectedTextColor(Chicago.COL_BLACK); txtContextSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtContextSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtContextSearchKeyTyped(evt); // public void txtContextSearchKeyTyped(java.awt.event.KeyEvent evt) {} } }); //////////////////////////////////////////////////////////////////////////// // 3. Item Type chkIsItemTypeOn.setBackground(Chicago.COL_BLACK); chkIsItemTypeOn.setFont(Chicago.COURIER12); chkIsItemTypeOn.setForeground(Chicago.COL_GHOST); // Events chkIsItemTypeOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsItemTypeOnMouseClicked(evt); }}); lblItemType.setBackground(Chicago.COL_BLACK); lblItemType.setFont(Chicago.COURIER12); lblItemType.setForeground(Chicago.COL_GHOST); lblItemType.setText("Item Type"); lblItemTypeEquals.setBackground(Chicago.COL_BLACK); lblItemTypeEquals.setFont(Chicago.COURIER12); lblItemTypeEquals.setForeground(Chicago.COL_GHOST); lblItemTypeEquals.setText("Equals"); cboItemTypeSearch.setBackground(Chicago.COL_GHOST); cboItemTypeSearch.setFont(Chicago.COURIER12); cboItemTypeSearch.setForeground(Chicago.COL_BLACK); cboItemTypeSearch.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "b", "p", "e", "s", "a", "x" })); // Events cboItemTypeSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboItemTypeSearchActionPerformed(evt); // private void cboItemTypeSearchActionPerformed(java.awt.event.ActionEvent evt) { }}); ///////////////////////////////////////////////////////////////////////////////////// // 4. Atom Type chkIsAtomTypeOn.setBackground(Chicago.COL_BLACK); chkIsAtomTypeOn.setFont(Chicago.COURIER12); chkIsAtomTypeOn.setForeground(Chicago.COL_GHOST); // Events chkIsAtomTypeOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsAtomTypeOnMouseClicked(evt); }}); lblAtomType.setBackground(Chicago.COL_BLACK); lblAtomType.setFont(Chicago.COURIER12); lblAtomType.setForeground(Chicago.COL_GHOST); lblAtomType.setText("Atom Type"); cboAtomType.setBackground(Chicago.COL_GHOST); cboAtomType.setFont(Chicago.COURIER12); cboAtomType.setForeground(Chicago.COL_BLACK); cboAtomType.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Contains", "Equals", "Is Before", "Is Between", "Is After" })); // Events cboAtomType.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboAtomTypeActionPerformed(evt); // private void cboAtomTypeActionPerformed(java.awt.event.ActionEvent evt) { }}); txtAtomTypeSearch.setBackground(Chicago.COL_BLACK); txtAtomTypeSearch.setFont(Chicago.COURIER12); txtAtomTypeSearch.setForeground(Chicago.COL_GHOST); txtAtomTypeSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtAtomTypeSearch.setDisabledTextColor(Chicago.COL_GHOST); txtAtomTypeSearch.setSelectedTextColor(Chicago.COL_BLACK); txtAtomTypeSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtAtomTypeSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtAtomTypeSearchKeyTyped(evt); // public void txtContextSearchKeyTyped(java.awt.event.KeyEvent evt) {} } }); ///////////////////////////////////////////////////////////////////////////////////// // 5. Contents chkIsContentsOn.setBackground(Chicago.COL_BLACK); chkIsContentsOn.setFont(Chicago.COURIER12); chkIsContentsOn.setForeground(Chicago.COL_GHOST); // Events chkIsContentsOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsContentsOnMouseClicked(evt); }}); lblContents.setBackground(Chicago.COL_BLACK); lblContents.setFont(Chicago.COURIER12); lblContents.setForeground(Chicago.COL_GHOST); lblContents.setText("Contents"); lblContentsContains.setBackground(Chicago.COL_BLACK); lblContentsContains.setFont(Chicago.COURIER12); lblContentsContains.setForeground(Chicago.COL_GHOST); lblContentsContains.setText("Contains"); txtContentsSearch.setBackground(Chicago.COL_BLACK); txtContentsSearch.setFont(Chicago.COURIER12); txtContentsSearch.setForeground(Chicago.COL_GHOST); txtContentsSearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtContentsSearchActionPerformed(evt); }}); txtContentsSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtContentsSearch.setDisabledTextColor(Chicago.COL_GHOST); txtContentsSearch.setSelectedTextColor(Chicago.COL_BLACK); txtContentsSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtContentsSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtContentsSearchKeyTyped(evt); // public void txtContentsSearchKeyTyped(java.awt.event.KeyEvent evt) {} } }); ///////////////////////////////////////////////////////////////////////////////////// // 6. Times Used chkIsTimesUsedOn.setBackground(Chicago.COL_BLACK); chkIsTimesUsedOn.setFont(Chicago.COURIER12); chkIsTimesUsedOn.setForeground(Chicago.COL_GHOST); // Events chkIsTimesUsedOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsTimesUsedOnMouseClicked(evt); }}); lblTimesUsed.setBackground(Chicago.COL_BLACK); lblTimesUsed.setFont(Chicago.COURIER12); lblTimesUsed.setForeground(Chicago.COL_GHOST); lblTimesUsed.setText("Times Used"); lblTimesUsedContains.setBackground(Chicago.COL_BLACK); lblTimesUsedContains.setFont(Chicago.COURIER12); lblTimesUsedContains.setForeground(Chicago.COL_GHOST); lblTimesUsedContains.setText("Contains"); txtTimesUsedSearch.setBackground(Chicago.COL_BLACK); txtTimesUsedSearch.setFont(Chicago.COURIER12); txtTimesUsedSearch.setForeground(Chicago.COL_GHOST); txtTimesUsedSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtTimesUsedSearch.setDisabledTextColor(Chicago.COL_GHOST); txtTimesUsedSearch.setSelectedTextColor(Chicago.COL_BLACK); txtTimesUsedSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtTimesUsedSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtTimesUsedSearchKeyTyped(evt); // public void txtTimesUsedSearchKeyTyped(java.awt.event.KeyEvent evt) {} }}); ///////////////////////////////////////////////////////////////////////////////////// // 7. Climax Scene chkIsClimaxSceneOn.setBackground(Chicago.COL_BLACK); chkIsClimaxSceneOn.setFont(Chicago.COURIER12); chkIsClimaxSceneOn.setForeground(Chicago.COL_GHOST); // Events chkIsClimaxSceneOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsClimaxSceneOnMouseClicked(evt); } }); lblClimaxScene.setBackground(Chicago.COL_BLACK); lblClimaxScene.setFont(Chicago.COURIER12); lblClimaxScene.setForeground(Chicago.COL_GHOST); lblClimaxScene.setText("Climax Scene"); lblClimaxSceneContains.setBackground(Chicago.COL_BLACK); lblClimaxSceneContains.setFont(Chicago.COURIER12); lblClimaxSceneContains.setForeground(Chicago.COL_GHOST); lblClimaxSceneContains.setText("Contains"); txtClimaxSceneSearch.setBackground(Chicago.COL_BLACK); txtClimaxSceneSearch.setFont(Chicago.COURIER12); txtClimaxSceneSearch.setForeground(Chicago.COL_GHOST); txtClimaxSceneSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClimaxSceneSearch.setDisabledTextColor(Chicago.COL_GHOST); txtClimaxSceneSearch.setSelectedTextColor(Chicago.COL_BLACK); txtClimaxSceneSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtClimaxSceneSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtClimaxSceneSearchKeyTyped(evt); // public void txtClimaxSceneSearchKeyTyped(java.awt.event.KeyEvent evt) {} }}); ///////////////////////////////////////////////////////////////////////////////////// // 8. Notebook chkIsNotebookOn.setBackground(Chicago.COL_BLACK); chkIsNotebookOn.setFont(Chicago.COURIER12); chkIsNotebookOn.setForeground(Chicago.COL_GHOST); // Events chkIsNotebookOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsNotebookOnMouseClicked(evt); } }); lblNotebook.setBackground(Chicago.COL_BLACK); lblNotebook.setFont(Chicago.COURIER12); lblNotebook.setForeground(Chicago.COL_GHOST); lblNotebook.setText("Notebook"); lblNotebookContains.setBackground(Chicago.COL_BLACK); lblNotebookContains.setFont(Chicago.COURIER12); lblNotebookContains.setForeground(Chicago.COL_GHOST); lblNotebookContains.setText("Contains"); txtNotebookSearch.setBackground(Chicago.COL_BLACK); txtNotebookSearch.setFont(Chicago.COURIER12); txtNotebookSearch.setForeground(Chicago.COL_GHOST); txtNotebookSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtNotebookSearch.setDisabledTextColor(Chicago.COL_GHOST); txtNotebookSearch.setSelectedTextColor(Chicago.COL_BLACK); txtNotebookSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtNotebookSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtNotebookSearchKeyTyped(evt); // public void txtNotebookSearchKeyTyped(java.awt.event.KeyEvent evt) {} }}); ///////////////////////////////////////////////////////////////////////////////////// // 9. Correspondences chkIsCorrespondencesOn.setBackground(Chicago.COL_BLACK); chkIsCorrespondencesOn.setFont(Chicago.COURIER12); chkIsCorrespondencesOn.setForeground(Chicago.COL_GHOST); // Events chkIsCorrespondencesOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsCorrespondencesOnMouseClicked(evt); }}); lblCorrespondences.setBackground(Chicago.COL_BLACK); lblCorrespondences.setFont(Chicago.COURIER12); lblCorrespondences.setForeground(Chicago.COL_GHOST); lblCorrespondences.setText("Correspondences"); lblCorrespondencesContains.setBackground(Chicago.COL_BLACK); lblCorrespondencesContains.setFont(Chicago.COURIER12); lblCorrespondencesContains.setForeground(Chicago.COL_GHOST); lblCorrespondencesContains.setText("Contains"); txtCorrespondencesSearch.setBackground(Chicago.COL_BLACK); txtCorrespondencesSearch.setFont(Chicago.COURIER12); txtCorrespondencesSearch.setForeground(Chicago.COL_GHOST); txtCorrespondencesSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCorrespondencesSearch.setDisabledTextColor(Chicago.COL_GHOST); txtCorrespondencesSearch.setSelectedTextColor(Chicago.COL_BLACK); txtCorrespondencesSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtCorrespondencesSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCorrespondencesSearchKeyTyped(evt); // private void txtCorrespondencesSearchKeyTyped(java.awt.event.KeyEvent evt) {} }}); ///////////////////////////////////////////////////////////////////////////////////// // 10. Usages chkIsUsagesOn.setBackground(Chicago.COL_BLACK); chkIsUsagesOn.setFont(Chicago.COURIER12); chkIsUsagesOn.setForeground(Chicago.COL_GHOST); // Events chkIsUsagesOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsUsagesOnMouseClicked(evt); }}); lblUsages.setBackground(Chicago.COL_BLACK); lblUsages.setFont(Chicago.COURIER12); lblUsages.setForeground(Chicago.COL_GHOST); lblUsages.setText("Usages"); lblUsagesContains.setBackground(Chicago.COL_BLACK); lblUsagesContains.setFont(Chicago.COURIER12); lblUsagesContains.setForeground(Chicago.COL_GHOST); lblUsagesContains.setText("Contains"); txtUsagesSearch.setBackground(Chicago.COL_BLACK); txtUsagesSearch.setFont(Chicago.COURIER12); txtUsagesSearch.setForeground(Chicago.COL_GHOST); txtUsagesSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUsagesSearch.setDisabledTextColor(Chicago.COL_GHOST); txtUsagesSearch.setSelectedTextColor(Chicago.COL_BLACK); txtUsagesSearch.setSelectionColor(Chicago.COL_WHITE); // Events txtUsagesSearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUsagesSearchKeyTyped(evt); // private void txtUsagesSearchKeyTyped(java.awt.event.KeyEvent evt) {} }}); ///////////////////////////////////////////////////////////////////////////////////// // 11. Relevance chkIsRelevanceOn.setBackground(Chicago.COL_BLACK); chkIsRelevanceOn.setFont(Chicago.COURIER12); chkIsRelevanceOn.setForeground(Chicago.COL_GHOST); // Events chkIsRelevanceOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsRelevanceOnMouseClicked(evt); }}); lblRelevance.setBackground(Chicago.COL_BLACK); lblRelevance.setFont(Chicago.COURIER12); lblRelevance.setForeground(Chicago.COL_GHOST); lblRelevance.setText("Relevance"); cboRelevance.setBackground(Chicago.COL_GHOST); cboRelevance.setFont(Chicago.COURIER12); cboRelevance.setForeground(Chicago.COL_BLACK); cboRelevance.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " =", " <", "< x >", " >" })); // Events cboRelevance.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboRelevanceActionPerformed(evt); }}); spnRelevanceSearch1.setFont(Chicago.COURIER12); spnRelevanceSearch1.setModel(new javax.swing.SpinnerNumberModel(0, 0, 100, 1)); spnRelevanceSearch1.setBackground(Chicago.COL_GHOST); spnRelevanceSearch1.setForeground(Chicago.COL_BLACK); // Events spnRelevanceSearch1.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { utlRedrawInventory(); }}); lblRelevanceAnd.setBackground(Chicago.COL_BLACK); lblRelevanceAnd.setFont(Chicago.COURIER12); lblRelevanceAnd.setForeground(Chicago.COL_GHOST); lblRelevanceAnd.setText("and"); //lblRelevanceAnd.setEnabled(false); spnRelevanceSearch2.setFont(Chicago.COURIER12); spnRelevanceSearch2.setModel(new javax.swing.SpinnerNumberModel(0, 0, 100, 1)); spnRelevanceSearch2.setEnabled(false); spnRelevanceSearch2.setBackground(Chicago.COL_GHOST); spnRelevanceSearch2.setForeground(Chicago.COL_BLACK); // Events spnRelevanceSearch2.addChangeListener(new ChangeListener() { @Override public void stateChanged(ChangeEvent e) { utlRedrawInventory(); }}); ///////////////////////////////////////////////////////////////////////////////////// // 12. Clock chkIsClockOn.setBackground(Chicago.COL_BLACK); chkIsClockOn.setFont(Chicago.COURIER12); chkIsClockOn.setForeground(Chicago.COL_GHOST); // Events chkIsClockOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsClockOnMouseClicked(evt); }}); lblClock.setBackground(Chicago.COL_BLACK); lblClock.setFont(Chicago.COURIER12); lblClock.setForeground(Chicago.COL_GHOST); lblClock.setText("Clock Time"); cboClock.setBackground(Chicago.COL_GHOST); cboClock.setFont(Chicago.COURIER12); cboClock.setForeground(Chicago.COL_BLACK); cboClock.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " =", " <", "< x >", " >" })); // Events cboClock.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboClockActionPerformed(evt); }}); txtClockSearch1.setBackground(Chicago.COL_BLACK); txtClockSearch1.setFont(Chicago.COURIER12); txtClockSearch1.setForeground(Chicago.COL_GHOST); txtClockSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClockSearch1.setDisabledTextColor(Chicago.COL_GHOST); txtClockSearch1.setSelectedTextColor(Chicago.COL_BLACK); txtClockSearch1.setSelectionColor(Chicago.COL_WHITE); // Events txtClockSearch1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtClockSearch1KeyTyped(evt); // private void txtClockSearch1KeyTyped(java.awt.event.KeyEvent evt) {} }}); lblClockAnd.setBackground(Chicago.COL_BLACK); lblClockAnd.setFont(Chicago.COURIER12); lblClockAnd.setForeground(Chicago.COL_GHOST); lblClockAnd.setText("and"); //lblClockAnd.setEnabled(false); txtClockSearch2.setBackground(Chicago.COL_BLACK); txtClockSearch2.setFont(Chicago.COURIER12); txtClockSearch2.setForeground(Chicago.COL_GHOST); txtClockSearch2.setEnabled(false); txtClockSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClockSearch2.setDisabledTextColor(Chicago.COL_GHOST); txtClockSearch2.setSelectedTextColor(Chicago.COL_BLACK); txtClockSearch2.setSelectionColor(Chicago.COL_WHITE); // Events txtClockSearch2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtClockSearch2KeyTyped(evt); // private void txtClockSearch1KeyTyped(java.awt.event.KeyEvent evt) {} }}); ///////////////////////////////////////////////////////////////////////////////////// // 13. Size chkIsSizeOn.setBackground(Chicago.COL_BLACK); chkIsSizeOn.setFont(Chicago.COURIER12); chkIsSizeOn.setForeground(Chicago.COL_GHOST); // Events chkIsSizeOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsSizeOnMouseClicked(evt); }}); lblSize.setBackground(Chicago.COL_BLACK); lblSize.setFont(Chicago.COURIER12); lblSize.setForeground(Chicago.COL_GHOST); lblSize.setText("Size"); cboSize.setBackground(Chicago.COL_GHOST); cboSize.setFont(Chicago.COURIER12); cboSize.setForeground(Chicago.COL_BLACK); cboSize.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " =", " <", "< x >", " >" })); // Events cboSize.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboSizeActionPerformed(evt); }}); txtSizeSearch1.setBackground(Chicago.COL_BLACK); txtSizeSearch1.setFont(Chicago.COURIER12); txtSizeSearch1.setForeground(Chicago.COL_GHOST); txtSizeSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSizeSearch1.setDisabledTextColor(Chicago.COL_GHOST); txtSizeSearch1.setSelectedTextColor(Chicago.COL_BLACK); txtSizeSearch1.setSelectionColor(Chicago.COL_WHITE); // Events txtSizeSearch1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtSizeSearch1KeyTyped(evt); // private void txtClockSearch1KeyTyped(java.awt.event.KeyEvent evt) {} }}); lblSizeAnd.setBackground(Chicago.COL_BLACK); lblSizeAnd.setFont(Chicago.COURIER12); lblSizeAnd.setForeground(Chicago.COL_GHOST); lblSizeAnd.setText("and"); //lblSizeAnd.setEnabled(false); txtSizeSearch2.setBackground(Chicago.COL_BLACK); txtSizeSearch2.setFont(Chicago.COURIER12); txtSizeSearch2.setForeground(Chicago.COL_GHOST); txtSizeSearch2.setEnabled(false); txtSizeSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSizeSearch2.setDisabledTextColor(Chicago.COL_GHOST); txtSizeSearch2.setSelectedTextColor(Chicago.COL_BLACK); txtSizeSearch2.setSelectionColor(Chicago.COL_WHITE); // Events txtSizeSearch2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtClockSearch2KeyTyped(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 14. Version chkIsVersionOn.setBackground(Chicago.COL_BLACK); chkIsVersionOn.setFont(Chicago.COURIER12); chkIsVersionOn.setForeground(Chicago.COL_GHOST); // Events chkIsVersionOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsVersionOnMouseClicked(evt); }}); lblVersion.setBackground(Chicago.COL_BLACK); lblVersion.setFont(Chicago.COURIER12); lblVersion.setForeground(Chicago.COL_GHOST); lblVersion.setText("Version"); cboVersion.setBackground(Chicago.COL_GHOST); cboVersion.setFont(Chicago.COURIER12); cboVersion.setForeground(Chicago.COL_BLACK); cboVersion.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Max Only", " All" })); // Events cboVersion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboVersionActionPerformed(evt); }}); txtVersionSearch1.setBackground(Chicago.COL_BLACK); txtVersionSearch1.setFont(Chicago.COURIER12); txtVersionSearch1.setForeground(Chicago.COL_GHOST); txtVersionSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtVersionSearch1.setDisabledTextColor(Chicago.COL_GHOST); txtVersionSearch1.setSelectedTextColor(Chicago.COL_BLACK); txtVersionSearch1.setSelectionColor(Chicago.COL_WHITE); // Events txtVersionSearch1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtVersionSearch1KeyTyped(evt); }}); lblVersionAnd.setBackground(Chicago.COL_BLACK); lblVersionAnd.setFont(Chicago.COURIER12); lblVersionAnd.setForeground(Chicago.COL_GHOST); lblVersionAnd.setText("and"); //lblVersionAnd.setEnabled(false); txtVersionSearch2.setBackground(Chicago.COL_BLACK); txtVersionSearch2.setFont(Chicago.COURIER12); txtVersionSearch2.setForeground(Chicago.COL_GHOST); txtVersionSearch2.setEnabled(false); txtVersionSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtVersionSearch2.setDisabledTextColor(Chicago.COL_GHOST); txtVersionSearch2.setSelectedTextColor(Chicago.COL_BLACK); txtVersionSearch2.setSelectionColor(Chicago.COL_WHITE); // Events txtVersionSearch2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtVersionSearch2KeyTyped(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 14. Create Date chkIsCreateDateOn.setBackground(Chicago.COL_BLACK); chkIsCreateDateOn.setFont(Chicago.COURIER12); chkIsCreateDateOn.setForeground(Chicago.COL_GHOST); // Events chkIsCreateDateOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsCreateDateOnMouseClicked(evt); } }); lblCreateDate.setBackground(Chicago.COL_BLACK); lblCreateDate.setFont(Chicago.COURIER12); lblCreateDate.setForeground(Chicago.COL_GHOST); lblCreateDate.setText("Create Date"); cboCreateDate.setBackground(Chicago.COL_BLACK); cboCreateDate.setFont(Chicago.COURIER12); cboCreateDate.setForeground(Chicago.COL_GHOST); cboCreateDate.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " =", " <", "< x >", " >" })); // Events cboCreateDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboCreateDateActionPerformed(evt); }}); txtCreateDateSearch1.setBackground(Chicago.COL_BLACK); txtCreateDateSearch1.setFont(Chicago.COURIER12); txtCreateDateSearch1.setForeground(Chicago.COL_GHOST); txtCreateDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCreateDateSearch1.setDisabledTextColor(Chicago.COL_GHOST); txtCreateDateSearch1.setSelectedTextColor(Chicago.COL_BLACK); txtCreateDateSearch1.setSelectionColor(Chicago.COL_WHITE); // Events txtCreateDateSearch1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCreateDateSearch1KeyTyped(evt); }}); lblCreateDateAnd.setBackground(Chicago.COL_BLACK); lblCreateDateAnd.setFont(Chicago.COURIER12); lblCreateDateAnd.setForeground(Chicago.COL_GHOST); lblCreateDateAnd.setText("and"); //lblCreateDateAnd.setEnabled(false); txtCreateDateSearch2.setBackground(Chicago.COL_BLACK); txtCreateDateSearch2.setFont(Chicago.COURIER12); txtCreateDateSearch2.setForeground(Chicago.COL_GHOST); txtCreateDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCreateDateSearch2.setDisabledTextColor(Chicago.COL_GHOST); txtCreateDateSearch2.setSelectedTextColor(Chicago.COL_BLACK); txtCreateDateSearch2.setSelectionColor(Chicago.COL_WHITE); // Events txtCreateDateSearch2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtCreateDateSearch2KeyTyped(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 14. Update Date chkIsUpdateDateOn.setBackground(Chicago.COL_BLACK); chkIsUpdateDateOn.setFont(Chicago.COURIER12); chkIsUpdateDateOn.setForeground(Chicago.COL_GHOST); // Events chkIsUpdateDateOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsUpdateDateOnMouseClicked(evt); }}); lblUpdateDate.setBackground(Chicago.COL_BLACK); lblUpdateDate.setFont(Chicago.COURIER12); lblUpdateDate.setForeground(Chicago.COL_GHOST); lblUpdateDate.setText("Update Date"); cboUpdateDate.setBackground(Chicago.COL_GHOST); cboUpdateDate.setFont(Chicago.COURIER12); cboUpdateDate.setForeground(Chicago.COL_BLACK); cboUpdateDate.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " =", " <", "< x >", " >" })); // Events cboUpdateDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboUpdateDateActionPerformed(evt); }}); txtUpdateDateSearch1.setBackground(Chicago.COL_BLACK); txtUpdateDateSearch1.setFont(Chicago.COURIER12); txtUpdateDateSearch1.setForeground(Chicago.COL_GHOST); txtUpdateDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUpdateDateSearch1.setDisabledTextColor(Chicago.COL_GHOST); txtUpdateDateSearch1.setSelectedTextColor(Chicago.COL_BLACK); txtUpdateDateSearch1.setSelectionColor(Chicago.COL_WHITE); // Events txtUpdateDateSearch1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUpdateDateSearch1KeyTyped(evt); }}); lblUpdateDateAnd.setBackground(Chicago.COL_BLACK); lblUpdateDateAnd.setFont(Chicago.COURIER12); lblUpdateDateAnd.setForeground(Chicago.COL_GHOST); lblUpdateDateAnd.setText("and"); //lblUpdateDateAnd.setEnabled(false); txtUpdateDateSearch2.setBackground(Chicago.COL_BLACK); txtUpdateDateSearch2.setFont(Chicago.COURIER12); txtUpdateDateSearch2.setForeground(Chicago.COL_GHOST); txtUpdateDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUpdateDateSearch2.setDisabledTextColor(Chicago.COL_GHOST); txtUpdateDateSearch2.setSelectedTextColor(Chicago.COL_BLACK); txtUpdateDateSearch2.setSelectionColor(Chicago.COL_WHITE); // Events txtUpdateDateSearch2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtUpdateDateSearch2KeyTyped(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 15. Finish Date chkIsFinishDateOn.setBackground(Chicago.COL_BLACK); chkIsFinishDateOn.setFont(Chicago.COURIER12); chkIsFinishDateOn.setForeground(Chicago.COL_GHOST); // Events chkIsFinishDateOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsFinishDateOnMouseClicked(evt); } }); lblFinishDate.setBackground(Chicago.COL_BLACK); lblFinishDate.setFont(Chicago.COURIER12); lblFinishDate.setForeground(Chicago.COL_GHOST); lblFinishDate.setText("Finish Date"); cboFinishDate.setBackground(Chicago.COL_GHOST); cboFinishDate.setFont(Chicago.COURIER12); cboFinishDate.setForeground(Chicago.COL_BLACK); cboFinishDate.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { " =", " <", "< x >", " >" })); // Events cboFinishDate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboFinishDateActionPerformed(evt); }}); txtFinishDateSearch1.setBackground(Chicago.COL_BLACK); txtFinishDateSearch1.setFont(Chicago.COURIER12); txtFinishDateSearch1.setForeground(Chicago.COL_GHOST); txtFinishDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtFinishDateSearch1.setDisabledTextColor(Chicago.COL_GHOST); txtFinishDateSearch1.setSelectedTextColor(Chicago.COL_BLACK); txtFinishDateSearch1.setSelectionColor(Chicago.COL_WHITE); // Events txtFinishDateSearch1.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtFinishDateSearch1KeyTyped(evt); }}); lblFinishDateAnd.setBackground(Chicago.COL_BLACK); lblFinishDateAnd.setFont(Chicago.COURIER12); lblFinishDateAnd.setForeground(Chicago.COL_GHOST); lblFinishDateAnd.setText("and"); //lblFinishDateAnd.setEnabled(false); txtFinishDateSearch2.setBackground(Chicago.COL_BLACK); txtFinishDateSearch2.setFont(Chicago.COURIER12); txtFinishDateSearch2.setForeground(Chicago.COL_GHOST); txtFinishDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtFinishDateSearch2.setDisabledTextColor(Chicago.COL_GHOST); txtFinishDateSearch2.setSelectedTextColor(Chicago.COL_BLACK); txtFinishDateSearch2.setSelectionColor(Chicago.COL_WHITE); // Events txtFinishDateSearch2.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtFinishDateSearch2KeyTyped(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 16. Deleted chkIsDeletedOn.setBackground(Chicago.COL_BLACK); chkIsDeletedOn.setFont(Chicago.COURIER12); chkIsDeletedOn.setForeground(Chicago.COL_GHOST); // Events chkIsDeletedOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsDeletedOnMouseClicked(evt); } }); lblDeleted.setBackground(Chicago.COL_BLACK); lblDeleted.setFont(Chicago.COURIER12); lblDeleted.setForeground(Chicago.COL_GHOST); lblDeleted.setText("Deleted"); cboDeleted.setBackground(Chicago.COL_GHOST); cboDeleted.setFont(Chicago.COURIER12); cboDeleted.setForeground(Chicago.COL_BLACK); cboDeleted.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "is not deleted", "is deleted" })); // Events cboDeleted.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboDeletedActionPerformed(evt); }}); ///////////////////////////////////////////////////////////////////////////////////// // 17. Status chkIsStatusOn.setBackground(Chicago.COL_BLACK); chkIsStatusOn.setFont(Chicago.COURIER12); chkIsStatusOn.setForeground(Chicago.COL_GHOST); // Events chkIsStatusOn.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { chkIsStatusOnMouseClicked(evt); } }); lblStatus.setBackground(Chicago.COL_BLACK); lblStatus.setFont(Chicago.COURIER12); lblStatus.setForeground(Chicago.COL_GHOST); lblStatus.setText("Status"); cboStatus.setBackground(Chicago.COL_GHOST); cboStatus.setFont(Chicago.COURIER12); cboStatus.setForeground(Chicago.COL_BLACK); cboStatus.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "00-Not Started", "10-Drafting", "20-In Draft Review", "30-In Progress", "40-In Final Review", "50-In Rewrite", "60-In Rewrite Review", "90-Reviews Complete", "99-Complete" })); cboStatus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboStatusActionPerformed(evt); }}); // The fucking list box lstInventory.setBackground(Chicago.COL_BLACK); lstInventory.setFont(Chicago.COURIER12); lstInventory.setForeground(Chicago.COL_GHOST); lstInventory.setModel(new javax.swing.AbstractListModel() { String[] strings = { "" }; public int getSize() { return strings.length; } public String getElementAt(int i) { return strings[i]; } }); lstInventory.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lstInventoryMouseClicked(evt); } }); jScrollPane1.setViewportView(lstInventory); javax.swing.GroupLayout panSearchLayout = new javax.swing.GroupLayout(panSearch); panSearch.setLayout(panSearchLayout); panSearchLayout.setHorizontalGroup( panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchLayout.createSequentialGroup() .addGap(24, 24, 24) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsContentsOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblContents)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsDeletedOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblDeleted)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsFinishDateOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblFinishDate)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsUpdateDateOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblUpdateDate)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsCreateDateOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblCreateDate)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsVersionOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblVersion)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsSizeOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblSize)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsClockOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblClock)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsRelevanceOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblRelevance)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsNameOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblName)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsContextOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblContext)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsItemTypeOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblItemType)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsAtomTypeOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblAtomType)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsTimesUsedOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblTimesUsed)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsClimaxSceneOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblClimaxScene)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsNotebookOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblNotebook)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsCorrespondencesOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblCorrespondences)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsUsagesOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblUsages)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(chkIsStatusOn) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lblStatus))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(cboStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboDeleted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboUpdateDate, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboCreateDate, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboVersion, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboSize, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboClock, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboRelevance, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblUsagesContains) .addComponent(lblCorrespondencesContains) .addComponent(lblNotebookContains) .addComponent(lblClimaxSceneContains) .addComponent(lblTimesUsedContains) .addComponent(lblContentsContains) .addComponent(cboAtomType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblItemTypeEquals) .addComponent(cboContext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(txtUpdateDateSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(94, 94, 94) .addComponent(txtCreateDateSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 102, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(spnRelevanceSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtNameSearch) .addComponent(txtContextSearch) .addComponent(txtAtomTypeSearch) .addComponent(txtContentsSearch) .addComponent(txtTimesUsedSearch) .addComponent(txtClimaxSceneSearch) .addComponent(txtNotebookSearch) .addComponent(txtCorrespondencesSearch) .addComponent(txtUsagesSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE) .addComponent(txtClockSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtSizeSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtVersionSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(panSearchLayout.createSequentialGroup() .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblUpdateDateAnd) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(panSearchLayout.createSequentialGroup() .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cboItemTypeSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtCreateDateSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblCreateDateAnd)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panSearchLayout.createSequentialGroup() .addComponent(txtVersionSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblVersionAnd)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panSearchLayout.createSequentialGroup() .addComponent(txtSizeSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblSizeAnd)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panSearchLayout.createSequentialGroup() .addComponent(txtClockSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(lblClockAnd)) .addGroup(panSearchLayout.createSequentialGroup() .addComponent(spnRelevanceSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(69, 69, 69) .addComponent(lblRelevanceAnd))) .addComponent(lblFinishDateAnd)) .addComponent(txtFinishDateSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtFinishDateSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtUpdateDateSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(36, 36, 36) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(20, Short.MAX_VALUE)) ); panSearchLayout.setVerticalGroup( panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchLayout.createSequentialGroup() .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(panSearchLayout.createSequentialGroup() .addGap(11, 11, 11) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(txtNameSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblName) .addComponent(chkIsNameOn)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(lblContext) .addComponent(cboContext, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chkIsContextOn) .addComponent(txtContextSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(19, 19, 19) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(lblItemTypeEquals) .addComponent(lblItemType) .addComponent(chkIsItemTypeOn) .addComponent(cboItemTypeSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(panSearchLayout.createSequentialGroup() .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(chkIsAtomTypeOn) .addComponent(lblAtomType) .addComponent(cboAtomType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtAtomTypeSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER) .addComponent(lblContentsContains) .addComponent(lblContents) .addComponent(chkIsContentsOn) .addComponent(txtContentsSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsTimesUsedOn) .addComponent(lblTimesUsed) .addComponent(lblTimesUsedContains) .addComponent(txtTimesUsedSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsClimaxSceneOn) .addComponent(lblClimaxScene) .addComponent(lblClimaxSceneContains) .addComponent(txtClimaxSceneSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsNotebookOn) .addComponent(lblNotebook) .addComponent(lblNotebookContains) .addComponent(txtNotebookSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsCorrespondencesOn) .addComponent(lblCorrespondences) .addComponent(lblCorrespondencesContains) .addComponent(txtCorrespondencesSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsUsagesOn) .addComponent(lblUsages) .addComponent(lblUsagesContains) .addComponent(txtUsagesSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsRelevanceOn) .addComponent(lblRelevance) .addComponent(cboRelevance, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(spnRelevanceSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblRelevanceAnd) .addComponent(spnRelevanceSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsClockOn) .addComponent(lblClock) .addComponent(cboClock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtClockSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblClockAnd) .addComponent(txtClockSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsSizeOn) .addComponent(lblSize) .addComponent(cboSize, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtSizeSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblSizeAnd))) .addComponent(txtSizeSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(20, 20, 20) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsVersionOn) .addComponent(lblVersion) .addComponent(cboVersion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtVersionSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblVersionAnd) .addComponent(txtVersionSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsCreateDateOn) .addComponent(lblCreateDate) .addComponent(cboCreateDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtCreateDateSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblCreateDateAnd) .addComponent(txtCreateDateSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsUpdateDateOn) .addComponent(lblUpdateDate) .addComponent(cboUpdateDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtUpdateDateSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblUpdateDateAnd) .addComponent(txtUpdateDateSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsFinishDateOn) .addComponent(lblFinishDate) .addComponent(cboFinishDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtFinishDateSearch1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lblFinishDateAnd) .addComponent(txtFinishDateSearch2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsDeletedOn) .addComponent(lblDeleted) .addComponent(cboDeleted, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(panSearchLayout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 674, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(panSearchLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(chkIsStatusOn) .addComponent(lblStatus) .addComponent(cboStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(31, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(panSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(panSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 6, Short.MAX_VALUE)) ); pack(); } /////////////////////////////////////////////////////////////////////////// //////////////// EVENT HANDLERS //////////////// /////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// //////////// NAME private void chkIsNameOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsNameOn.isSelected()) { System.out.println("Enabling name search..."); cboName.setEnabled(true); lblName.setForeground(Chicago.COL_WHITE); lblName.setEnabled(true); txtNameSearch.setEnabled(true); txtNameSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); } else { cboName.setEnabled(false); lblName.setForeground(Chicago.COL_GHOST); lblName.setEnabled(true); txtNameSearch.setEnabled(false); txtNameSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); } utlRedrawInventory(); } private void cboNameActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtNameSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// CONTEXT private void chkIsContextOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsContextOn.isSelected()) { cboContext.setEnabled(true); lblContext.setForeground(Chicago.COL_WHITE); lblContext.setEnabled(true); txtContextSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtContextSearch.setEnabled(true); } else { cboContext.setEnabled(false); lblContext.setForeground(Chicago.COL_GHOST); lblContext.setEnabled(true); txtContextSearch.setEnabled(false); txtContextSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); } } private void cboContextActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtContextSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// ITEM TYPE private void chkIsItemTypeOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsItemTypeOn.isSelected()) { lblItemType.setForeground(Chicago.COL_WHITE); lblItemType.setEnabled(true); lblItemTypeEquals.setForeground(Chicago.COL_WHITE); lblItemTypeEquals.setEnabled(true); cboItemTypeSearch.setEnabled(true); } else { lblItemType.setForeground(Chicago.COL_GHOST); lblItemType.setEnabled(true); lblItemTypeEquals.setForeground(Chicago.COL_GHOST); lblItemTypeEquals.setEnabled(true); cboItemTypeSearch.setEnabled(false); } } private void cboItemTypeSearchActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// ATOM TYPE private void chkIsAtomTypeOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsAtomTypeOn.isSelected()) { cboAtomType.setEnabled(true); lblAtomType.setForeground(Chicago.COL_WHITE); lblAtomType.setEnabled(true); txtAtomTypeSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtAtomTypeSearch.setEnabled(true); } else { cboAtomType.setEnabled(false); lblAtomType.setForeground(Chicago.COL_GHOST); lblAtomType.setEnabled(true); txtAtomTypeSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtAtomTypeSearch.setEnabled(false); } } private void cboAtomTypeActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtAtomTypeSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// CONTENTS private void chkIsContentsOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsContentsOn.isSelected()) { txtContentsSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); lblContents.setForeground(Chicago.COL_WHITE); lblContents.setEnabled(true); lblContentsContains.setEnabled(true); lblContentsContains.setForeground(Chicago.COL_WHITE); txtContentsSearch.setEnabled(true); } else { txtContentsSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lblContents.setForeground(Chicago.COL_GHOST); lblContents.setEnabled(true); lblContentsContains.setForeground(Chicago.COL_GHOST); lblContentsContains.setEnabled(true); txtContentsSearch.setEnabled(false); } } private void txtContentsSearchActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtContentsSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// TIMES USED private void chkIsTimesUsedOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsTimesUsedOn.isSelected()) { txtTimesUsedSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); lblTimesUsed.setForeground(Chicago.COL_WHITE); lblTimesUsed.setEnabled(true); lblTimesUsedContains.setForeground(Chicago.COL_WHITE); lblTimesUsedContains.setEnabled(true); txtTimesUsedSearch.setEnabled(true); } else { txtTimesUsedSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lblTimesUsed.setForeground(Chicago.COL_GHOST); lblTimesUsed.setEnabled(true); lblTimesUsedContains.setForeground(Chicago.COL_GHOST); lblTimesUsedContains.setEnabled(true); txtTimesUsedSearch.setEnabled(false); } } private void txtTimesUsedSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// CLIMAX SCENE private void chkIsClimaxSceneOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsClimaxSceneOn.isSelected()) { txtClimaxSceneSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); lblClimaxScene.setForeground(Chicago.COL_WHITE); lblClimaxScene.setEnabled(true); lblClimaxSceneContains.setForeground(Chicago.COL_WHITE); lblClimaxSceneContains.setEnabled(true); txtClimaxSceneSearch.setEnabled(true); } else { txtClimaxSceneSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lblClimaxScene.setForeground(Chicago.COL_GHOST); lblClimaxScene.setEnabled(true); lblClimaxSceneContains.setForeground(Chicago.COL_GHOST); lblClimaxSceneContains.setEnabled(true); txtClimaxSceneSearch.setEnabled(false); } } private void txtClimaxSceneSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// NOTEBOOK private void chkIsNotebookOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsNotebookOn.isSelected()) { txtNotebookSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); lblNotebook.setForeground(Chicago.COL_WHITE); lblNotebook.setEnabled(true); lblNotebookContains.setForeground(Chicago.COL_WHITE); lblNotebookContains.setEnabled(true); txtNotebookSearch.setEnabled(true); } else { txtNotebookSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lblNotebook.setForeground(Chicago.COL_GHOST); lblNotebook.setEnabled(true); lblNotebookContains.setForeground(Chicago.COL_GHOST); lblNotebookContains.setEnabled(true); txtNotebookSearch.setEnabled(false); } } private void txtNotebookSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// CORRESPONDENCES private void chkIsCorrespondencesOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsCorrespondencesOn.isSelected()) { txtCorrespondencesSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); lblCorrespondences.setForeground(Chicago.COL_WHITE); lblCorrespondences.setEnabled(true); lblCorrespondencesContains.setForeground(Chicago.COL_WHITE); lblCorrespondencesContains.setEnabled(true); txtCorrespondencesSearch.setEnabled(true); } else { txtCorrespondencesSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lblCorrespondences.setForeground(Chicago.COL_GHOST); lblCorrespondences.setEnabled(true); lblCorrespondencesContains.setForeground(Chicago.COL_GHOST); lblCorrespondencesContains.setEnabled(true); txtCorrespondencesSearch.setEnabled(false); } } private void txtCorrespondencesSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// USAGES private void chkIsUsagesOnMouseClicked(java.awt.event.MouseEvent evt) { if (chkIsUsagesOn.isSelected()) { txtUsagesSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); lblUsages.setForeground(Chicago.COL_WHITE); lblUsages.setEnabled(true); lblUsagesContains.setForeground(Chicago.COL_WHITE); lblUsagesContains.setEnabled(true); txtUsagesSearch.setEnabled(true); } else { txtUsagesSearch.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); lblUsages.setForeground(Chicago.COL_GHOST); lblUsages.setEnabled(true); lblUsagesContains.setForeground(Chicago.COL_GHOST); lblUsagesContains.setEnabled(true); txtUsagesSearch.setEnabled(false); } } private void txtUsagesSearchKeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } /////////////////////////////////////////////////////////////////////////// //////////// RELEVANCE private void chkIsRelevanceOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsRelevanceOn.isSelected()) { cboRelevance.setEnabled(true); lblRelevance.setForeground(Chicago.COL_WHITE); lblRelevance.setEnabled(true); lblRelevanceAnd.setVisible(true); lblRelevanceAnd.setForeground(Chicago.COL_WHITE); lblRelevanceAnd.setEnabled(true); spnRelevanceSearch1.setVisible(true); spnRelevanceSearch2.setVisible(true); spnRelevanceSearch1.setEnabled(true); spnRelevanceSearch2.setEnabled(true); } else { cboRelevance.setEnabled(false); lblRelevance.setEnabled(true); lblRelevance.setForeground(Chicago.COL_GHOST); lblRelevanceAnd.setForeground(Chicago.COL_GHOST); lblRelevanceAnd.setEnabled(true); //lblRelevanceAnd.setVisible(false); spnRelevanceSearch1.setEnabled(false); spnRelevanceSearch2.setEnabled(false); //spnRelevanceSearch1.setVisible(false); //spnRelevanceSearch2.setVisible(false); } } private void cboRelevanceActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } // NOTE, LIKE ALL FUCKING UI ITEMS ON THE SCREEN, THIS CONTROL HAS // A DIFFERENT WAY OF BEHAVING COMPARED TO EVERYTHING ELSE I'VE USED // THE SPINNERS SET THEIR CHANGE LISTENER INSIDE THE METHOD THAT DEFINES THE LISTENER // THUS, THERE'S NO CODE HERE //////////// CLOCK private void chkIsClockOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsClockOn.isSelected()) { cboClock.setEnabled(true); lblClock.setForeground(Chicago.COL_WHITE); lblClock.setEnabled(true); txtClockSearch1.setEnabled(true); txtClockSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtClockSearch2.setEnabled(true); txtClockSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); } else { cboClock.setEnabled(false); //lblClock.setEnabled(false); lblClock.setForeground(Chicago.COL_GHOST); txtClockSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClockSearch1.setEnabled(false); txtClockSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtClockSearch2.setEnabled(false); } } private void cboClockActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtClockSearch1KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } private void txtClockSearch2KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } //////////// SIZE private void chkIsSizeOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsSizeOn.isSelected()) { cboSize.setEnabled(true); lblSize.setForeground(Chicago.COL_WHITE); lblSize.setEnabled(true); txtSizeSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtSizeSearch1.setEnabled(true); txtSizeSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtSizeSearch2.setEnabled(true); } else { cboSize.setEnabled(false); lblSize.setForeground(Chicago.COL_GHOST); lblSize.setEnabled(true); txtSizeSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSizeSearch1.setEnabled(false); txtSizeSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtSizeSearch2.setEnabled(false); } } private void cboSizeActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtSizeSearch1KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } private void txtSizeSearch2KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } //////////// VERSION private void chkIsVersionOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsVersionOn.isSelected()) { cboVersion.setEnabled(true); lblVersion.setForeground(Chicago.COL_WHITE); lblVersion.setEnabled(true); txtVersionSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtVersionSearch1.setEnabled(true); txtVersionSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtVersionSearch2.setEnabled(true); } else { cboVersion.setEnabled(false); lblVersion.setForeground(Chicago.COL_GHOST); lblVersion.setEnabled(true); txtVersionSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtVersionSearch1.setEnabled(false); txtVersionSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtVersionSearch2.setEnabled(false); } } private void cboVersionActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtVersionSearch1KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } private void txtVersionSearch2KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } //////////// CREATE DATE private void chkIsCreateDateOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsCreateDateOn.isSelected()) { cboCreateDate.setEnabled(true); lblCreateDate.setForeground(Chicago.COL_WHITE); lblCreateDate.setEnabled(true); txtCreateDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtCreateDateSearch1.setEnabled(true); txtCreateDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtCreateDateSearch2.setEnabled(true); } else { cboCreateDate.setEnabled(false); lblCreateDate.setForeground(Chicago.COL_GHOST); lblCreateDate.setEnabled(true); txtCreateDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCreateDateSearch1.setEnabled(false); txtCreateDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtCreateDateSearch2.setEnabled(false); } } private void cboCreateDateActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtCreateDateSearch1KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } private void txtCreateDateSearch2KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } //////////// UPDATE DATE private void chkIsUpdateDateOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsUpdateDateOn.isSelected()) { cboUpdateDate.setEnabled(true); lblUpdateDate.setForeground(Chicago.COL_WHITE); lblUpdateDate.setEnabled(true); txtUpdateDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtUpdateDateSearch1.setEnabled(true); txtUpdateDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtUpdateDateSearch2.setEnabled(true); } else { cboUpdateDate.setEnabled(false); lblUpdateDate.setForeground(Chicago.COL_GHOST); lblUpdateDate.setEnabled(true); txtUpdateDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUpdateDateSearch1.setEnabled(false); txtUpdateDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtUpdateDateSearch2.setEnabled(false); } } private void cboUpdateDateActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtUpdateDateSearch1KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } private void txtUpdateDateSearch2KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } //////////// FINISH DATE private void chkIsFinishDateOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsFinishDateOn.isSelected()) { cboFinishDate.setEnabled(true); lblFinishDate.setForeground(Chicago.COL_WHITE); lblFinishDate.setEnabled(true); txtFinishDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtFinishDateSearch1.setEnabled(true); txtFinishDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_WHITE)); txtFinishDateSearch2.setEnabled(true); } else { cboFinishDate.setEnabled(false); lblFinishDate.setForeground(Chicago.COL_GHOST); lblFinishDate.setEnabled(true); txtFinishDateSearch1.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtFinishDateSearch1.setEnabled(false); txtFinishDateSearch2.setBorder(javax.swing.BorderFactory.createLineBorder(Chicago.COL_GHOST)); txtFinishDateSearch2.setEnabled(false); } } private void cboFinishDateActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } private void txtFinishDateSearch1KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } private void txtFinishDateSearch2KeyTyped(java.awt.event.KeyEvent evt) { utlRedrawInventory(); } //////////// DELETED private void chkIsDeletedOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsDeletedOn.isSelected()) { cboDeleted.setEnabled(true); lblDeleted.setForeground(Chicago.COL_WHITE); lblDeleted.setEnabled(true); } else { cboDeleted.setEnabled(false); lblDeleted.setForeground(Chicago.COL_GHOST); lblDeleted.setEnabled(true); } } private void cboDeletedActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } //////////// STATUS private void chkIsStatusOnMouseClicked(java.awt.event.MouseEvent evt) { if (this.chkIsStatusOn.isSelected()) { cboStatus.setEnabled(true); lblStatus.setForeground(Chicago.COL_WHITE); lblStatus.setEnabled(true); } else { cboStatus.setEnabled(false); lblStatus.setForeground(Chicago.COL_GHOST); lblStatus.setEnabled(true); } } private void cboStatusActionPerformed(java.awt.event.ActionEvent evt) { utlRedrawInventory(); } //panSearchMouseClicked private void panSearchMouseClicked(java.awt.event.MouseEvent evt) { ////////////////////////// Rite Button ////////////////////////////// if ( SwingUtilities.isRightMouseButton(evt) ) { setDefaultUI(); utlRedrawInventory(); } } private void lstInventoryMouseClicked(java.awt.event.MouseEvent evt) { int iTheIndexForTheSelectedItemIs = Chicago.utlDecodeListStringToIndex(lstInventory.getSelectedValue()); if (evt.getClickCount() == 2) { // Launch the Item Screen ItemScreen scnItem = new ItemScreen(new javax.swing.JFrame(), false); scnItem.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { scnItem.dispose(); }}); if ( iTheIndexForTheSelectedItemIs > -1 ) scnItem.setAllMyShitToX(iTheIndexForTheSelectedItemIs); else System.out.println("****ERROR OPENING EDIT SCREEN***"); scnItem.utlRunTask(); scnItem.utlStartAStopwatch(true); scnItem.utlRunTask(); scnItem.setMyFunction(Chicago.SCREEN_EDIT); scnItem.setVisible(true); } ////////////////////////// Rite Button ////////////////////////////// if ( SwingUtilities.isRightMouseButton(evt) ) { // Launch the Compare Screen ComparisonScreen scnComparison = new ComparisonScreen(new javax.swing.JFrame(), false); scnComparison.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { scnComparison.dispose(); }}); scnComparison.setSomethingToX(iTheIndexForTheSelectedItemIs, 2); scnComparison.utlStartStopwatch(); scnComparison.setVisible(true); } } /** * @param args the command line arguments */ public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; }}} catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(SearchScreen.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(SearchScreen.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(SearchScreen.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(SearchScreen.class.getName()). log(java.util.logging.Level.SEVERE, null, ex); } java.awt.EventQueue.invokeLater(new Runnable() { public void run() { SearchScreen dialog = new SearchScreen(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); }}); dialog.setVisible(true); }}); } public void setDefaultUI() { chkIsAtomTypeOn.setEnabled(true); chkIsAtomTypeOn.setSelected(false); chkIsClimaxSceneOn.setEnabled(true); chkIsClimaxSceneOn.setSelected(false); chkIsClockOn.setEnabled(true); chkIsClockOn.setSelected(false); chkIsContentsOn.setEnabled(true); chkIsContentsOn.setSelected(false); chkIsContextOn.setEnabled(true); chkIsContextOn.setSelected(false); chkIsCorrespondencesOn.setEnabled(true); chkIsCorrespondencesOn.setSelected(false); chkIsCreateDateOn.setEnabled(true); chkIsCreateDateOn.setSelected(false); chkIsDeletedOn.setEnabled(true); chkIsDeletedOn.setSelected(false); chkIsFinishDateOn.setEnabled(true); chkIsFinishDateOn.setSelected(false); chkIsItemTypeOn.setEnabled(true); chkIsItemTypeOn.setSelected(false); chkIsNameOn.setEnabled(true); chkIsNameOn.setSelected(false); chkIsNotebookOn.setEnabled(true); chkIsNotebookOn.setSelected(false); chkIsRelevanceOn.setEnabled(true); chkIsRelevanceOn.setSelected(false); chkIsSizeOn.setEnabled(true); chkIsSizeOn.setSelected(false); chkIsStatusOn.setEnabled(true); chkIsStatusOn.setSelected(false); chkIsTimesUsedOn.setEnabled(true); chkIsTimesUsedOn.setSelected(false); chkIsUpdateDateOn.setEnabled(true); chkIsUpdateDateOn.setSelected(false); chkIsUsagesOn.setEnabled(true); chkIsUsagesOn.setSelected(false); chkIsVersionOn.setEnabled(true); chkIsVersionOn.setSelected(false); /* lblClimaxScene.setVisible(false); lblClockAnd.setVisible(false); lblContents.setVisible(false); lblCorrespondences.setVisible(false); lblCreateDateAnd.setVisible(false); lblFinishDateAnd.setVisible(false); lblItemType.setVisible(false); lblNotebook.setVisible(false); lblRelevanceAnd.setVisible(false); lblSizeAnd.setVisible(false); lblTimesUsed.setVisible(false); lblUpdateDateAnd.setVisible(false); lblUsages.setVisible(false); lblVersionAnd.setVisible(false); */ txtAtomTypeSearch.setEnabled(false); txtAtomTypeSearch.setText(""); //txtAtomTypeSearch.setVisible(false); txtClimaxSceneSearch.setEnabled(false); txtClimaxSceneSearch.setText(""); //txtClimaxSceneSearch.setVisible(false); txtClockSearch1.setEnabled(false); txtClockSearch1.setText(""); //txtClockSearch1.setVisible(false); txtClockSearch2.setEnabled(false); txtClockSearch2.setText(""); //txtClockSearch2.setVisible(false); txtContentsSearch.setEnabled(false); txtContentsSearch.setText(""); //txtContentsSearch.setVisible(false); txtContextSearch.setEnabled(false); txtContextSearch.setText(""); //txtContextSearch.setVisible(false); //txtContextSearch1.setEnabled(false); //txtContextSearch1.setText(""); txtCorrespondencesSearch.setEnabled(false); txtCorrespondencesSearch.setText(""); //txtCorrespondencesSearch.setVisible(false); txtCreateDateSearch1.setEnabled(false); txtCreateDateSearch1.setText(""); //txtCreateDateSearch1.setVisible(false); txtCreateDateSearch2.setEnabled(false); txtCreateDateSearch2.setText(""); //txtCreateDateSearch2.setVisible(false); txtFinishDateSearch1.setEnabled(false); txtFinishDateSearch1.setText(""); //txtFinishDateSearch1.setVisible(false); txtFinishDateSearch2.setEnabled(false); txtFinishDateSearch2.setText(""); //txtFinishDateSearch2.setVisible(false); txtNameSearch.setEnabled(false); txtNameSearch.setText(""); //txtNameSearch.setVisible(false); txtNotebookSearch.setEnabled(false); txtNotebookSearch.setText(""); //txtNotebookSearch.setVisible(false); txtSizeSearch1.setEnabled(false); txtSizeSearch1.setText(""); //txtSizeSearch1.setVisible(false); txtSizeSearch2.setEnabled(false); txtSizeSearch2.setText(""); //txtSizeSearch2.setVisible(false); txtTimesUsedSearch.setEnabled(false); txtTimesUsedSearch.setText(""); //txtTimesUsedSearch.setVisible(false); txtUpdateDateSearch1.setEnabled(false); txtUpdateDateSearch1.setText(""); //txtUpdateDateSearch1.setVisible(false); txtUpdateDateSearch2.setEnabled(false); txtUpdateDateSearch2.setText(""); //txtUpdateDateSearch2.setVisible(false); txtUsagesSearch.setEnabled(false); txtUsagesSearch.setText(""); //txtUsagesSearch.setVisible(false); txtVersionSearch1.setEnabled(false); txtVersionSearch1.setText(""); //txtVersionSearch1.setVisible(false); txtVersionSearch2.setEnabled(false); txtVersionSearch2.setText(""); //txtVersionSearch2.setVisible(false); cboAtomType.setEnabled(false); //cboAtomType.setVisible(false); cboClock.setEnabled(false); //cboClock.setVisible(false); cboContext.setEnabled(false); cboCreateDate.setEnabled(false); //cboCreateDate.setVisible(false); cboDeleted.setEnabled(false); //cboDeleted.setVisible(false); cboFinishDate.setEnabled(false); //cboFinishDate.setVisible(false); cboItemTypeSearch.setEnabled(false); //cboItemTypeSearch.setVisible(false); cboName.setEnabled(false); cboRelevance.setEnabled(false); //cboRelevance.setVisible(false); cboSize.setEnabled(false); cboStatus.setEnabled(false); //cboStatus.setVisible(false); cboUpdateDate.setEnabled(false); //cboUpdateDate.setVisible(false); cboVersion.setEnabled(false); //cboVersion.setVisible(false); spnRelevanceSearch1.setEnabled(false); spnRelevanceSearch2.setEnabled(false); } ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // I'M REALLY FUCKING IMPORTANT // I PERFORM THE FILTERING FOR THE ITEMS LIST AND THEN // I DO THE SIMPLE SHIT LIKE REDRAWING. ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// public void utlRedrawInventory() { int iRowCount = Chicago.iRowCount; Integer[] arrRows = new Integer[iRowCount+1]; for (int iCount=1; iCount <= iRowCount; iCount++) { arrRows[iCount] = 1; } ///////////////////////////////////////////////////////////////////////////////////// // 1. Name if (chkIsNameOn.isSelected()) { // enable what should be visible: cboName.setEnabled(true); txtNameSearch.setEnabled(true); // Perform the name search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtNameSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (cboName.getSelectedItem().toString().equals("Contains")) if (!Chicago.sObjModel[iCount][Chicago.cnName].contains(txtNameSearch.getText())) arrRows[iCount] = 0; if (cboName.getSelectedItem().toString().equals("Does Not Contain")) if (Chicago.sObjModel[iCount][Chicago.cnName].contains(txtNameSearch.getText())) arrRows[iCount] = 0; if (cboName.getSelectedItem().toString().equals("Equals")) if (!Chicago.sObjModel[iCount][Chicago.cnName].equals(txtNameSearch.getText())) arrRows[iCount] = 0; if (cboName.getSelectedItem().toString().equals("Is Before")) if (!Chicago.sObjModel[iCount][Chicago.cnName].equals(txtNameSearch.getText())) arrRows[iCount] = 0; if (cboName.getSelectedItem().toString().equals("Is After")) if (!Chicago.sObjModel[iCount][Chicago.cnName].equals(txtNameSearch.getText())) arrRows[iCount] = 0; }}} else { // hide what should disappear cboName.setEnabled(false); txtNameSearch.setEnabled(false); } ///////////////////////////////////////////////////////////////////////////////////// // 2. Context if (chkIsContextOn.isSelected()) { // Perform the context search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtContextSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (cboContext.getSelectedItem().toString().equals("Contains")) if (!Chicago.sObjModel[iCount][Chicago.cnContext].contains(txtContextSearch.getText())) arrRows[iCount] = 0; if (cboContext.getSelectedItem().toString().equals("Does Not Contain")) if (Chicago.sObjModel[iCount][Chicago.cnContext].contains(txtContextSearch.getText())) arrRows[iCount] = 0; if (cboContext.getSelectedItem().toString().equals("Equals")) if (!Chicago.sObjModel[iCount][Chicago.cnContext].equals(txtContextSearch.getText())) arrRows[iCount] = 0; if (cboContext.getSelectedItem().toString().equals("Is Before")) if (!Chicago.sObjModel[iCount][Chicago.cnContext].equals(txtContextSearch.getText())) arrRows[iCount] = 0; if (cboContext.getSelectedItem().toString().equals("Is After")) if (!Chicago.sObjModel[iCount][Chicago.cnContext].equals(txtContextSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 3. Item Type if (chkIsItemTypeOn.isSelected()) { // Perform the item stype search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !this.cboItemTypeSearch.getSelectedItem().toString().equals("")) { if (!Chicago.sObjModel[iCount][Chicago .cnItemType].equals(cboItemTypeSearch.getSelectedItem().toString())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 4. Atom Type if (chkIsAtomTypeOn.isSelected()) { for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtAtomTypeSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (cboAtomType.getSelectedItem().toString().equals("Contains")) if (!Chicago.sObjModel[iCount][Chicago.cnAtomType].contains(txtAtomTypeSearch.getText())) arrRows[iCount] = 0; if (cboAtomType.getSelectedItem().toString().equals("Does Not Contain")) if (Chicago.sObjModel[iCount][Chicago.cnAtomType].contains(txtAtomTypeSearch.getText())) arrRows[iCount] = 0; if (cboAtomType.getSelectedItem().toString().equals("Equals")) if (!Chicago.sObjModel[iCount][Chicago.cnAtomType].equals(txtAtomTypeSearch.getText())) arrRows[iCount] = 0; if (cboAtomType.getSelectedItem().toString().equals("Is Before")) if (!Chicago.sObjModel[iCount][Chicago.cnAtomType].equals(txtAtomTypeSearch.getText())) arrRows[iCount] = 0; if (cboAtomType.getSelectedItem().toString().equals("Is After")) if (!Chicago.sObjModel[iCount][Chicago.cnAtomType].equals(txtAtomTypeSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 5. Contents if (chkIsContentsOn.isSelected()) { // Perform the contents search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtContentsSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (!Chicago.sObjModel[iCount][Chicago.cnContents].contains(txtContentsSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 6. Times Used if (chkIsTimesUsedOn.isSelected()) { // Perform the timesUsed search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtTimesUsedSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (!Chicago.sObjModel[iCount][Chicago.cnTimesUsed].contains(txtTimesUsedSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 7. Climax Scene if (chkIsClimaxSceneOn.isSelected()) { // Perform the climaxScene search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtClimaxSceneSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (!Chicago.sObjModel[iCount][Chicago.cnClimaxScene].contains(txtClimaxSceneSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 8. Notebook if (chkIsNotebookOn.isSelected()) { // Perform the notebook search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtNotebookSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (!Chicago.sObjModel[iCount][Chicago.cnNotebook].contains(txtNotebookSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 9. Correspondences if (chkIsCorrespondencesOn.isSelected()) { // Perform the correspondences search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtCorrespondencesSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (!Chicago.sObjModel[iCount][Chicago.cnCorrespondences] .contains(txtCorrespondencesSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 10. Usages if (chkIsUsagesOn.isSelected()) { // Perform the usages search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtUsagesSearch.getText().equals("")) { // Now what the fuck type of search am I doing? if (!Chicago.sObjModel[iCount][Chicago.cnUsages].contains(txtUsagesSearch.getText())) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 11. Relevance if (chkIsRelevanceOn.isSelected()) { // Perform the relevance search for (int iCount=1; iCount <= iRowCount; iCount++) { // I'VE DECIDED NOT TO SHORT CIRCUIT THE RELEVANCE SPINNERS, // BUT DON'T KNOW IF A NULL WOULD GET THROWN AT THIS POINT. SO WATCH OUT FOR THAT if (arrRows[iCount]==1) { // Now what the fuck type of search am I doing? int iObjModelRelevance = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnRelevance].trim()); int iTxtRelevanceSearch1 = Integer.parseInt(spnRelevanceSearch1.getValue().toString().trim()); int iTxtRelevanceSearch2 = Integer.parseInt(spnRelevanceSearch2.getValue().toString().trim()); if (cboRelevance.getSelectedItem().toString().equals(" =")) if (!(iObjModelRelevance == iTxtRelevanceSearch1)) arrRows[iCount] = 0; if (cboRelevance.getSelectedItem().toString().equals(" <")) if (!(iObjModelRelevance < iTxtRelevanceSearch1)) arrRows[iCount] = 0; if (cboRelevance.getSelectedItem().toString().equals("< x >")) if (!(iObjModelRelevance > iTxtRelevanceSearch1 && iObjModelRelevance < iTxtRelevanceSearch2)) arrRows[iCount] = 0; if (cboRelevance.getSelectedItem().toString().equals(" >")) if (!(iObjModelRelevance > iTxtRelevanceSearch1)) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 12. Clock if (chkIsClockOn.isSelected()) { // Perform the clock search // Currently coded, you need to enter in an integer representing # of seconds, like 3600 for 1 hour for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtClockSearch1.getText().equals("")) { // Now what the fuck type of search am I doing? int iObjModelClock = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnClock].trim()); int iTxtClockSearch1 = Integer.parseInt(this.txtClockSearch1.getText().trim()); int iTxtClockSearch2; if (!txtClockSearch2.getText().equals("")) iTxtClockSearch2 = Integer.parseInt(this.txtClockSearch2.getText().trim()); else iTxtClockSearch2 = 0; if (cboClock.getSelectedItem().toString().equals(" =")) if (!(iObjModelClock == iTxtClockSearch1)) arrRows[iCount] = 0; if (cboClock.getSelectedItem().toString().equals(" <")) if (!(iObjModelClock < iTxtClockSearch1)) arrRows[iCount] = 0; // 20230726: Added the && condition to not filter until the second text box has a value if (cboClock.getSelectedItem().toString().equals("< x >") && !txtClockSearch2.getText().equals("")) // do not run this search until a value is in search2 if ((iObjModelClock > iTxtClockSearch1 && iObjModelClock < iTxtClockSearch2)) arrRows[iCount] = 0; if (cboClock.getSelectedItem().toString().equals(" >")) if (!(iObjModelClock > iTxtClockSearch1)) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 13. Size if (chkIsSizeOn.isSelected()) { // Perform the clock search // Currently coded, you need to enter in an integer representing # of seconds, like 3600 for 1 hour for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtSizeSearch1.getText().equals("")) { // Now what the fuck type of search am I doing? int iObjModelSize = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnSize].trim()); int iTxtSizeSearch1 = Integer.parseInt(txtSizeSearch1.getText().trim()); int iTxtSizeSearch2; if (!txtSizeSearch2.getText().equals("")) iTxtSizeSearch2 = Integer.parseInt(txtSizeSearch2.getText().trim()); else iTxtSizeSearch2 = 0; if (cboSize.getSelectedItem().toString().equals(" =")) if (!(iObjModelSize == iTxtSizeSearch1)) arrRows[iCount] = 0; if (cboSize.getSelectedItem().toString().equals(" <")) if (!(iObjModelSize < iTxtSizeSearch1)) arrRows[iCount] = 0; if (cboSize.getSelectedItem().toString().equals("< x >") && !txtSizeSearch2.getText().equals("")) if ((iObjModelSize > iTxtSizeSearch1 && iObjModelSize < iTxtSizeSearch2)) arrRows[iCount] = 0; if (cboSize.getSelectedItem().toString().equals(" >")) if (!(iObjModelSize > iTxtSizeSearch1)) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 14. Version if (chkIsVersionOn.isSelected()) { // Perform the version search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1) { String sICountsVersion = Chicago.sObjModel[iCount][Chicago.cnVersion].trim(); String sICountsMaxVersion = Chicago.sObjModel[iCount][Chicago.cnMaxVersion].trim(); int iICountsVersion = 0; int iICountsMaxVersion = 0; try { iICountsVersion = Integer.parseInt(sICountsVersion); iICountsMaxVersion = Integer.parseInt(sICountsMaxVersion); } catch (Exception e) { // I Don't know what to do, so return everything iICountsVersion = 0; iICountsMaxVersion = 0; } if (cboVersion.getSelectedItem().toString().equals("Max Only")) if (iICountsVersion != iICountsMaxVersion) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 15. Create Date if (chkIsCreateDateOn.isSelected()) { // Perform the createDate search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtCreateDateSearch1.getText().equals("")) { // Now what the fuck type of search am I doing? int iObjModelCreateDate; int iTxtCreateDateSearch1; int iTxtCreateDateSearch2; if (Chicago.sObjModel[iCount][Chicago.cnCreateDate].length()==8) iObjModelCreateDate = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnCreateDate] .substring(0, 8).trim()); else iObjModelCreateDate = 0; if (txtCreateDateSearch1.getText().length()==8) iTxtCreateDateSearch1 = Integer.parseInt(this.txtCreateDateSearch1.getText().trim()); else iTxtCreateDateSearch1 = 0; if (txtCreateDateSearch2.getText().length()==8) iTxtCreateDateSearch2 = Integer.parseInt(this.txtCreateDateSearch2.getText().trim()); else iTxtCreateDateSearch2 = 0; if (cboCreateDate.getSelectedItem().toString().equals(" =")) if (!(iObjModelCreateDate == iTxtCreateDateSearch1)) arrRows[iCount] = 0; if (cboCreateDate.getSelectedItem().toString().equals(" <")) if (!(iObjModelCreateDate < iTxtCreateDateSearch1)) arrRows[iCount] = 0; if (cboCreateDate.getSelectedItem().toString().equals("< x >") && !txtCreateDateSearch2.getText().equals("")) if ((iObjModelCreateDate >= iTxtCreateDateSearch1 && iObjModelCreateDate <= iTxtCreateDateSearch2)) arrRows[iCount] = 0; if (cboCreateDate.getSelectedItem().toString().equals(" >")) if (!(iObjModelCreateDate <= iTxtCreateDateSearch1)) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 16. Update Date if (chkIsUpdateDateOn.isSelected()) { // Perform the updateDate search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtUpdateDateSearch1.getText().equals("")) { // Now what the fuck type of search am I doing? int iObjModelUpdateDate; int iTxtUpdateDateSearch1; int iTxtUpdateDateSearch2; if (Chicago.sObjModel[iCount][Chicago.cnUpdateDate].length()==8) iObjModelUpdateDate = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnUpdateDate] .substring(0, 8).trim()); else iObjModelUpdateDate = 0; if (txtUpdateDateSearch1.getText().length()==8) iTxtUpdateDateSearch1 = Integer.parseInt(this.txtUpdateDateSearch1.getText().trim()); else iTxtUpdateDateSearch1 = 0; if (txtUpdateDateSearch2.getText().length()==8) iTxtUpdateDateSearch2 = Integer.parseInt(this.txtUpdateDateSearch2.getText().trim()); else iTxtUpdateDateSearch2 = 0; if (cboUpdateDate.getSelectedItem().toString().equals(" =")) if (!(iObjModelUpdateDate == iTxtUpdateDateSearch1)) arrRows[iCount] = 0; if (cboUpdateDate.getSelectedItem().toString().equals(" <")) if (!(iObjModelUpdateDate < iTxtUpdateDateSearch1)) arrRows[iCount] = 0; if (cboUpdateDate.getSelectedItem().toString().equals("< x >") && !txtUpdateDateSearch2.getText().equals("")) if ((iObjModelUpdateDate > iTxtUpdateDateSearch1 && iObjModelUpdateDate < iTxtUpdateDateSearch2)) arrRows[iCount] = 0; if (cboUpdateDate.getSelectedItem().toString().equals(" >")) if (!(iObjModelUpdateDate > iTxtUpdateDateSearch1)) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 17. Finish Date if (chkIsFinishDateOn.isSelected()) { // Perform the finishDate search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1 && !txtFinishDateSearch1.getText().equals("")) { // Now what the fuck type of search am I doing? int iObjModelFinishDate; int iTxtFinishDateSearch1; int iTxtFinishDateSearch2; if (Chicago.sObjModel[iCount][Chicago.cnFinishDate].length()==8 && !Chicago.sObjModel[iCount][Chicago.cnFinishDate].equals(" ")) iObjModelFinishDate = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnFinishDate] .substring(0, 8).trim()); else iObjModelFinishDate = 0; if (txtFinishDateSearch1.getText().length()==8) iTxtFinishDateSearch1 = Integer.parseInt(this.txtFinishDateSearch1.getText().trim()); else iTxtFinishDateSearch1 = 0; if (txtFinishDateSearch2.getText().length()==8) iTxtFinishDateSearch2 = Integer.parseInt(this.txtFinishDateSearch2.getText().trim()); else iTxtFinishDateSearch2 = 0; if (cboFinishDate.getSelectedItem().toString().equals(" =")) if (!(iObjModelFinishDate == iTxtFinishDateSearch1)) arrRows[iCount] = 0; if (cboFinishDate.getSelectedItem().toString().equals(" <")) if (!(iObjModelFinishDate < iTxtFinishDateSearch1)) arrRows[iCount] = 0; if (cboFinishDate.getSelectedItem().toString().equals("< x >") && (!(txtFinishDateSearch2.getText().equals("")))) if (!(iObjModelFinishDate > iTxtFinishDateSearch1 && iObjModelFinishDate < iTxtFinishDateSearch2)) arrRows[iCount] = 0; if (cboFinishDate.getSelectedItem().toString().equals(" >")) if (!(iObjModelFinishDate > iTxtFinishDateSearch1)) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 18. Deleted if (chkIsDeletedOn.isSelected()) { // Perform the deleted search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1) { // Now what the fuck type of search am I doing? int iObjModelDeleted = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnDeleted].trim()); int iDeleted = 0; if (cboDeleted.getSelectedItem().equals("is deleted")) iDeleted=1; else iDeleted=0; if (iObjModelDeleted==0 && iDeleted==1) arrRows[iCount] = 0; if (iObjModelDeleted==1 && iDeleted==0) arrRows[iCount] = 0; }}} ///////////////////////////////////////////////////////////////////////////////////// // 19. Status. Just wait, there's only 22 more variables... if (chkIsStatusOn.isSelected()) { // Perform the status search for (int iCount=1; iCount <= iRowCount; iCount++) { if (arrRows[iCount]==1) { // Now what the fuck type of search am I doing? String sObjModelStatus = Chicago.sObjModel[iCount][Chicago.cnStatus]; if (cboStatus.getSelectedItem().toString().equals("00-Not Started")) if (!(sObjModelStatus.equals("00-Not Started"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("10-Drafting")) if (!(sObjModelStatus.equals("10-Drafting"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("20-In Draft Review")) if (!(sObjModelStatus.equals("20-In Draft Review"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("30-In Progress")) if (!(sObjModelStatus.equals("30-In Progress"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("40-In Final Review")) if (!(sObjModelStatus.equals("40-In Final Review"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("50-In Rewrite")) if (!(sObjModelStatus.equals("50-In Rewrite"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("60-In Rewrite Review")) if (!(sObjModelStatus.equals("60-In Rewrite Review"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("90-Reviews Complete")) if (!(sObjModelStatus.equals("90-Reviews Complete"))) arrRows[iCount] = 0; if (cboStatus.getSelectedItem().toString().equals("99-Complete")) if (!(sObjModelStatus.equals("99-Complete"))) arrRows[iCount] = 0; }}} // Yeah, we're still in the redraw method and haven't even thought about redrawing anything yet ArrayList sInventoryArrayList = new ArrayList<>(); int iRelevance =0; String sContext; String sDeleted; String sDelimeterLeft; String sDelimeterRight; // I spent 4 hours debugging to find I needed to define finish date now because // it got used without being reset to empty string of 8 spaces... String sFinishDate = " "; String sItemType; String sListStringRowWithRelevanceCompliment; String sName; String sRelevance; String sVersion; String sVersionMax; lstInventory.removeAll(); ////////////////////////////////////////////////////////////////////// /////////////////////////////// Step 1 /////////////////////////////// ////////////////////////////////////////////////////////////////////// int totRows = Chicago.iRowCount; for ( int iCount = 1; iCount <= totRows; iCount++ ) { sDelimeterLeft = " "; sDelimeterRight = " "; // Search Screen Specific if (arrRows[iCount]==1) { // end Search Screen Specific // WE'RE ADDING THIS ROW TO THE INVENTORY LIST sName = Chicago.sObjModel[iCount][Chicago.cnName]; sContext = Chicago.sObjModel[iCount][Chicago.cnContext]; sItemType = Chicago.sObjModel[iCount][Chicago.cnItemType]; sRelevance = Chicago.sObjModel[iCount][Chicago.cnRelevance]; sVersion = Chicago.sObjModel[iCount][Chicago.cnVersion]; sVersionMax = Chicago.sObjModel[iCount][Chicago.cnMaxVersion]; sDeleted = Chicago.sObjModel[iCount][Chicago.cnDeleted]; // PARSE OUT AND SORT sFinishDate = ""; try { if (Chicago.sObjModel[iCount][Chicago.cnFinishDate].equals("")) { sFinishDate = "ZZZZZZZZ"; } // If the field has an integer in it, get it, otherwise set FinishDate to "ZZZZZZZZ" // If the field has 8 integers in it, then the date is an absolute date" // If Integer.parseInt() returns a value < 20230101, then assume // it's an OFFSET from today. // // In the case of an offset of -365 (~1 year AGO), the parseInt would work fine // and yield a number >= -9999999 and <= 9999999 // Which would get sorted earlier than 8 digit dates // // If parseInt comes back with an 8 digit number greater than 20230101, assume absolute date // If parseInt throws an exception, set date to "ZZZZZZZZ" // // .|. // // Author here. The fucking dates being converted to integers is fine as // long as they are not used for comparison to an offset. If they are going // to be used to say "between 7 days ago and 2 days from now", (notice // where I place the comma relative to the quote--it's the correct way, so // don't you dare right "sic") then we have to take the 8 digits and // use a date formatter to convert it to YYYYMMDD before doing the // arithetic. This is because in the integer world August 1, 2023 equals // 20230801 and July 31, 2023 equals 20230731 and 20230731 + 1 does not equal // 20230801. // // .|. // //////////////////////////////////////////////////////////////////////////// if (!(sFinishDate.equals("ZZZZZZZZ"))) { String sSomeFuckingNumber = ""; try { sSomeFuckingNumber = Chicago.sObjModel[iCount][Chicago.cnFinishDate] .substring(0, 8).trim(); } catch (Exception e) { // If the above line threw and exception // and because we know that the value of finish date // is NOT "", then what's in finish date is either // "45" or " 45". What we want to do is to sort // it as " 45" so that it sorts in front of any // absolute dates like "20230715". sSomeFuckingNumber = Chicago.sObjModel[iCount][Chicago.cnFinishDate].trim(); } int iSomeFuckingNumber = Integer.parseInt(sSomeFuckingNumber); if (iSomeFuckingNumber < 19690929) { sFinishDate = String.valueOf(iSomeFuckingNumber); } // Else, it must have an 8 digit absolute day in the first 8 characters of the field // ...I do not care in the least what the fuck is in columns 9+ of any date field else { sFinishDate = Chicago.sObjModel[iCount][Chicago.cnFinishDate] .substring(0,8); }} } catch (Exception e) { // Who knows what the date is, so make it sort to the end sFinishDate = "ZZZZZZZZ"; } while (sFinishDate.length() < 8) sFinishDate = " " + sFinishDate; /////// END OF FINISH DATE while (sContext.length() < Chicago.CONTEXT_MAX_LEN) sContext = sContext + " "; if (sContext.length() > Chicago.CONTEXT_MAX_LEN) sContext = sContext.substring(0,Chicago.CONTEXT_MAX_LEN); while (sName.length() < Chicago.NAME_MAX_LEN) sName = sName + " "; if (sName.length() > Chicago.NAME_MAX_LEN) sName = sName.substring(0,Chicago.NAME_MAX_LEN); int iVersion = Integer.parseInt(sVersion); if (iVersion < 0) iVersion = 0; if (iVersion > 100) iVersion = 100; sVersion = String.valueOf(iVersion); int iThree = 3; while (sVersion.length() < iThree) sVersion = " " + sVersion; iRelevance = Integer.parseInt(Chicago.sObjModel[iCount][Chicago.cnRelevance].trim()); if (iRelevance < 0) iRelevance = 0; if (iRelevance > 100) iRelevance = 100; sRelevance = String.valueOf(iRelevance); while (sRelevance.length() < iThree) sRelevance = " " + sRelevance; /************************** INJECT ********************************** * To change the sorting mechanisms do some klugey shit, indeed... * 1. Make Relevance show as the compliment of Relevance (Relevance = abs(Relevance-100)) * 2. Make Item Type sort correctly b > p > e > s > a > x ****************************************************************************/ int iRelevanceCompliment = Math.abs(100-iRelevance); String sRelevanceCompliment = String.valueOf(iRelevanceCompliment); while (sRelevanceCompliment.length() < iThree) sRelevanceCompliment = " " + sRelevanceCompliment; sRelevance = sRelevanceCompliment; if (sItemType.equals("b")) sItemType = "0"; if (sItemType.equals("p")) sItemType = "1"; if (sItemType.equals("e")) sItemType = "2"; if (sItemType.equals("s")) sItemType = "3"; if (sItemType.equals("a")) sItemType = "4"; if (sItemType.equals("x")) sItemType = "5"; sListStringRowWithRelevanceCompliment = sContext + " > " + sItemType + " # " + sRelevanceCompliment + " &" + sDelimeterLeft + sFinishDate + sDelimeterRight + ": " + sName + " @ " + sVersion; // THIS CODE IS SPECIFIC TO THE SEARCH SCREEN... sInventoryArrayList.add(sListStringRowWithRelevanceCompliment); }} // END THIS CODE IS SPECIFIC TO THE SEARCH SCREEN ////////////////////////////////////////////////////////////////// ////////////// SORT ////////////// ////////////////////////////////////////////////////////////////// Collections.sort(sInventoryArrayList); // We sorted the above with Relevance's compliment. Now reverse the "injection" for (int iCount=0; iCount < sInventoryArrayList.size(); iCount++) { String sTempListItem = sInventoryArrayList.get(iCount); String sTempContext = sTempListItem.substring(0, Chicago.CONTEXT_MAX_LEN); String sTempItemType = sTempListItem.substring(Chicago.CONTEXT_MAX_LEN + 3,Chicago.CONTEXT_MAX_LEN + 4); String sRelevanceCompliment = sTempListItem .substring(Chicago.RELEVANCE_POSIT,Chicago.RELEVANCE_POSIT + 3).trim(); try { iRelevance = 100 - Integer.parseInt(sRelevanceCompliment); } catch (Exception e) { System.out.println("Relevance is fucked up, setting to 0..."); iRelevance = 0; } String sTempRelevance = String.valueOf(iRelevance); while (sTempRelevance.length() < 3) sTempRelevance = " " + sTempRelevance; String sTempFinishDate = sTempListItem .substring(Chicago.FINISH_DATE_POS, Chicago.FINISH_DATE_POS+8); if (sTempFinishDate.equals("ZZZZZZZZ")) sTempFinishDate = " "; int iFinishDate; try { iFinishDate = Integer.parseInt(sTempFinishDate); } catch (Exception e) { iFinishDate = 0; } // Get the time now and establish the date of the year then do some simple math sDelimeterLeft = " "; sDelimeterRight = " "; LocalDate ldtToday = LocalDate.now(); if (iFinishDate > 0) { int iFinishDateYear = Integer.parseInt(sTempFinishDate.substring(0,4)); int iFinishDateMonth = Integer.parseInt(sTempFinishDate.substring(4,6)); int iFinishDateDay = Integer.parseInt(sTempFinishDate.substring(6,8)); LocalDate ldtFinishDate = LocalDate.of(iFinishDateYear, iFinishDateMonth, iFinishDateDay); long daysBetween = ChronoUnit.DAYS.between(ldtToday, ldtFinishDate); if (daysBetween < 14) { sDelimeterLeft = "+"; sDelimeterRight = "+"; } if (daysBetween < 2) { sDelimeterLeft = "*"; sDelimeterRight = "*"; } if (daysBetween == 0) { sDelimeterLeft = "="; sDelimeterRight = "="; } if (daysBetween < 0) { sDelimeterLeft = "<"; sDelimeterRight = ">"; }} String sTempName = sTempListItem .substring(Chicago.NAME_POSITION, Chicago.NAME_POSITION + Chicago.NAME_MAX_LEN); String sTempVersion = sTempListItem .substring(Chicago.VERSION_POSITION, Chicago.VERSION_POSITION + 3); if (sTempItemType.equals("0")) sTempItemType = "b"; if (sTempItemType.equals("1")) sTempItemType = "p"; if (sTempItemType.equals("2")) sTempItemType = "e"; if (sTempItemType.equals("3")) sTempItemType = "s"; if (sTempItemType.equals("4")) sTempItemType = "a"; if (sTempItemType.equals("5")) sTempItemType = "x"; String sNewListString = sTempContext + " > " + sTempItemType + " # " + sTempRelevance + " &" + sDelimeterLeft + sTempFinishDate + sDelimeterRight + ": " + sTempName + " @ " + sTempVersion; sInventoryArrayList.set(iCount, sNewListString); } String[] listData = sInventoryArrayList.toArray(new String[0]); lstInventory.removeAll(); lstInventory.setListData(listData); } }