sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/03: Rename Form as MetadataSection.
Date Sun, 03 Nov 2019 20:04:43 GMT
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 1fa914b933908a08837c0c29662b43584c3906bd
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Sun Nov 3 19:12:37 2019 +0100

    Rename Form as MetadataSection.
---
 .../org/apache/sis/gui/dataset/MetadataOverview.java   | 13 ++++++-------
 .../gui/dataset/{Form.java => MetadataSection.java}    | 18 +++++++++---------
 2 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataOverview.java
b/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataOverview.java
index dbcdcf2..d24173f 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataOverview.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataOverview.java
@@ -294,7 +294,7 @@ final class MetadataOverview {
          */
         int i = 0;
         for (TitledPane pane : information) {
-            final Form<?> info = (Form<?>) pane.getContent();
+            final MetadataSection<?> info = (MetadataSection<?>) pane.getContent();
             info.setInformation(metadata, grid);
             final boolean isEmpty   = info.isEmpty();
             final boolean isPresent = (i < children.size()) && children.get(i)
== pane;
@@ -317,7 +317,7 @@ final class MetadataOverview {
      * The same pane can be used for an arbitrary amount of identifications.
      * Each instance is identified by its title.
      */
-    private static final class IdentificationInfo extends Form<Identification> {
+    private static final class IdentificationInfo extends MetadataSection<Identification>
{
         /**
          * The resource title, or if non the identifier as a fallback.
          */
@@ -371,7 +371,7 @@ final class MetadataOverview {
         }
 
         /**
-         * Returns {@code true} if this form contains no data.
+         * Returns {@code true} if this section contains no data.
          */
         @Override
         boolean isEmpty() {
@@ -388,8 +388,7 @@ final class MetadataOverview {
 
         /**
          * Invoked when new identification information should be shown.
-         * This method updates all fields in this form with the content
-         * of given identification information.
+         * This method updates all fields in this section with the content of given identification
information.
          */
         @Override
         void buildContent(final Identification info) {
@@ -559,7 +558,7 @@ final class MetadataOverview {
      * The pane where to show the values of {@link SpatialRepresentation} objects.
      * The same pane can be used for an arbitrary amount of spatial representations.
      */
-    private static final class RepresentationInfo extends Form<SpatialRepresentation>
{
+    private static final class RepresentationInfo extends MetadataSection<SpatialRepresentation>
{
         /**
          * The reference system, or {@code null} if none.
          */
@@ -592,7 +591,7 @@ final class MetadataOverview {
 
         /**
          * Invoked when new spatial representation information should be shown.
-         * This method updates all fields in this form with the content of given information.
+         * This method updates all fields in this section with the content of given information.
          */
         @Override
         void buildContent(final SpatialRepresentation info) {
diff --git a/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/Form.java b/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataSection.java
similarity index 94%
rename from application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/Form.java
rename to application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataSection.java
index eccf934..3ecf20a 100644
--- a/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/Form.java
+++ b/application/sis-javafx/src/main/java/org/apache/sis/gui/dataset/MetadataSection.java
@@ -54,14 +54,14 @@ import org.apache.sis.util.ArraysExt;
  * @since 1.1
  * @module
  */
-abstract class Form<T> extends GridPane implements EventHandler<ActionEvent>
{
+abstract class MetadataSection<T> extends GridPane implements EventHandler<ActionEvent>
{
     /**
      * Margin to keep around all forms.
      */
     private static final Insets PADDING = new Insets(12);
 
     /**
-     * The pane which contains this form. Used for fetching information like number format
+     * The pane which contains this section. Used for fetching information like number format
      * or localization resources.
      */
     final MetadataOverview owner;
@@ -73,7 +73,7 @@ abstract class Form<T> extends GridPane implements EventHandler<ActionEvent>
{
     static final int NUM_CHILD_PER_LINE = 2;
 
     /**
-     * For selecting which form to show when there is many. Children are {@link ToggleButton}.
+     * For selecting which section to show when there is many. Children are {@link ToggleButton}.
      * The number of buttons should be the length of {@link #information} array.
      */
     private final TilePane pagination;
@@ -84,13 +84,13 @@ abstract class Form<T> extends GridPane implements EventHandler<ActionEvent>
{
     private final ToggleGroup pageGroup;
 
     /**
-     * The information to show in the form, or {@code null} if not yet determined.
+     * The information to show in this section, or {@code null} if not yet determined.
      * This array shall not contain any null element.
      */
     private T[] information;
 
     /**
-     * Index of the grid pane row containing the first (label, value) pair of this form.
+     * Index of the grid pane row containing the first (label, value) pair of this section.
      * This is usually 0, unless there is some heading rows managed by the subclass.
      */
     private int rowOfFirstLine;
@@ -109,9 +109,9 @@ abstract class Form<T> extends GridPane implements EventHandler<ActionEvent>
{
     private int linesEndIndex;
 
     /**
-     * Creates a new form.
+     * Creates a new section.
      */
-    Form(final MetadataOverview owner) {
+    MetadataSection(final MetadataOverview owner) {
         this.owner = owner;
         pageGroup  = new ToggleGroup();
         pagination = new TilePane(Orientation.VERTICAL);
@@ -236,7 +236,7 @@ abstract class Form<T> extends GridPane implements EventHandler<ActionEvent>
{
     abstract void buildContent(T info);
 
     /**
-     * Adds a (label, value) pair to this form.
+     * Adds a (label, value) pair to this section.
      * This method does nothing if the given {@code value} is null.
      *
      * @param  label  a {@link Resources.Keys} for the label of the line to add.
@@ -283,7 +283,7 @@ abstract class Form<T> extends GridPane implements EventHandler<ActionEvent>
{
     }
 
     /**
-     * Returns {@code true} if this form contains no data.
+     * Returns {@code true} if this section contains no data.
      */
     boolean isEmpty() {
         return linesStartIndex == linesEndIndex;


Mime
View raw message