Modify visibility for several classes, add some missing javadoc

Signed-off-by: Taylor Smock <taylor.smock@kaart.com>
pull/1/head
Taylor Smock 2020-06-10 12:54:53 -06:00
rodzic 281736e0ec
commit eac9329a58
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 625F6A74A3E4311A
6 zmienionych plików z 24 dodań i 9 usunięć

Wyświetl plik

@ -22,9 +22,10 @@ import org.openstreetmap.josm.tools.GBC;
/** /**
* @author Taylor Smock * @author Taylor Smock
*/ */
public class ReplacementPreferenceTable extends PreferencesTable { class ReplacementPreferenceTable extends PreferencesTable {
private static final long serialVersionUID = 8057277761625324262L; /**
* @param displayData The initial preference entries to display
*/
public ReplacementPreferenceTable(List<PrefEntry> displayData) { public ReplacementPreferenceTable(List<PrefEntry> displayData) {
super(displayData); super(displayData);
} }

Wyświetl plik

@ -15,7 +15,7 @@ import org.openstreetmap.josm.gui.util.WindowGeometry;
* Dialog shown to add a new source from preferences. * Dialog shown to add a new source from preferences.
* *
*/ */
public class AddMapWithAIDialog extends ExtendedDialog implements ContentValidationListener { class AddMapWithAIDialog extends ExtendedDialog implements ContentValidationListener {
private static final long serialVersionUID = 7513676077181970148L; private static final long serialVersionUID = 7513676077181970148L;
/** /**

Wyświetl plik

@ -44,7 +44,7 @@ import org.openstreetmap.josm.tools.Pair;
/** /**
* An panel used to add MapWithAI sources. * An panel used to add MapWithAI sources.
*/ */
public class AddMapWithAIPanel extends JPanel { class AddMapWithAIPanel extends JPanel {
private static final long serialVersionUID = -2838267045934203122L; private static final long serialVersionUID = -2838267045934203122L;
private final transient JPanel layerPanel = new JPanel(new GridBagLayout()); private final transient JPanel layerPanel = new JPanel(new GridBagLayout());

Wyświetl plik

@ -21,7 +21,7 @@ import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInf
/** /**
* The table model for the default imagery layer list * The table model for the default imagery layer list
*/ */
public class MapWithAIDefaultLayerTableModel extends DefaultTableModel { class MapWithAIDefaultLayerTableModel extends DefaultTableModel {
private static final long serialVersionUID = -2966437364160797385L; private static final long serialVersionUID = -2966437364160797385L;
private final List<Class<?>> columnTypes; private final List<Class<?>> columnTypes;
private final transient List<Function<MapWithAIInfo, Object>> columnDataRetrieval; private final transient List<Function<MapWithAIInfo, Object>> columnDataRetrieval;

Wyświetl plik

@ -11,7 +11,7 @@ import org.openstreetmap.josm.plugins.mapwithai.data.mapwithai.MapWithAILayerInf
/** /**
* The table model for source layer list * The table model for source layer list
*/ */
public class MapWithAILayerTableModel extends DefaultTableModel { class MapWithAILayerTableModel extends DefaultTableModel {
private static final long serialVersionUID = 60378230494588007L; private static final long serialVersionUID = 60378230494588007L;
/** /**

Wyświetl plik

@ -24,7 +24,13 @@ import javax.swing.table.TableModel;
import org.openstreetmap.josm.tools.GBC; import org.openstreetmap.josm.tools.GBC;
import org.openstreetmap.josm.tools.Pair; import org.openstreetmap.josm.tools.Pair;
public class MapWithAIParametersPanel extends JPanel { /**
* Parameters panel for adding MapWithAI URLs
*
* @author Taylor Smock
*
*/
class MapWithAIParametersPanel extends JPanel {
private final class ParametersTableModel extends AbstractTableModel { private final class ParametersTableModel extends AbstractTableModel {
private final Set<Integer> disabledRows = new HashSet<>(); private final Set<Integer> disabledRows = new HashSet<>();
@ -149,6 +155,9 @@ public class MapWithAIParametersPanel extends JPanel {
.collect(Collectors.toMap(x -> (String) x[0], x -> new Pair<>((String) x[1], (Boolean) x[2]))); .collect(Collectors.toMap(x -> (String) x[0], x -> new Pair<>((String) x[1], (Boolean) x[2])));
} }
/**
* @param parameters The initial parameters to show in the dialog
*/
public void setParameters(JsonArray parameters) { public void setParameters(JsonArray parameters) {
int i = 0; int i = 0;
for (JsonObject obj : parameters.stream().filter(JsonObject.class::isInstance).map(JsonObject.class::cast) for (JsonObject obj : parameters.stream().filter(JsonObject.class::isInstance).map(JsonObject.class::cast)
@ -165,12 +174,17 @@ public class MapWithAIParametersPanel extends JPanel {
model.fireTableDataChanged(); model.fireTableDataChanged();
} }
/**
* @param l A TableModelListener for the backing model
*/
public void addListener(TableModelListener l) { public void addListener(TableModelListener l) {
model.addTableModelListener(l); model.addTableModelListener(l);
} }
/**
* @return The table model used to display parameters
*/
public TableModel getModel() { public TableModel getModel() {
return model; return model;
} }
} }