I am in the process of learning how I could use a JListDataListener to change JList elements at runtime:
I am goggling this right now to collect examples: I would like to see some code on the subject if anyone has some
examples -thanks
Here is some code to create a Jlist for a data model that is built form queries form a JDBC database Note : this
is not another hard coded Data model like most of the examples on the internet.
This creates the data model from routines in the program and this class associates the necessary properties needed
for each jList entry. I use a PayrollListSelectionHandler() to validate and load a form necessary to
collect relevant data. and to update data in the database. This Uses Images that are rendered to the list.
Please find attachment to view screen shot.
I would like to change these properties using a JListDataListener.
Thanks
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpenFrameListSelectionPanel.java
*
*
*/
package view.content.entities.payroll;
import java.beans.PropertyVetoException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import model.ModelUtils;
import model.err.IncorrectPasswordException;
import model.err.LoginException;
import model.err.NoSelectionMadeException;
import model.err.ProfileException;
import model.err.UnknownUserNameException;
import view.MusicSystems.MusicSystemsJDesktopManager;
import view.ViewUtils;
import view.master.masterForms.staticBtns.MasterPayrollFormBtn;
import view.messages.PayrollChkNumberMessage;
import view.messages.SuccessfullTargetFoldersCreation;
import java.awt.Color;
import java.awt.Component;
import java.math.BigDecimal;
import java.util.Hashtable;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import view.content.entities.payroll.PayrollUserListSelectionPanel.PayrollEntriesCollection;
/**
*
* @author Steve Howerton
*/
public class PayrollUserListSelectionPanel extends javax.swing.JPanel {
public static JList initList;
public static JTextField descTxtField;
public ListSelectionModel listSelectionModel;
public static JScrollPane scroll;
public static JPanel content;
public static String selection;
private static int bookNum;
private static String INSTRUCTORPREFIX = "Pay this Instructor";
private static String SYSPREFIX = "Totals: ";
private String data;
/*
* jlist.icon.leaf=img/leaf.gif
jlist.icon.addressbook=img/addressbook.gif
*/
private final String instrImg = ViewUtils.getResource("jlist.icon.leaf");
private final String sysImg = ViewUtils.getResource("jlist.icon.addressbook");
private static String iconImagePath;
private static ImageIcon imageIcon;
private static final String instrPaidComment = "Instructor paid";
private static final String instrNotPaidComment = "Intructor not Paid";
private static final String sysComment = "NOT SELECTABLE";
private int countParam = 0;
private final int INSTRCOMMENTPAID = 0;
private final int INSTRCOMMENTNOTPAID = 1;
private final int SYSCOMMENT = 2;
private final int INSTRIMG = 0;
private final int SYSIMG = 1;
private final String[] comments = new String[]{
instrPaidComment,
instrNotPaidComment,
sysComment
};
private static String comment;
private int INSTRIMGPATH = 0;
private int SYSIIMGPATH = 1;
private final String[] imgPaths = new String[]{
instrImg,
sysImg
};
private static String[] children;
private static String[] payrollEntries;
private static JLabel[] payrollJLabels;
private static int jLabelCount = 0;
public static PayrollObj[] payrollObjs;
public static int ZEROINT = 0;
public static Double ZEROVALUE = 0.00;
public static PayrollObj[] getPayrollObj() {
return payrollObjs;
}
public static void setPayrollObj(PayrollObj[] payrollObj) {
PayrollUserListSelectionPanel.payrollObjs = payrollObj;
}
private int titlePosition;
private int imgPosition;
private int commentPosition;
private String title;
private String imgPath;
private final int SEL = 0;
/** Creates new form OpenFrameListSelectionPanel */
public PayrollUserListSelectionPanel(String[] children) throws PropertyVetoException {
loadInitListWhileValidation(children);
determineListProperties(children);
listSelectionModel = initList.getSelectionModel();
listSelectionModel.setSelectionMode(listSelectionModel.SINGLE_SELECTION);
listSelectionModel.addListSelectionListener(new PayrollListSelectionHandler());
listSelectionModel.setLeadSelectionIndex(SEL);
scroll = new JScrollPane();
scroll.setViewportView(initList);
scroll.setPreferredSize(new Dimension(200, 200));
content = new JPanel();
content.setPreferredSize(new Dimension(250, 400));
content.setLayout(new BorderLayout());
content.add(scroll, BorderLayout.NORTH);
setContent(content);
setScroll(scroll);
}
public static String getComment() {
return comment;
}
public static void setComment(String comment) {
PayrollUserListSelectionPanel.comment = comment;
}
public static ImageIcon getImageIcon() {
return imageIcon;
}
public static void setImageIcon(ImageIcon imageIcon) {
PayrollUserListSelectionPanel.imageIcon = imageIcon;
}
public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgPath) {
this.imgPath = imgPath;
}
public static String getIconImagePath() {
return iconImagePath;
}
public static void setIconImagePath(String iconImagePath) {
PayrollUserListSelectionPanel.iconImagePath = iconImagePath;
}
public static JPanel getContent() {
return content;
}
public static void setContent(JPanel content) {
PayrollUserListSelectionPanel.content = content;
}
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* OpenFrameListSelectionPanel.java
*
*
*/
package view.content.entities.payroll;
import java.beans.PropertyVetoException;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import model.ModelUtils;
import model.err.IncorrectPasswordException;
import model.err.LoginException;
import model.err.NoSelectionMadeException;
import model.err.ProfileException;
import model.err.UnknownUserNameException;
import view.MusicSystems.MusicSystemsJDesktopManager;
import view.ViewUtils;
import view.master.masterForms.staticBtns.MasterPayrollFormBtn;
import view.messages.PayrollChkNumberMessage;
import view.messages.SuccessfullTargetFoldersCreation;
import java.awt.Color;
import java.awt.Component;
import java.math.BigDecimal;
import java.util.Hashtable;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import view.content.entities.payroll.PayrollUserListSelectionPanel.PayrollEntriesCollection;
/**
*
* @author Steve Howerton
*/
public class PayrollUserListSelectionPanel extends javax.swing.JPanel {
public static JList initList;
public static JTextField descTxtField;
public ListSelectionModel listSelectionModel;
public static JScrollPane scroll;
public static JPanel content;
public static String selection;
private static int bookNum;
private static String INSTRUCTORPREFIX = "Pay this Instructor";
private static String SYSPREFIX = "Totals: ";
private String data;
/*
* jlist.icon.leaf=img/leaf.gif
jlist.icon.addressbook=img/addressbook.gif
*/
private final String instrImg = ViewUtils.getResource("jlist.icon.leaf");
private final String sysImg = ViewUtils.getResource("jlist.icon.addressbook");
private static String iconImagePath;
private static ImageIcon imageIcon;
private static final String instrPaidComment = "Instructor paid";
private static final String instrNotPaidComment = "Intructor not Paid";
private static final String sysComment = "NOT SELECTABLE";
private int countParam = 0;
private final int INSTRCOMMENTPAID = 0;
private final int INSTRCOMMENTNOTPAID = 1;
private final int SYSCOMMENT = 2;
private final int INSTRIMG = 0;
private final int SYSIMG = 1;
private final String[] comments = new String[]{
instrPaidComment,
instrNotPaidComment,
sysComment
};
private static String comment;
private int INSTRIMGPATH = 0;
private int SYSIIMGPATH = 1;
private final String[] imgPaths = new String[]{
instrImg,
sysImg
};
private static String[] children;
private static String[] payrollEntries;
private static JLabel[] payrollJLabels;
private static int jLabelCount = 0;
public static PayrollObj[] payrollObjs;
public static int ZEROINT = 0;
public static Double ZEROVALUE = 0.00;
public static PayrollObj[] getPayrollObj() {
return payrollObjs;
}
public static void setPayrollObj(PayrollObj[] payrollObj) {
PayrollUserListSelectionPanel.payrollObjs = payrollObj;
}
private int titlePosition;
private int imgPosition;
private int commentPosition;
private String title;
private String imgPath;
private final int SEL = 0;
/** Creates new form OpenFrameListSelectionPanel */
public PayrollUserListSelectionPanel(String[] children) throws PropertyVetoException {
loadInitListWhileValidation(children);
determineListProperties(children);
listSelectionModel = initList.getSelectionModel();
listSelectionModel.setSelectionMode(listSelectionModel.SINGLE_SELECTION);
listSelectionModel.addListSelectionListener(new PayrollListSelectionHandler());
listSelectionModel.setLeadSelectionIndex(SEL);
scroll = new JScrollPane();
scroll.setViewportView(initList);
scroll.setPreferredSize(new Dimension(200, 200));
content = new JPanel();
content.setPreferredSize(new Dimension(250, 400));
content.setLayout(new BorderLayout());
content.add(scroll, BorderLayout.NORTH);
setContent(content);
setScroll(scroll);
}
public static String getComment() {
return comment;
}
public static void setComment(String comment) {
PayrollUserListSelectionPanel.comment = comment;
}
public static ImageIcon getImageIcon() {
return imageIcon;
}
public static void setImageIcon(ImageIcon imageIcon) {
PayrollUserListSelectionPanel.imageIcon = imageIcon;
}
public String getImgPath() {
return imgPath;
}
public void setImgPath(String imgPath) {
this.imgPath = imgPath;
}
public static String getIconImagePath() {
return iconImagePath;
}
public static void setIconImagePath(String iconImagePath) {
PayrollUserListSelectionPanel.iconImagePath = iconImagePath;
}
public static JPanel getContent() {
return content;
}
public static void setContent(JPanel content) {
PayrollUserListSelectionPanel.content = content;
}
public static JScrollPane getScroll() {
return scroll;
}
public static void setScroll(JScrollPane scroll) {
PayrollUserListSelectionPanel.scroll = scroll;
}
private void loadInitListWhileValidation(String[] aChildren) throws PropertyVetoException {
children = aChildren;
initList = new JList(children);
initList.getModel().addListDataListener(new PayrollDataListener());
//@Array struct
for (int z = 0; z < children.length; z++) {
String element = children[z];
//@Array
System.out.println(element + ": children [+" + z + "+]: \n");
}
}
private void determineListProperties(String[] aChildren) {
children = aChildren;
countParam = 0;
payrollEntries = new String[children.length * 3];
/*
* private final String instrPaidComment = "Instructor paid";
private final String instrNotPaidComment = "Intructor not Paid";
private final String sysComment="NOT SELECTABLE";
private final int INSTRCOMMENTPAID = 0;
private final int INSTRCOMMENTNOTPAID = 1;
private final int SYSCOMMENT = 2;
private final int INSTRIMG = 0;
private final int SYSIMG = 1;
private final String[] comments = new String[]{
instrPaidComment,
instrNotPaidComment,
sysComment
};
private int INSTRIMGPATH = 0;
private int SYSIIMGPATH = 1;
private final String[] imgPaths = new String[]{
instrImg,
sysImg
};
public static JScrollPane getScroll() {
return scroll;
}
public static void setScroll(JScrollPane scroll) {
PayrollUserListSelectionPanel.scroll = scroll;
}
private void loadInitListWhileValidation(String[] aChildren) throws PropertyVetoException {
children = aChildren;
initList = new JList(children);
initList.getModel().addListDataListener(new PayrollDataListener());
//@Array struct
for (int z = 0; z < children.length; z++) {
String element = children[z];
//@Array
System.out.println(element + ": children [+" + z + "+]: \n");
}
}
private void determineListProperties(String[] aChildren) {
children = aChildren;
countParam = 0;
payrollEntries = new String[children.length * 3];
/*
* private final String instrPaidComment = "Instructor paid";
private final String instrNotPaidComment = "Intructor not Paid";
private final String sysComment="NOT SELECTABLE";
private final int INSTRCOMMENTPAID = 0;
private final int INSTRCOMMENTNOTPAID = 1;
private final int SYSCOMMENT = 2;
private final int INSTRIMG = 0;
private final int SYSIMG = 1;
private final String[] comments = new String[]{
instrPaidComment,
instrNotPaidComment,
sysComment
};
private int INSTRIMGPATH = 0;
private int SYSIIMGPATH = 1;
private final String[] imgPaths = new String[]{
instrImg,
sysImg
};
*/
for (int i = 0; i < children.length; i++) {
String element = children[i];
if (element.contains(INSTRUCTORPREFIX)) {
payrollEntries[countParam] = children[i];
countParam++;
payrollEntries[countParam] = imgPaths[INSTRIMG];
countParam++;
setComment(comments[INSTRCOMMENTNOTPAID]);
payrollEntries[countParam] = getComment();
countParam++;
}
if (element.contains(SYSPREFIX)) {
payrollEntries[countParam] = children[i];
countParam++;
payrollEntries[countParam] = imgPaths[SYSIMG];
countParam++;
setComment(comments[SYSCOMMENT]);
payrollEntries[countParam] = getComment();
countParam++;
}
}
//@Array struct
for (int z = 0; z < payrollEntries.length; z++) {
String element = payrollEntries[z];
//@Array
System.out.println(element + ":payrollEntries[+" + z + "+]: \n");
}
loadObject();
}
private void loadObject() {
payrollObjs = new PayrollObj[children.length];
for (int i = 0; i < payrollObjs.length; i++) {
titlePosition = i;
if (titlePosition == 0) {
int thisTitlePosition = titlePosition;
imgPosition = titlePosition + 1;
commentPosition = titlePosition + 2;
title = payrollEntries[thisTitlePosition];
imgPath = payrollEntries[imgPosition];
comment = payrollEntries[commentPosition];
System.out.println(title + ": title : \n");
System.out.println(imgPath + ": imgPath : \n");
System.out.println(comment + ": comment : \n");
}
if (titlePosition == 1) {
int thisTitlePosition = titlePosition + 2;
imgPosition = thisTitlePosition + 1;
commentPosition = thisTitlePosition + 2;
title = payrollEntries[thisTitlePosition];
imgPath = payrollEntries[imgPosition];
comment = payrollEntries[commentPosition];
System.out.println(title + ": title : \n");
System.out.println(imgPath + ": imgPath : \n");
System.out.println(comment + ": comment : \n");
}
if (titlePosition > 1) {
int thisTitlePosition = titlePosition * 3;
imgPosition = thisTitlePosition + 1;
commentPosition = thisTitlePosition + 2;
title = payrollEntries[thisTitlePosition];
imgPath = payrollEntries[imgPosition];
comment = payrollEntries[commentPosition];
System.out.println(title + ": title : \n");
System.out.println(imgPath + ": imgPath : \n");
System.out.println(comment + ": comment : \n");
}
payrollObjs[i] = new PayrollObj(title, imgPath, comment);
}
setPayrollObj(payrollObjs);
new PayrollEntriesCollection(payrollObjs);
new PayrollJListCustomRenderer();
}
public static JList getInitList() {
return initList;
}
public static void setInitList(JList initList) {
PayrollUserListSelectionPanel.initList = initList;
}
public static class PayrollListSelectionHandler implements ListSelectionListener {
//private JInternalFrame returnToFrame;
private int stopUTILITYUPY;
private int UTILITYUPY = 0;
private int UTILITYOVERX = 0;
public int instrAndRateIndex;
private boolean bValidSelection;
public PayrollListSelectionHandler() throws PropertyVetoException {
//MusicSystemsJDesktopManager.setCurrentFrame(ModelUtils.getCallerFrame());
}
public void valueChanged(ListSelectionEvent e) {
//ListSelectionModel lsm = (ListSelectionModel) e.getSource();
try {
bValidSelection = addOrRemoveListeners(e);
} catch (FileNotFoundException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (ProfileException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (LoginException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
}
if (bValidSelection) {
try {
//returnToFrame=MusicSystemsJDesktopManager.getCurrentFrame();
MusicSystemsJDesktopManager.setCurrentFrame(ModelUtils.getCallerUtilityFrame());
setSelection((String) initList.getSelectedValue().toString());
//ModelUtils.setThisURL(getSelection());
setSelection(PayrollFormController.filteredInstrList.get(initList.getSelectedIndex()));
setInstrAndRateIndex(initList.getSelectedIndex());
getDesc(e);
} catch (SQLException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (UnknownUserNameException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (IncorrectPasswordException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (InterruptedException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (javax.security.auth.login.LoginException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (SuccessfullTargetFoldersCreation ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (FileNotFoundException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (IOException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (ProfileException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (LoginException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
} catch (PropertyVetoException ex) {
Logger.getLogger(PayrollUserListSelectionPanel.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
private boolean addOrRemoveListeners(ListSelectionEvent e) throws FileNotFoundException, IOException {
try {
bValidSelection = true;
if (initList.getSelectedValue().toString().contains(SYSPREFIX)) {
bValidSelection = false;
throw new NoSelectionMadeException();
}
} catch (NoSelectionMadeException ex) {
String x = ex.getMessage();
System.out.println("error message is: " + AND + x + AND + " AT// " + C + M + AND + ": : \n");
System.out.println("error message is: " + x);
ViewUtils vu = new ViewUtils();
vu.addExceptionMessage(x);
}
//bValidSelection=false;
return bValidSelection;
}
private void getDesc(ListSelectionEvent e) throws PropertyVetoException, FileNotFoundException, IOException, ProfileException, LoginException, SQLException SuccessfullTargetFoldersCreation {
//the selected index is related to the list of the payrollformcontroller.
if (e.getValueIsAdjusting()) {
//@xBreak
//@Array struct
int count = 0;
for (String element : PayrollFormController.payrollInstrList) {
//@Array
count++;
}
count = 0;
//@Array struct
for (String element : PayrollFormController.payrollTotalList) {
//@Array
}
clearSelectionInfo();
//payrollTotalList
String str = PayrollFormController.payrollTotalList.get(instrAndRateIndex);
Double d = Double.parseDouble(str);
BigDecimal r = BigDecimal.valueOf(d);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.uidIndex].setText(selection);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.totalIndex].setText(PayrollFormController.payrollTotalList.get(instrAndRateIndex));
}
try {
try {
boolean bValid = isSelectable();
if (!bValid) {
clearSelectionInfo();
throw new NoSelectionMadeException();
}
bValid = isCompleted();
if (!bValid) {
clearSelectionInfo();
throw new NoSelectionMadeException();
}
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.uidIndex].setText(selection);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.totalIndex].setText(PayrollFormController.payrollTotalList.get(instrAndRateIndex));
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setText(" ");
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEnabled(true);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEditable(true);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setBackground(Color.pink);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setCaretPosition(0);
PayrollFormController.print();
MasterPayrollFormBtn.updateBtn.setEnabled(true);
throw new PayrollChkNumberMessage();
} catch (PayrollChkNumberMessage ex) {
String x = ex.getMessage();
System.out.println("error message is: " + x);
ViewUtils vu = new ViewUtils();
vu.addMessage(x);
}
showForm();
int thisBookNum = PayrollFormController.payrollBookNumList.get(instrAndRateIndex);
/*
* PayrollFormController.setBookNum(thisBookNum);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.totalIndex].setText(PayrollFormController.payrollTotalList.get(instrAndRateIndex));
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.uidIndex].setText(PayrollFormController.processedUsers.get(instrAndRateIndex));
*/
MasterPayrollFormBtn.updateBtn.setEnabled(true);
MasterPayrollFormBtn.submitInsertBtn.setEnabled(false);
} catch (NoSelectionMadeException ex) {
String x = ex.getMessage();
ViewUtils vu = new ViewUtils();
vu.addExceptionMessage(x);
}
}
private boolean isSelectable() {
boolean bSelectable = true;
if (selection.contains("Credit") || selection.contains("Master") || selection.contains("payroll")) {
// MasterForm.controlPanel.setVisible(false);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setText(" ");
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEnabled(true);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEditable(true);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setBackground(Color.pink);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setCaretPosition(0);
bSelectable = false;
}
return bSelectable;
}
private void clearSelectionInfo() {
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.uidIndex].setText(" ");
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.totalIndex].setText(" ");
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setText(" ");
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEnabled(true);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEditable(true);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setBackground(Color.pink);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setCaretPosition(0);
}
private boolean isCompleted() {
boolean bNotCompleted = true;
for (String str : PayrollFormController.completedUsers) {
if (selection.contains(str)) {
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setText(" ");
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEnabled(false);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setEditable(false);
PayrollInstructorRegisterForm.txtFieldArray[PayrollInstructorRegisterForm.chkNumIndex].setBackground(Color.pink);
bNotCompleted = false;
}
}
return bNotCompleted;
}
private void showForm() throws PropertyVetoException {
//MasterForm.controlPanel.setVisible(true);
JInternalFrame payrollFrame = MusicSystemsJDesktopManager.getCurrentFrame();
String payrollFrameName = payrollFrame.getTitle();
payrollFrame.setIconifiable(true);
int payrollFrameX = payrollFrame.getX();
int payrollFrameY = payrollFrame.getY();
int payrollFrameWidth = payrollFrame.getWidth();
int payrollFrameHeight = payrollFrame.getHeight();
//int payrollFrameUTILITYUPY=payrollFrameY-UTILITYUPY;
payrollFrame.moveToBack();
payrollFrame.setSelected(false);
payrollFrame.reshape(UTILITYOVERX + 1 * 470, UTILITYUPY, payrollFrameWidth, payrollFrameHeight);
MusicSystemsJDesktopManager.setLastFrame(payrollFrame);
ModelUtils.setCallerUtilityFrame(payrollFrame);
//thisSelection
}
public int getInstrAndRateIndex() {
return instrAndRateIndex;
}
public void setInstrAndRateIndex(int instrAndRateIndex) {
this.instrAndRateIndex = instrAndRateIndex;
}
}
public static String getSelection() {
return selection;
}
public static void setSelection(String selection) {
PayrollUserListSelectionPanel.selection = selection;
}
public static int getBookNum() {
return bookNum;
}
public static void setBookNum(int bookNum) {
PayrollUserListSelectionPanel.bookNum = bookNum;
}
public static class PayrollEntriesCollection {
// private static PayrollObj[] defaultpayrollObjs =new PayrollObj[children.length];
private static String[] defaultpayrollObjs = new String[children.length];
private PayrollObj[] payrollObjs;
private int numEntries;
private ImageIcon elementIcon;
private String elementComment;
private String elementIconPath;
private String elementEnty;
/*
* for (int i = 0; i < children.length; i++) {
String element = children[i];
if (element.contains(INSTRUCTORPREFIX)) {
payrollEntries[countParam] = children[i];
countParam++;
payrollEntries[countParam] = imgPaths[INSTRIMG];
countParam++;
payrollEntries[countParam] = comments[INSTRCOMMENTNOTPAID];
}
if (element.contains(SYSPREFIX)) {
payrollEntries[countParam] = children[i];
countParam++;
payrollEntries[countParam] = imgPaths[SYSIMG];
countParam++;
payrollEntries[countParam] = comments[SYSCOMMENT];
}
}
*/
public PayrollEntriesCollection(PayrollObj[] payrollObjs) {
this.payrollObjs = payrollObjs;
this.numEntries = countEntries(payrollObjs);
}
public PayrollObj[] getPayrollObj() {
return (payrollObjs);
}
public int getNumEntries() {
return (numEntries);
}
// Assumes the list is sorted by country name
private int countEntries(PayrollObj[] payrollObj) {
int n = 0;
String currentEnty, previousEnty = "None";
for (int i = 0; i < payrollObj.length; i++) {
currentEnty = payrollObj[i].getEnty();
if (!previousEnty.equals(currentEnty)) {
n = n + 1;
}
currentEnty = previousEnty;
}
return (n);
}
}
public static class PayrollObj {
private String country, iconImage, comment;
public PayrollObj(String country, String iconImage, String comment) {
setEnty(country);
setIconImage(iconImage);
setComment(comment);
}
public String toString() {
return (getEnty() + " (" + getComment() + ").");
}
public String getEnty() {
return (country);
}
public void setEnty(String country) {
this.country = country;
}
public String getComment() {
return (comment);
}
public void setComment(String comment) {
this.comment = comment;
}
public String getIconImage() {
return (iconImage);
}
public void setIconImage(String iconImage) {
this.iconImage = iconImage;
}
}
public static class PayrollEntriesListModel implements ListModel {
private PayrollEntriesCollection collection;
public PayrollEntriesListModel(PayrollEntriesCollection collection) {
this.collection = collection;
}
public Object getElementAt(int index) {
return (getPayrollObj()[index]);
}
public int getSize() {
return (getPayrollObj().length);
}
public void addListDataListener(ListDataListener l) {
}
public void removeListDataListener(ListDataListener l) {
}
}
public static class PayrollJListCustomModel extends JFrame {
public PayrollJListCustomModel() {
super("JList with a Custom Data Model");
PayrollEntriesCollection collection =
new PayrollEntriesCollection(getPayrollObj());
PayrollEntriesListModel listModel =
new PayrollEntriesListModel(collection);
JList sampleJList = new JList(listModel);
Font displayFont = new Font("Serif", Font.BOLD, 9);
sampleJList.setFont(displayFont);
}
}
public static class PayrollJListCustomRenderer extends JFrame {
public PayrollJListCustomRenderer() {
super("JList with a Custom Cell Renderer");
PayrollEntriesCollection collection =
new PayrollEntriesCollection(payrollObjs);
PayrollEntriesListModel listModel =
new PayrollEntriesListModel(collection);
JList sampleJList = new JList(listModel);
sampleJList.setCellRenderer(new PayrollObjRenderer());
sampleJList.setFont(displayFontSelectable);
setInitList(sampleJList);
}
}
public static class PayrollObjRenderer extends DefaultListCellRenderer {
private Hashtable iconTable = new Hashtable();
private JList list;
private static final Color HIGHLIGHT_COLOR = new Color(0, 0, 128);
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean hasFocus) {
JLabel label =
(JLabel) super.getListCellRendererComponent(list,
value,
index,
isSelected,
hasFocus);
if (label.getText().contains(INSTRUCTORPREFIX)) {
label.setToolTipText(instrNotPaidComment);
for (String str : PayrollFormController.completedUsers) {
if (label.getText().contains(INSTRUCTORPREFIX)) {
if (label.getText().contains(str)) {
label.setToolTipText(instrPaidComment);
}
}
}
}
if (label.getText().contains(SYSPREFIX)) {
label.setToolTipText(sysComment);
}
if (isSelected) {
setBackground(HIGHLIGHT_COLOR);
setForeground(Color.white);
} else {
setBackground(Color.white);
setForeground(Color.black);
}
if (value instanceof PayrollObj) {
PayrollObj payrollObj = (PayrollObj) value;
ImageIcon icon = (ImageIcon) iconTable.get(value);
if (icon == null) {
icon = new ImageIcon(payrollObj.getIconImage());
iconTable.put(value, icon);
}
label.setIcon(icon);
} else {
// Clear old icon; needed in 1st release of JDK 1.2
label.setIcon(null);
}
return (label);
}
}
private static class PayrollDataListener implements ListDataListener {
public PayrollDataListener() {
}
public void contentsChanged(ListDataEvent listDataEvent) {
appendEvent(listDataEvent);
}
public void intervalAdded(ListDataEvent listDataEvent) {
appendEvent(listDataEvent);
}
public void intervalRemoved(ListDataEvent listDataEvent) {
appendEvent(listDataEvent);
}
private void appendEvent(ListDataEvent listDataEvent) {
switch (listDataEvent.getType()) {
case ListDataEvent.CONTENTS_CHANGED:
System.out.println("Type: Contents Changed");
break;
case ListDataEvent.INTERVAL_ADDED:
System.out.println("Type: Interval Added");
break;
case ListDataEvent.INTERVAL_REMOVED:
System.out.println("Type: Interval Removed");
break;
}
System.out.println(", Index0: " + listDataEvent.getIndex0());
System.out.println(", Index1: " + listDataEvent.getIndex1());
DefaultListModel theModel = (DefaultListModel) listDataEvent.getSource();
System.out.println(theModel);
}
}
}
Output form creation of payroll records
CLASS
public class PayrollInstructorRegisterForm extends MasterPayrollForm implements ActionListener {:
buildForm() : 0: primaryKeyIndex :
error message is: : Describe the pay period to search for all Users with completed lessons: Selection List wil be created : make a selection to enter a Check Number and Submit. : AT// CLASS
public class MasterPayrollOptionsPanel extends MasterPayrollForm implements ActionListener, java.io.Serializable { :
--> in private void multiPymtBookingAction(java.awt.event.ActionEvent[ACTION_PERFORMED,cmd=Pay Instr,when=1344264197375,modifiers=Button1] on payInstrBtn) var: xxxxxxxxx : xxxxxxxx<--
: : :
error message is: Describe the pay period to search for all Users with completed lessons: Selection List wil be created : make a selection to enter a Check Number and Submit.
CLASS
public class PayrollInstructorRegisterForm extends MasterPayrollForm implements ActionListener {:
chkEmptyFields() : true: returns :
--> in public boolean formFundementalValidation(2012-07-01T00:00:00.000-05:00 , 2012-10-01T00:00:00.000-05:00) var: (DateTime aPeriodStartValue, DateTime aPeriodEndValue)<--
CLASS
public class PayrollInstructorRegisterForm extends MasterPayrollForm implements ActionListener {:
--> in public boolean formFundementalValidation(2012-07-01T00:00:00.000-05:00 , 2012-10-01T00:00:00.000-05:00) var: (DateTime aPeriodStartValue, DateTime aPeriodEndValue)<--
: 2012-10-01T00:00:00.000-05:002012-07-01T00:00:00.000-05:00: if (periodEndDate.isAfter(periodStartValue) || periodEndValue.equals(periodStartValue)) { :
message: Choose Update to build a Payroll Selection List And make a selection to enter a Check Number and Submit.
--> in public void updateBtnAction() var: xxxxxxxxx : xxxxxxxx<--
// System.out.println(M);
2012-08-06
--> in public int[] retrieveAllBookings() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] retrieveAllBookings() var: xxxxxxxxx : xxxxxxxx<--
: xml selectBookNumBookingTotals:
SELECT book_num FROM booking_totals
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] retrieveAllBookings() var: xxxxxxxxx : xxxxxxxx<--
: 17: rowCount:
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] retrieveAllBookings() var: xxxxxxxxx : xxxxxxxx<--
: xml selectBookNumBookingTotals:
SELECT book_num FROM booking_totals
361: processRecords [+0+]:
362: processRecords [+1+]:
363: processRecords [+2+]:
364: processRecords [+3+]:
289: processRecords [+4+]:
290: processRecords [+5+]:
272: processRecords [+6+]:
299: processRecords [+7+]:
372: processRecords [+8+]:
373: processRecords [+9+]:
374: processRecords [+10+]:
306: processRecords [+11+]:
307: processRecords [+12+]:
308: processRecords [+13+]:
309: processRecords [+14+]:
310: processRecords [+15+]:
311: processRecords [+16+]:
CLASS
public class PayrollInstructorRegisterForm extends MasterPayrollForm implements ActionListener {:
--> in public void updateBtnAction() var: xxxxxxxxx : xxxxxxxx<--
: : BottomComponents.createPayrollLinkList(aNums, thisFrameTitle,thisTabName PROFILE, periodStartValue, periodEndValue); :
--> in public static void createPayrollLinkList(17 , Payroll for instructors , for 2012-07-01 - 2012-10-01.
, instr_ , 2012-07-01 , 2012-10-01) var: ( int[] aNums, String aFrameTitle, String aTabName, String aPROFILE, Date aPeriodStartDate, Date aPeriodEndDate)<--
--> in public void init_(){ { { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class BottomComponents extends JPanel implements PropertyChangeListener {:
--> in public void init_(){ { { var: xxxxxxxxx : xxxxxxxx<--
: 16 : 16 var : iconWidth : iconHeight
CLASS
public class BottomComponents extends JPanel implements PropertyChangeListener {:
--> in public static void createPayrollLinkList(17 , Payroll for instructors , for 2012-07-01 - 2012-10-01.
, instr_ , 2012-07-01 , 2012-10-01) var: ( int[] aNums, String aFrameTitle, String aTabName, String aPROFILE, Date aPeriodStartDate, Date aPeriodEndDate)<--
: : caller
--> : MusicSystems.addNewBottomPanel(progressBar, statusAnimationLabel, triggerLbl, statusMessageLabel) : var: xxxx : xxxxxxx <--
--> public static void addNewBottomPanel() var: ((JPanel p)<--
CLASS
public class BottomComponents extends JPanel implements PropertyChangeListener {:
: : triggerLbl.getText() :
--> in public PayrollTotalsLinkListWorker(17 , Payroll for instructors , for 2012-07-01 - 2012-10-01.
, instr_ , 2012-07-01 , 2012-10-01) var: (int[] nums,String frameTitle,String tabName,String aProfile,DateTime aPeriodStartDate,DateTime aPeriodEndDate))<--
--> in init_( Payroll for instructors , 2012-07-01 , 2012-10-01) var: (String frameTitle,PayrollFormController.periodStart + c + PayrollFormController.periodEnd+<--
CLASS
public class BottomComponents extends JPanel implements PropertyChangeListener {:
--> in public static void createPayrollLinkList(17 , Payroll for instructors , for 2012-07-01 - 2012-10-01.
, instr_ , 2012-07-01 , 2012-10-01) var: ( int[] aNums, String aFrameTitle, String aTabName, String aPROFILE, Date aPeriodStartDate, Date aPeriodEndDate)<--
: : caller
--> : worker = PayrollTotalsLinkListWorker;(17 , Payroll for instructors , for 2012-07-01 - 2012-10-01.
, instr_ , 2012-07-01 , 2012-10-01) var: ( 17 , Payroll for instructors , instr_ , 2012-07-01 , 2012-10-01)<--
--> in protected String doInBackground() throws Exception { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class PayrollTotalsLinkListWorker extends SwingWorker<String, String> {:
--> in protected String doInBackground() throws Exception { var: xxxxxxxxx : xxxxxxxx<--
: 0: i :
361: strNum[+0+]:
--> in public void process {(361) var: (String element)<--
CLASS
public class BottomComponents extends JPanel implements PropertyChangeListener {:
: STARTED: } else if (SwingWorker.StateValue.STARTED == evt.getNewValue()) {:
CLASS
public class PayrollTotalsLinkListWorker extends SwingWorker<String, String> {:
--> in protected String doInBackground() throws Exception { var: xxxxxxxxx : xxxxxxxx<--
: 0: if (count == 1) {:
--> in private void loadUsers(17 , instr_ , Payroll for instructors ) var: (int count, int[]nums),String aProfile,String aFrameTitle{<--
// System.out.println(M);
2012-08-06
--> in public PayrollGrandTotals() {{ var: xxxxxxxxx : xxxxxxxx<--
--> in public String[] loadUsersPerStatus(instr_ , COMPLETE) var: (int[] aNums, String aProfile, String aStatus) <--
--> in public Connection connect() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public String[] loadUsersPerStatus(instr_ , COMPLETE) var: (int[] aNums, String aProfile, String aStatus) <--
: xml selectBookingTotalsPerStatus:
SELECT instr_uid FROM booking_totals WHERE finalized=?
instr2: usersPerStatusArray[+0+]:
instr1: usersPerStatusArray[+1+]:
CLASS
public class PayrollTotalsLinkListWorker extends SwingWorker<String, String> {:
--> in private void loadUsers(17 , instr_ , Payroll for instructors ) var: (int count, int[]nums),String aProfile,String aFrameTitle{<--
: 2: allUsersCompletedRecordsCount :
--> in private void sortUsersRecordsListPerUser(instr2 , instr_) var: (String user,String aProfile)<--
CLASS
public class PayrollTotalsLinkListWorker extends SwingWorker<String, String> {:
--> in private void sortUsersRecordsListPerUser(instr2 , instr_) var: (String user,String aProfile)<--
: instr2 : instr_:user : thisProfile
--> in public PayrollTotals(){ var: xxxxxxxxx : xxxxxxxx<--
// System.out.println(M);
2012-08-06
--> in public int[] collectBookNumsForInstrComplete(instr2 , COMPLETE) var: (String aUser,String aStatus) <--
--> in public Connection connect() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] collectBookNumsForInstrComplete(instr2 , COMPLETE) var: (String aUser,String aStatus) <--
: xml selectBookingTotalsPerInstrAndStatus:
SELECT book_num FROM booking_totals WHERE instr_uid=? AND finalized=?
361: allThisUsersBookings[+0+]:
362: allThisUsersBookings[+1+]:
363: allThisUsersBookings[+2+]:
364: allThisUsersBookings[+3+]:
// System.out.println(M);
2012-08-06
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
--> in public Connection connect() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: xml selectBookingTotalsStartDatePerBookNum:
SELECT book_start_date FROM booking_totals WHERE book_num=?
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-24T00:00:00.000-05:00: bookStart date value :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-01: periodStartDate; :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-10-01: periodEndDate :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
2012-07-24T00:00:00.000-05:00 : : true: test date : dt.isAfter(periodStartValue); :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: true: bGoodDate:
361 relativeBookNums[+0+]:
--> in public Connection connect() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: xml selectBookingTotalsStartDatePerBookNum:
SELECT book_start_date FROM booking_totals WHERE book_num=?
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-24T00:00:00.000-05:00: bookStart date value :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-01: periodStartDate; :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-10-01: periodEndDate :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
2012-07-24T00:00:00.000-05:00 : : true: test date : dt.isAfter(periodStartValue); :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: true: bGoodDate:
361 relativeBookNums[+1+]:
362 relativeBookNums[+1+]:
--> in public Connection connect() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: xml selectBookingTotalsStartDatePerBookNum:
SELECT book_start_date FROM booking_totals WHERE book_num=?
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-24T00:00:00.000-05:00: bookStart date value :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-01: periodStartDate; :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-10-01: periodEndDate :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
2012-07-24T00:00:00.000-05:00 : : true: test date : dt.isAfter(periodStartValue); :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: true: bGoodDate:
361 relativeBookNums[+2+]:
362 relativeBookNums[+2+]:
363 relativeBookNums[+2+]:
--> in public Connection connect() var: xxxxxxxxx : xxxxxxxx<--
--> in public boolean connect() { var: xxxxxxxxx : xxxxxxxx<--
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: xml selectBookingTotalsStartDatePerBookNum:
SELECT book_start_date FROM booking_totals WHERE book_num=?
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-24T00:00:00.000-05:00: bookStart date value :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-07-01: periodStartDate; :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
: 2012-10-01: periodEndDate :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, String thisStatus)<--
2012-07-24T00:00:00.000-05:00 : : true: test date : dt.isAfter(periodStartValue); :
CLASS
public class ConnectBookingTotalsDAO extends MasterForm implements BookingTotalsDAO { {:
--> in public int[] bookNumsByTestingDateIsInPayperiod(4 , 2012-07-01 , 2012-10-01) var: (int[] aAllThisUsersBookings, DateTime thisPeriodStartDate, DateTime thisPeriodEndDate, Strin
cisumma 0 Newbie Poster
NormR1 563 Posting Sage Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.