From: Freek D. <mac...@us...> - 2010-01-31 22:23:12
|
Update of /cvsroot/rails/18xx/rails/ui/swing/elements In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv382/rails/ui/swing/elements Modified Files: CheckBoxDialog.java DialogOwner.java Field.java GUIStockSpace.java RadioButtonDialog.java Log Message: Fix indentation: Java files contain 4 spaces, not tabs Index: Field.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/elements/Field.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Field.java 14 Jan 2010 20:45:43 -0000 1.10 --- Field.java 31 Jan 2010 22:22:34 -0000 1.11 *************** *** 47,51 **** public Field(ModelObject modelObject) { ! this(""); //this(modelObject.getText()); this.modelObject = modelObject; --- 47,51 ---- public Field(ModelObject modelObject) { ! this(""); //this(modelObject.getText()); this.modelObject = modelObject; *************** *** 98,102 **** setText((String) o2); } else if (o2 instanceof ViewUpdate) { ! updateDetails ((ViewUpdate)o2); } else { setText(modelObject.toString()); --- 98,102 ---- setText((String) o2); } else if (o2 instanceof ViewUpdate) { ! updateDetails ((ViewUpdate)o2); } else { setText(modelObject.toString()); *************** *** 105,117 **** protected void updateDetails (ViewUpdate vu) { ! for (String key : vu.getKeys()) { ! if (ViewUpdate.TEXT.equalsIgnoreCase(key)) { ! setText (vu.getText()); ! } else if (ViewUpdate.BGCOLOUR.equalsIgnoreCase(key)) { ! setBackground((Color)vu.getValue(key)); ! normalBgColour = getBackground(); ! setForeground (Util.isDark(normalBgColour) ? Color.WHITE : Color.BLACK); ! } ! } } --- 105,117 ---- protected void updateDetails (ViewUpdate vu) { ! for (String key : vu.getKeys()) { ! if (ViewUpdate.TEXT.equalsIgnoreCase(key)) { ! setText (vu.getText()); ! } else if (ViewUpdate.BGCOLOUR.equalsIgnoreCase(key)) { ! setBackground((Color)vu.getValue(key)); ! normalBgColour = getBackground(); ! setForeground (Util.isDark(normalBgColour) ? Color.WHITE : Color.BLACK); ! } ! } } *************** *** 123,132 **** public void addDependent (JComponent dependent) { ! if (dependents == null) dependents = new ArrayList<JComponent>(2); ! dependents.add(dependent); } public List<JComponent> getDependents () { ! return dependents; } --- 123,132 ---- public void addDependent (JComponent dependent) { ! if (dependents == null) dependents = new ArrayList<JComponent>(2); ! dependents.add(dependent); } public List<JComponent> getDependents () { ! return dependents; } Index: DialogOwner.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/elements/DialogOwner.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DialogOwner.java 8 Jan 2010 21:27:54 -0000 1.2 --- DialogOwner.java 31 Jan 2010 22:22:34 -0000 1.3 *************** *** 7,16 **** public interface DialogOwner { ! public void dialogActionPerformed (); ! public JDialog getCurrentDialog(); ! public PossibleAction getCurrentDialogAction(); ! public void setCurrentDialog (JDialog dialog, PossibleAction action); } --- 7,16 ---- public interface DialogOwner { ! public void dialogActionPerformed (); ! public JDialog getCurrentDialog(); ! public PossibleAction getCurrentDialogAction(); ! public void setCurrentDialog (JDialog dialog, PossibleAction action); } Index: GUIStockSpace.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/elements/GUIStockSpace.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GUIStockSpace.java 19 Dec 2009 18:32:34 -0000 1.9 --- GUIStockSpace.java 31 Jan 2010 22:22:34 -0000 1.10 *************** *** 54,58 **** priceLabel.setBackground(model.getColour()); priceLabel.setForeground(Util.isDark(priceLabel.getBackground()) ! ? Color.WHITE : Color.BLACK); priceLabel.setVerticalTextPosition(SwingConstants.TOP); --- 54,58 ---- priceLabel.setBackground(model.getColour()); priceLabel.setForeground(Util.isDark(priceLabel.getBackground()) ! ? Color.WHITE : Color.BLACK); priceLabel.setVerticalTextPosition(SwingConstants.TOP); Index: CheckBoxDialog.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/elements/CheckBoxDialog.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CheckBoxDialog.java 14 Jan 2010 20:45:09 -0000 1.6 --- CheckBoxDialog.java 31 Jan 2010 22:22:34 -0000 1.7 *************** *** 131,135 **** } } else if (arg0.getSource().equals(cancelButton)) { ! return; } setVisible(false); --- 131,135 ---- } } else if (arg0.getSource().equals(cancelButton)) { ! return; } setVisible(false); *************** *** 139,143 **** public String[] getOptions () { ! return options; } --- 139,143 ---- public String[] getOptions () { ! return options; } Index: RadioButtonDialog.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/elements/RadioButtonDialog.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** RadioButtonDialog.java 14 Jan 2010 20:44:45 -0000 1.7 --- RadioButtonDialog.java 31 Jan 2010 22:22:34 -0000 1.8 *************** *** 75,83 **** if (selectedOption < 0) { ! // If an option has been preselected, selection is mandatory. ! cancelButton = new JButton(LocalText.getText("Cancel")); ! cancelButton.setMnemonic(KeyEvent.VK_C); ! cancelButton.addActionListener(this); ! buttonPane.add(cancelButton); } --- 75,83 ---- if (selectedOption < 0) { ! // If an option has been preselected, selection is mandatory. ! cancelButton = new JButton(LocalText.getText("Cancel")); ! cancelButton.setMnemonic(KeyEvent.VK_C); ! cancelButton.addActionListener(this); ! buttonPane.add(cancelButton); } |