Skip to content

Commit f9864a7

Browse files
committed
Indentation fixes
1 parent fba14b8 commit f9864a7

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

src/simplejavatexteditor/AutoComplete.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,4 +280,5 @@ public void removeUpdate(DocumentEvent e) {
280280
@Override
281281
public void changedUpdate(DocumentEvent e) {
282282
}
283-
}
283+
284+
}

src/simplejavatexteditor/SupportedKeywords.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* to this class. Then, update the switch statement in UI.java.</p>
1212
*/
1313
public class SupportedKeywords {
14+
1415
private String[] java = {"abstract", "assert", "boolean",
1516
"break", "byte", "case", "catch", "char", "class", "const",
1617
"continue", "default", "do", "double", "else", "extends", "false",
@@ -59,4 +60,5 @@ public ArrayList<String> setKeywords(String[] arr) {
5960
}
6061
return al;
6162
}
62-
}
63+
64+
}

src/simplejavatexteditor/UI.java

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @modemail [email protected]
1717
*
1818
* @modifiedby Marcus Redgrave-Close
19-
* @modemail [email protected]
19+
* @modemail [email protected]
2020
*/
2121

2222
package simplejavatexteditor;
@@ -37,16 +37,17 @@
3737
import javax.swing.text.DefaultEditorKit;
3838

3939
public class UI extends JFrame implements ActionListener {
40+
4041
private static final long serialVersionUID = 1L;
4142
private final Container container;
4243
private final JTextArea textArea;
4344
private final JMenuBar menuBar;
4445
private final JMenu menuFile, menuEdit, menuFind, menuAbout;
4546
private final JMenuItem newFile, openFile, saveFile, close, cut, copy, paste, clearFile, selectAll, quickFind,
46-
aboutMe, aboutSoftware, wordWrap;
47+
aboutMe, aboutSoftware, wordWrap;
4748
private final JToolBar mainToolbar;
4849
JButton newButton, openButton, saveButton, clearButton, quickButton, aboutMeButton, aboutButton, closeButton,
49-
spaceButton1, spaceButton2;
50+
spaceButton1, spaceButton2;
5051
private final Action selectAllAction;
5152

5253
// setup icons - File Menu
@@ -126,7 +127,7 @@ public UI() {
126127

127128
// Set Actions:
128129
selectAllAction = new SelectAllAction("Select All", clearIcon, "Select all text", new Integer(KeyEvent.VK_A),
129-
textArea);
130+
textArea);
130131

131132
this.setJMenuBar(menuBar);
132133

@@ -194,15 +195,15 @@ public UI() {
194195
*/
195196
wordWrap.addActionListener(new ActionListener()
196197
{
197-
public void actionPerformed(ActionEvent ev) {
198-
// If wrapping is false then after clicking on menuitem the word wrapping will be enabled
199-
if(textArea.getLineWrap()==false) {
200-
/* Setting word wrapping to true */
201-
textArea.setLineWrap(true);
202-
} else {
203-
// else if wrapping is true then after clicking on menuitem the word wrapping will be disabled
204-
/* Setting word wrapping to false */
205-
textArea.setLineWrap(false);
198+
public void actionPerformed(ActionEvent ev) {
199+
// If wrapping is false then after clicking on menuitem the word wrapping will be enabled
200+
if(textArea.getLineWrap()==false) {
201+
/* Setting word wrapping to true */
202+
textArea.setLineWrap(true);
203+
} else {
204+
// else if wrapping is true then after clicking on menuitem the word wrapping will be disabled
205+
/* Setting word wrapping to false */
206+
textArea.setLineWrap(false);
206207
}
207208
}
208209
});
@@ -306,8 +307,9 @@ protected JTextArea getEditor() {
306307

307308
public void actionPerformed (ActionEvent e) {
308309
// If the source of the event was our "close" option
309-
if (e.getSource() == close || e.getSource() == closeButton)
310+
if (e.getSource() == close || e.getSource() == closeButton) {
310311
this.dispose(); // dispose all resources and close the application
312+
}
311313

312314
// If the source was the "new" file option
313315
else if (e.getSource() == newFile || e.getSource() == newButton) {
@@ -442,4 +444,5 @@ public void actionPerformed(ActionEvent e) {
442444
textArea.selectAll();
443445
}
444446
}
447+
445448
}

0 commit comments

Comments
 (0)