Applied Java Patterns Stephen phần 4 pps
... (!projectItems.contains(element)){ 40 . projectItems.add(element); 41 . } 42 . } 43 . public void removeProjectItem(ProjectItem element){ 44 . projectItems.remove(element); 45 . } 46 . } The getTimeRequired ... 13. } 14. 144 41 . public void setOrganization(String newOrganization){ organization = newOrganization; } 42 . 43 . public void updateModel(String newFirstName, String...
Ngày tải lên: 09/08/2014, 12:22
... (appointments.containsValue(appointment)){ 40 . appointments.remove(appointment.getStartDate()); 41 . } 42 . } 43 . 44 . public boolean join(long transactionID){ 45 . if (currentTransaction != 0){ 46 . return false; 47 . } else { 48 . ... SessionException.CONTACT_SELECT_REQUIRED); 39. } 40 . if (addresses.indexOf(address) == -1){ 41 . addresses.add(address); 42 . } 43 . contact....
Ngày tải lên: 09/08/2014, 12:22
... Contact .java 1. import java. awt.GridLayout; 2. import java. io.Serializable; 3. import javax.swing.JComponent; 4. import javax.swing.JLabel; 5. import javax.swing.JPanel; 6. import javax.swing.JTextField; ... city = newCity; } 40 . public void setState(String newState){ state = newState; } 41 . public void setZipCode(String newZip){ zipCode = newZip; } 42 . 43 . public Object c...
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 2 potx
... Example 2. 34 ObserverGui .java 1. import java. awt.Container; 2. import java. awt.event.WindowAdapter; 3. import java. awt.event.WindowEvent; 4. import javax.swing.BoxLayout; 5. import javax.swing.JFrame; ... editor.setContactFields(contact); 40 . } 41 . } 42 . public Contact [] getAllContacts(){ 43 . return (Contact [])contacts.toArray(new Contact[1]); 44 . } 45 . public vo...
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 3 pptx
... appointments); 40 . currentState = nextState; 41 . } 42 . public void edit(){ } 43 . } 44 . 45 . private class CleanState implements State{ 46 . private State nextState = new DirtyState(this); 47 . 48 . ... 0){ 40 . compareResult = textComparator.compare(c1.getFirstName(),c2.getFirstName()); 41 . } 42 . return compareResult; 43 . } 44 . else return textComparator.compare(o1, o2)...
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 6 ppt
... java. awt.color, java. awt.datatransfer, java. awt.dnd, java. awt.font, java. awt.geom, java. awt.im, java. awt.im.spi, java. awt.image, java. awt.image.renderable, java. awt.print Use: J2SE (JDK1.0, greatly ... package is javax.swing Other packages include javax.swing.border, javax.swing.colorchooser, javax.swing.event, javax.swing.filechooser, javax.swing.plaf, javax.swing.pl...
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 7 docx
... Example A .44 CommandGui .java 1. import java. awt.Container; 2. import java. awt.event.ActionListener; 3. import java. awt.event.WindowAdapter; 4. import java. awt.event.ActionEvent; 5. import java. awt.event.WindowEvent; ... editorPanel.add(updatedLocation); 40 . content.add(editorPanel); 41 . 42 . displayPanel = new JPanel(); 43 . display = new JTextArea(10, 40 ); 44 . di...
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 8 potx
... 0){ 40 . compareResult = textComparator.compare(c1.getFirstName(), c2.getFirstName()); 41 . } 42 . return compareResult; 43 . } 44 . else return textComparator.compare(o1, o2); 45 . } 46 . 47 . ... listThree.add("How green was my Java& quot;); 43 . listThree.add("URL, sweet URL"); 44 . data.add(listOne); 45 . data.add(listTwo); 46 . data.add(listThree); 47 . retu...
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 9 pot
... getNumberFormat(){ 41 . return currency.getNumberFormat(); 42 . } 43 . public String getPhonePrefix(){ 44 . return PhoneNumber.getSelectedInterPrefix(); 45 . } 46 . public String getProperty(String key){ 47 . ... removeProjectItem(ProjectItem element){ 40 . projectItems.remove(element); 41 . } 42 . 43 . public String toString(){ 44 . return "Task: " + name; 45 . } 46 ....
Ngày tải lên: 09/08/2014, 12:22
Applied Java Patterns Stephen phần 10 ppt
... + clientIndex++; 335 41 . state.equals(address.state) && 42 . zipCode.equals(address.zipCode)){ 43 . return true; 44 . } 45 . return false; 46 . } 47 . } 48 . 49 . public String toString(){ ... (appointments.containsValue(appointment)){ 40 . appointments.remove(appointment.getStartDate()); 41 . } 42 . } 43 . 44 . public boolean join(long transactionID){ 45 . if (curre...
Ngày tải lên: 09/08/2014, 12:22