Skip to content

Commit 1c681b5

Browse files
committed
Automated Java code formatting changes
1 parent 77cbb93 commit 1c681b5

File tree

146 files changed

+1557
-1531
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1557
-1531
lines changed

src/main/java/edu/rpi/legup/app/Config.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
import org.xml.sax.SAXException;
1414

1515
/**
16-
* The {@code Config} class manages the configuration for puzzles by loading configuration data
17-
* from an XML file. It provides methods to access puzzle class names, display names, and their
18-
* file creation statuses
16+
* The {@code Config} class manages the configuration for puzzles by loading configuration data from
17+
* an XML file. It provides methods to access puzzle class names, display names, and their file
18+
* creation statuses
1919
*/
2020
public class Config {
2121
private static final Logger Logger = LogManager.getLogger(Config.class.getName());
@@ -80,8 +80,8 @@ public static String convertClassNameToDisplayName(String className) {
8080
}
8181

8282
/**
83-
* Converts the display name of the puzzle back to its corresponding class name.
84-
* For example: convertDisplayNameToClassName("Tree Tent") returns "TreeTent"
83+
* Converts the display name of the puzzle back to its corresponding class name. For example:
84+
* convertDisplayNameToClassName("Tree Tent") returns "TreeTent"
8585
*
8686
* @param displayName the display name of the puzzle
8787
* @return the class name of the puzzle as a String
@@ -110,8 +110,8 @@ public List<String> getPuzzleNames() {
110110
}
111111

112112
/**
113-
* Returns a list of the display names of the puzzles that can have files created and edited within
114-
* the proof editor
113+
* Returns a list of the display names of the puzzles that can have files created and edited
114+
* within the proof editor
115115
*
116116
* @return a List of puzzle display names as Strings with file creation enabled
117117
*/

src/main/java/edu/rpi/legup/app/GameBoardFacade.java

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
import org.xml.sax.SAXException;
3333

3434
/**
35-
* {@code GameBoardFacade} is a class designed to manage the game board operations within the application.
36-
* It integrates various components such as UI elements, puzzle management, and history tracking
35+
* {@code GameBoardFacade} is a class designed to manage the game board operations within the
36+
* application. It integrates various components such as UI elements, puzzle management, and history
37+
* tracking
3738
*/
3839
public class GameBoardFacade implements IHistorySubject {
3940
private static final Logger LOGGER = LogManager.getLogger(GameBoardFacade.class.getName());
@@ -76,9 +77,7 @@ public static synchronized GameBoardFacade getInstance() {
7677
return instance;
7778
}
7879

79-
/**
80-
* Initializes the UI components
81-
*/
80+
/** Initializes the UI components */
8281
public void initializeUI() {
8382
EventQueue.invokeLater(
8483
() -> {
@@ -101,18 +100,14 @@ public void setPuzzle(Puzzle puzzle) {
101100
this.history.clear();
102101
}
103102

104-
/**
105-
* Clears the current puzzle
106-
*/
103+
/** Clears the current puzzle */
107104
public void clearPuzzle() {
108105
this.puzzle = null;
109106
this.curFileName = null;
110107
this.history.clear();
111108
}
112109

113-
/**
114-
* Sets up the configuration by initializing the Config object
115-
*/
110+
/** Sets up the configuration by initializing the Config object */
116111
public static void setupConfig() {
117112
Config config = null;
118113
try {
@@ -203,7 +198,7 @@ public boolean validateTextInput(String game, String[] statements) throws Runtim
203198
* @param columns the number of columns on the board
204199
*/
205200
public void loadPuzzle(String game, int rows, int columns) throws RuntimeException {
206-
if (!game.equals("")) {
201+
if (!game.isEmpty()) {
207202
String qualifiedClassName = config.getPuzzleClassForName(game);
208203
LOGGER.debug("Loading " + qualifiedClassName);
209204

@@ -235,15 +230,14 @@ public void loadPuzzle(String game, int rows, int columns) throws RuntimeExcepti
235230
} catch (IllegalArgumentException exception) {
236231
throw new IllegalArgumentException(exception.getMessage());
237232
} catch (ClassNotFoundException
238-
| NoSuchMethodException
239-
| InvocationTargetException
240-
| IllegalAccessException
241-
| InstantiationException e) {
233+
| NoSuchMethodException
234+
| InvocationTargetException
235+
| IllegalAccessException
236+
| InstantiationException e) {
242237
LOGGER.error(e);
243238
throw new RuntimeException("Puzzle creation error");
244239
}
245240
}
246-
247241
}
248242

249243
/**
@@ -297,7 +291,8 @@ public void loadPuzzle(String game, String[] statements) {
297291
* Loads a puzzle file from the specified file
298292
*
299293
* @param fileName file name of the board file
300-
* @throws InvalidFileFormatException if the file format is invalid or if the file cannot be created
294+
* @throws InvalidFileFormatException if the file format is invalid or if the file cannot be
295+
* created
301296
*/
302297
public void loadPuzzle(String fileName) throws InvalidFileFormatException {
303298
try {
@@ -314,7 +309,8 @@ public void loadPuzzle(String fileName) throws InvalidFileFormatException {
314309
* Loads a puzzle into the editor from the specified file name
315310
*
316311
* @param fileName the name of the file to load
317-
* @throws InvalidFileFormatException if the file format is invalid or if the file cannot be created
312+
* @throws InvalidFileFormatException if the file format is invalid or if the file cannot be
313+
* created
318314
*/
319315
public void loadPuzzleEditor(String fileName) throws InvalidFileFormatException {
320316
try {
@@ -331,7 +327,8 @@ public void loadPuzzleEditor(String fileName) throws InvalidFileFormatException
331327
* Loads a puzzle into the editor from the specified input stream
332328
*
333329
* @param inputStream the input stream to load the puzzle from
334-
* @throws InvalidFileFormatException if the input stream cannot be processed or the file format is invalid
330+
* @throws InvalidFileFormatException if the input stream cannot be processed or the file format
331+
* is invalid
335332
*/
336333
public void loadPuzzleEditor(InputStream inputStream) throws InvalidFileFormatException {
337334
Document document;

src/main/java/edu/rpi/legup/app/InvalidConfigException.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package edu.rpi.legup.app;
22

33
/**
4-
* {@code InvalidConfigException} is a custom exception class for handling invalid configuration errors
4+
* {@code InvalidConfigException} is a custom exception class for handling invalid configuration
5+
* errors
56
*/
67
public class InvalidConfigException extends Exception {
78
/**

src/main/java/edu/rpi/legup/app/LegupPreferences.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55
import java.util.prefs.Preferences;
66

77
/**
8-
* {@code LegupPreferences} is a class responsible for managing user preferences within the application.
9-
* It uses Java's Preferences API to store and retrieve preferences, and it provides methods for accessing and updating these preferences.
8+
* {@code LegupPreferences} is a class responsible for managing user preferences within the
9+
* application. It uses Java's Preferences API to store and retrieve preferences, and it provides
10+
* methods for accessing and updating these preferences.
1011
*/
1112
public class LegupPreferences {
1213

@@ -77,8 +78,8 @@ public class LegupPreferences {
7778
}
7879

7980
/**
80-
* Gets the legup preferences singleton instance
81-
* This method ensures that only one instance of LegupPreferences exists
81+
* Gets the legup preferences singleton instance This method ensures that only one instance of
82+
* LegupPreferences exists
8283
*
8384
* @return the singleton instance of LegupPreferences
8485
*/
@@ -90,8 +91,8 @@ public static LegupPreferences getInstance() {
9091
}
9192

9293
/**
93-
* Private constructor to prevent instantiation from outside the class
94-
* Use {@link #getInstance()} to access the singleton instance
94+
* Private constructor to prevent instantiation from outside the class Use {@link
95+
* #getInstance()} to access the singleton instance
9596
*/
9697
private LegupPreferences() {}
9798

src/main/java/edu/rpi/legup/controller/Controller.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
import javax.swing.*;
77

88
/**
9-
* {@code Controller} is an abstract class designed to handle various mouse events and provide control functionality for a {@code ScrollView}.
10-
* It implements several mouse event interfaces to manage interactions such as panning and zooming within a {@code ScrollView}
9+
* {@code Controller} is an abstract class designed to handle various mouse events and provide
10+
* control functionality for a {@code ScrollView}. It implements several mouse event interfaces to
11+
* manage interactions such as panning and zooming within a {@code ScrollView}
1112
*/
1213
public abstract class Controller implements MouseMotionListener, MouseListener, MouseWheelListener {
1314
protected ScrollView viewer;

src/main/java/edu/rpi/legup/controller/CursorController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
import java.util.TimerTask;
88

99
/**
10-
* {@code CursorController} provides functionality for managing the cursor appearance during actions that take a certain amount of time.
11-
* It allows for the display of a busy cursor while an action is being processed and reverts to the default cursor afterward
10+
* {@code CursorController} provides functionality for managing the cursor appearance during actions
11+
* that take a certain amount of time. It allows for the display of a busy cursor while an action is
12+
* being processed and reverts to the default cursor afterward
1213
*/
1314
public class CursorController {
1415
public static final Cursor BUSY_CURSOR = new Cursor(Cursor.WAIT_CURSOR);

src/main/java/edu/rpi/legup/controller/EditorElementController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
import javax.swing.*;
1111

1212
/**
13-
* {@code EditorElementController} manages actions related to UI elements within the puzzle editor environment.
14-
* It handles button presses, updates element selection, and manages visual states of buttons
13+
* {@code EditorElementController} manages actions related to UI elements within the puzzle editor
14+
* environment. It handles button presses, updates element selection, and manages visual states of
15+
* buttons
1516
*/
1617
public class EditorElementController implements ActionListener {
1718
protected Object lastSource;

src/main/java/edu/rpi/legup/controller/RuleController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
import java.util.List;
1818

1919
/**
20-
* The RuleController class is responsible for handling UI events related to rule buttons
21-
* in the RulePanel of the Legup application. It implements ActionListener to process action
22-
* events triggered by rule buttons and applies rules to the puzzle accordingly
20+
* The RuleController class is responsible for handling UI events related to rule buttons in the
21+
* RulePanel of the Legup application. It implements ActionListener to process action events
22+
* triggered by rule buttons and applies rules to the puzzle accordingly
2323
*/
2424
public class RuleController implements ActionListener {
2525
protected Object lastSource;

src/main/java/edu/rpi/legup/controller/TreeController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import javax.swing.*;
1313

1414
/**
15-
* The TreeController class handles UI events from a TreePanel.
16-
* It extends the Controller class to provide specific behavior for tree interactions
15+
* The TreeController class handles UI events from a TreePanel. It extends the Controller class to
16+
* provide specific behavior for tree interactions
1717
*/
1818
public class TreeController extends Controller {
1919
/**

src/main/java/edu/rpi/legup/history/AddTreeElementCommand.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
import java.util.List;
1111
import java.util.Map;
1212

13-
1413
/**
15-
* The AddTreeElementCommand class represents a command to add tree elements to the proof tree.
16-
* It extends the PuzzleCommand class to handle the addition of tree elements and undo operation.
14+
* The AddTreeElementCommand class represents a command to add tree elements to the proof tree. It
15+
* extends the PuzzleCommand class to handle the addition of tree elements and undo operation.
1716
*/
1817
public class AddTreeElementCommand extends PuzzleCommand {
1918

@@ -33,8 +32,8 @@ public AddTreeElementCommand(TreeViewSelection selection) {
3332
}
3433

3534
/**
36-
* Executes the command to add selected tree elements to the tree.
37-
* Updates the puzzle and tree view accordingly
35+
* Executes the command to add selected tree elements to the tree. Updates the puzzle and tree
36+
* view accordingly
3837
*/
3938
@Override
4039
public void executeCommand() {
@@ -104,8 +103,8 @@ public String getErrorString() {
104103
}
105104

106105
/**
107-
* Undoes the command by removing the added tree elements.
108-
* Updates the puzzle and tree view accordingly
106+
* Undoes the command by removing the added tree elements. Updates the puzzle and tree view
107+
* accordingly
109108
*/
110109
@Override
111110
public void undoCommand() {

0 commit comments

Comments
 (0)