Skip to content

Commit bf2803d

Browse files
authored
Merge pull request #5873 from kwvanderlinde/refactor/3777-tools
Move tools to a subproject
2 parents cf015fa + fa0e1d3 commit bf2803d

File tree

13 files changed

+76
-595
lines changed

13 files changed

+76
-595
lines changed

settings.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,4 @@ include 'services:webservice'
1616
*/
1717

1818
rootProject.name = 'MapTool'
19-
include 'common', 'dicelib', 'messages', ':clientserver'
20-
19+
include 'common', 'dicelib', 'messages', ':clientserver', 'tools'

src/main/java/net/rptools/maptool/client/swing/PositionalLayout.java

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
import java.awt.LayoutManager2;
2121
import java.util.HashMap;
2222
import java.util.Map;
23-
import javax.swing.JButton;
24-
import javax.swing.JFrame;
25-
import javax.swing.JPanel;
2623

2724
/** */
2825
public class PositionalLayout implements LayoutManager2 {
@@ -169,33 +166,4 @@ public void removeLayoutComponent(Component comp) {
169166

170167
compPositionMap.remove(comp);
171168
}
172-
173-
public static void main(String[] args) {
174-
175-
JFrame frame = new JFrame();
176-
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
177-
JPanel panel = new PositionalPanel();
178-
179-
panel.add(createButton("NW"), Position.NW);
180-
panel.add(createButton("N"), Position.N);
181-
panel.add(createButton("NE"), Position.NE);
182-
panel.add(createButton("W"), Position.W);
183-
panel.add(createButton("E"), Position.E);
184-
panel.add(createButton("SW"), Position.SW);
185-
panel.add(createButton("S"), Position.S);
186-
panel.add(createButton("SE"), Position.SE);
187-
panel.add(createButton("CENTER"), Position.CENTER);
188-
189-
frame.setContentPane(panel);
190-
191-
frame.setSize(200, 200);
192-
frame.setVisible(true);
193-
}
194-
195-
private static JButton createButton(String label) {
196-
JButton button = new JButton(label);
197-
button.setSize(button.getMinimumSize());
198-
199-
return button;
200-
}
201169
}

src/main/java/net/rptools/maptool/client/ui/addon/AddOnLibrariesDialogOld.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/main/java/net/rptools/maptool/client/ui/addon/AddOnLibrariesDialogView.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,4 @@ private void viewReadMeFile(LibraryInfo libInfo) {
298298
a.ifPresent(
299299
asset -> new ViewAssetDialog(asset, "License", 640, 480).showModal())));
300300
}
301-
302-
public static void main(String[] args) {
303-
AddOnLibrariesDialogView dialog = new AddOnLibrariesDialogView();
304-
dialog.pack();
305-
dialog.setVisible(true);
306-
System.exit(0);
307-
}
308301
}

src/main/java/net/rptools/maptool/client/ui/io/FTPClient.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
/**
1818
* @author crash
1919
*/
20-
import java.awt.BorderLayout;
21-
import java.awt.Dimension;
22-
import java.awt.GridLayout;
2320
import java.io.ByteArrayInputStream;
2421
import java.io.File;
2522
import java.io.FileInputStream;
@@ -32,11 +29,7 @@
3229
import java.util.LinkedList;
3330
import java.util.List;
3431
import java.util.Map;
35-
import javax.swing.JFrame;
36-
import javax.swing.JLabel;
37-
import javax.swing.JPanel;
3832
import javax.swing.SwingUtilities;
39-
import javax.swing.WindowConstants;
4033
import javax.swing.event.ChangeEvent;
4134
import javax.swing.event.ChangeListener;
4235
import net.rptools.maptool.client.ui.io.FTPTransferObject.Direction;
@@ -336,30 +329,4 @@ protected void doit(FTPTransferObject data) {
336329
uploadDone(data, false);
337330
}
338331
}
339-
340-
public static void main(String args[]) {
341-
JFrame frame = new JFrame("FTP Test");
342-
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
343-
frame.setLayout(new BorderLayout());
344-
JLabel progress = new JLabel();
345-
frame.add(progress, BorderLayout.SOUTH);
346-
347-
JPanel panel = new JPanel();
348-
panel.setLayout(new GridLayout(0, 1, 5, 5));
349-
frame.add(panel, BorderLayout.CENTER);
350-
frame.setSize(new Dimension(400, 200));
351-
frame.setVisible(true);
352-
353-
String[] uploadList =
354-
new String[] {
355-
"campaignItemList.xml", "mockup.jfpr", "standard.mtprops", "updateRepoDialog.xml",
356-
};
357-
FTPClient ftp = new FTPClient("www.eeconsulting.net", "username", "password");
358-
File dir = new File("testdir");
359-
for (String s : uploadList) {
360-
FTPTransferObject fto = new FTPTransferObject(Direction.FTP_PUT, s, dir, s);
361-
ftp.addToQueue(fto);
362-
}
363-
// Need to listen for all progress bars to finish and count down using 'progress'.
364-
}
365332
}

src/main/java/net/rptools/maptool/client/ui/theme/RessourceManager.java

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import java.awt.image.BufferedImage;
1919
import java.io.IOException;
2020
import java.util.HashMap;
21-
import java.util.TreeSet;
2221
import javax.swing.*;
2322
import net.rptools.lib.image.ImageUtil;
2423
import net.rptools.maptool.client.AppPreferences;
@@ -599,24 +598,4 @@ private static <KEY, CACHEKEY, RESULT> RESULT getFromHashMapsAndCache(
599598
cache.put(cachekey, ressourceObject);
600599
return ressourceObject;
601600
}
602-
603-
public static void main(String[] args) {
604-
checkMissingIcons(classicIcons, rodIcons);
605-
}
606-
607-
private static void checkMissingIcons(
608-
HashMap<Icons, String> classicIcons, HashMap<Icons, String> rodIcons) {
609-
var missing = new TreeSet<Icons>();
610-
for (var key : classicIcons.keySet()) {
611-
if (rodIcons.containsKey(key)) {
612-
continue;
613-
}
614-
missing.add(key);
615-
}
616-
617-
System.out.println("Missing icons:");
618-
for (var key : missing) {
619-
System.out.println(key + " classic: " + classicIcons.get(key));
620-
}
621-
}
622601
}

0 commit comments

Comments
 (0)