aboutsummaryrefslogtreecommitdiffstats
path: root/ardor3d-ui
diff options
context:
space:
mode:
authorJulien Gouesse <[email protected]>2019-06-05 22:46:30 +0200
committerJulien Gouesse <[email protected]>2019-06-05 22:46:30 +0200
commit483229d1137318a3636023edf9eafcaa1d3f283a (patch)
tree6563b8d9c52a9c06de2d12edefcf861fbebf1e40 /ardor3d-ui
parentcd25e068e4b9c3c9895e533d9285905576f95b07 (diff)
Fixes some errors in the Java documentation of ardor3d-ui
Diffstat (limited to 'ardor3d-ui')
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/GradientBackdrop.java7
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageArcBackdrop.java1
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageBackdrop.java2
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageDiskBackdrop.java1
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/UIBackdrop.java10
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java6
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayout.java38
-rw-r--r--ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayoutData.java6
8 files changed, 53 insertions, 18 deletions
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/GradientBackdrop.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/GradientBackdrop.java
index 6a7d090..cd21dae 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/GradientBackdrop.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/GradientBackdrop.java
@@ -41,15 +41,20 @@ public class GradientBackdrop extends UIBackdrop {
/**
* Construct this back drop, using default colors.
*/
- public GradientBackdrop() {}
+ public GradientBackdrop() {
+ }
/**
* Construct this back drop, using the given corner colors.
*
* @param topLeft
+ * the top left corner's color
* @param topRight
+ * the top right corner's color
* @param bottomLeft
+ * the bottom left corner's color
* @param bottomRight
+ * the bottom right corner's color
*/
public GradientBackdrop(final ReadOnlyColorRGBA topLeft, final ReadOnlyColorRGBA topRight,
final ReadOnlyColorRGBA bottomLeft, final ReadOnlyColorRGBA bottomRight) {
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageArcBackdrop.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageArcBackdrop.java
index 9df7596..9abc12f 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageArcBackdrop.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageArcBackdrop.java
@@ -32,6 +32,7 @@ public class ImageArcBackdrop extends SolidArcBackdrop {
* Construct this back drop, using the given image.
*
* @param image
+ * the image
*/
public ImageArcBackdrop(final SubTex image) {
this(image, ColorRGBA.WHITE);
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageBackdrop.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageBackdrop.java
index a9e3a4a..31a9648 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageBackdrop.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageBackdrop.java
@@ -55,6 +55,7 @@ public class ImageBackdrop extends SolidBackdrop {
* Construct this back drop, using the given image.
*
* @param image
+ * the image
*/
public ImageBackdrop(final SubTex image) {
super(ColorRGBA.BLACK_NO_ALPHA);
@@ -191,6 +192,7 @@ public class ImageBackdrop extends SolidBackdrop {
* Sets a color to use for tinting the backdrop.
*
* @param color
+ * the color to set
*/
public void setTintColor(final ReadOnlyColorRGBA color) {
_tintColor.set(color);
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageDiskBackdrop.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageDiskBackdrop.java
index c373ad4..6a4aee2 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageDiskBackdrop.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/ImageDiskBackdrop.java
@@ -36,6 +36,7 @@ public class ImageDiskBackdrop extends SolidDiskBackdrop {
* Construct this back drop, using the given image.
*
* @param image
+ * the image
*/
public ImageDiskBackdrop(final SubTex image) {
super(ColorRGBA.BLACK_NO_ALPHA);
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/UIBackdrop.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/UIBackdrop.java
index a0e2b79..7e23ef5 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/UIBackdrop.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/backdrop/UIBackdrop.java
@@ -3,7 +3,7 @@
*
* This file is part of Ardor3D.
*
- * Ardor3D is free software: you can redistribute it and/or modify it
+ * Ardor3D is free software: you can redistribute it and/or modify it
* under the terms of its license which may be found in the accompanying
* LICENSE file or at <http://www.ardor3d.com/LICENSE>.
*/
@@ -20,10 +20,10 @@ public abstract class UIBackdrop {
/**
* Draw this backdrop. Override this method to do the actual work.
- *
+ *
* @param renderer
* the renderer to use in drawing.
- * @param component
+ * @param comp
* the component we are drawing the background for.
*/
public abstract void draw(final Renderer renderer, final UIComponent comp);
@@ -31,7 +31,7 @@ public abstract class UIBackdrop {
/**
* Get the height that a backdrop should cover for a given component. The height is the component's current content
* area height, plus any padding on the top and bottom.
- *
+ *
* @param component
* the component to check against
* @return the height as described above
@@ -47,7 +47,7 @@ public abstract class UIBackdrop {
/**
* Get the width that a backdrop should cover for a given component. The width is the component's current content
* area width, plus any padding on the left and right.
- *
+ *
* @param component
* the component to check against
* @return the width as described above
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java
index 8b81df3..a3af689 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/AnchorLayout.java
@@ -29,7 +29,6 @@ import com.ardor3d.scenegraph.Spatial;
* other component. Each relationship consists of the two dependent components, the alignment points on each, and
* optional x/y offsets.
* </p>
- * <p>
* As an example, the following would setup labelA in the top left corner of the container, 5 pixels from the top and 5
* pixels from the bottom. Directly below that (5 pixels from the bottom of labelA) is labelB, left aligned to labelA:
*
@@ -44,7 +43,6 @@ import com.ardor3d.scenegraph.Spatial;
* labelB.setLayoutData(new AnchorLayoutData(Alignment.TOP_LEFT, labelA, Alignment.BOTTOM_LEFT, 0, -5));
* </pre>
*
- * </p>
*
* @see AnchorLayoutData
*/
@@ -159,8 +157,8 @@ public class AnchorLayout extends UILayout {
private static void applyAnchor(final UIComponent comp, final AnchorLayoutData layData) {
final Vector2 offsetsA = AnchorLayout.getOffsets(comp, layData.getMyPoint(), null);
final Vector2 offsetsB = AnchorLayout.getOffsets(layData.getParent(), layData.getParentPoint(), null);
- comp.addTranslation(offsetsB.getX() - offsetsA.getX() + layData.getXOffset(), offsetsB.getY() - offsetsA.getY()
- + layData.getYOffset(), 0);
+ comp.addTranslation(offsetsB.getX() - offsetsA.getX() + layData.getXOffset(),
+ offsetsB.getY() - offsetsA.getY() + layData.getYOffset(), 0);
if (!comp.hasAncestor(layData.getParent())) {
comp.addTranslation(layData.getParent().getTranslation());
}
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayout.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayout.java
index 4507b90..4c91945 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayout.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayout.java
@@ -57,11 +57,17 @@ public class GridLayout extends UILayout {
* space.
*
* @param interCellSpacingHorizontal
+ * the inter cell horizontal spacing
* @param interCellSpacingVertical
+ * the inter cell vertical spacing
* @param leftMargin
+ * the left margin
* @param topMargin
+ * the top margin
* @param rightMargin
+ * the right margin
* @param bottomMargin
+ * the bottom margin
*/
public GridLayout(final int interCellSpacingHorizontal, final int interCellSpacingVertical, final int leftMargin,
final int topMargin, final int rightMargin, final int bottomMargin) {
@@ -74,12 +80,19 @@ public class GridLayout extends UILayout {
* not matter.
*
* @param interCellSpacingHorizontal
+ * the inter cell horizontal spacing
* @param interCellSpacingVertical
+ * the inter cell vertical spacing
* @param leftMargin
+ * the left margin
* @param topMargin
+ * the top margin
* @param rightMargin
+ * the right margin
* @param bottomMargin
+ * the bottom margin
* @param fillVerticalSpace
+ * <code>true</code> if it fills the vertical space
*/
public GridLayout(final int interCellSpacingHorizontal, final int interCellSpacingVertical, final int leftMargin,
final int topMargin, final int rightMargin, final int bottomMargin, final boolean fillVerticalSpace) {
@@ -92,11 +105,17 @@ public class GridLayout extends UILayout {
* rows.
*
* @param interCellSpacingHorizontal
+ * the inter cell horizontal spacing
* @param interCellSpacingVertical
+ * the inter cell vertical spacing
* @param leftMargin
+ * the left margin
* @param topMargin
+ * the top margin
* @param rightMargin
+ * the right margin
* @param bottomMargin
+ * the bottom margin
* @param verticalAlignment
* only TOP, MIDDLE and BOTTOM are meaningful
*/
@@ -111,14 +130,21 @@ public class GridLayout extends UILayout {
* to distribute any additional space between rows.
*
* @param interCellSpacingHorizontal
+ * the inter cell horizontal spacing
* @param interCellSpacingVertical
+ * the inter cell vertical spacing
* @param leftMargin
+ * the left margin
* @param topMargin
+ * the top margin
* @param rightMargin
+ * the right margin
* @param bottomMargin
+ * the bottom margin
* @param verticalAlignment
* only TOP, MIDDLE and BOTTOM are meaningful
* @param fillVerticalSpace
+ * <code>true</code> if it fills the vertical space
*/
public GridLayout(final int interCellSpacingHorizontal, final int interCellSpacingVertical, final int leftMargin,
final int topMargin, final int rightMargin, final int bottomMargin, final Alignment verticalAlignment,
@@ -157,8 +183,8 @@ public class GridLayout extends UILayout {
if (fillVerticalSpace) {
rowHeightDiff = Math.round(heightDiff * (1f - (float) lc.firstRow / grid.maxRow));
}
- lc.component.setLocalXY(grid.columnOffsets[lc.firstColumn], rowHeightDiff + height
- - grid.rowOffsets[lc.firstRow] - lc.getComponentHeight());
+ lc.component.setLocalXY(grid.columnOffsets[lc.firstColumn],
+ rowHeightDiff + height - grid.rowOffsets[lc.firstRow] - lc.getComponentHeight());
if (lc.grow) {
lc.component.setLocalComponentWidth(grid.getCellsWidth(lc.firstColumn, lc.lastColumn));
}
@@ -248,10 +274,10 @@ public class GridLayout extends UILayout {
columnOffsets[0] = leftMargin;
rowOffsets[0] = topMargin;
for (final LayoutComponent lc : components) {
- columnOffsets[lc.lastColumn + 1] = Math.max(columnOffsets[lc.lastColumn + 1], lc.getComponentWidth()
- + interCellSpacingHorizontal + columnOffsets[lc.firstColumn]);
- rowOffsets[lc.firstRow + 1] = Math.max(rowOffsets[lc.firstRow + 1], lc.getComponentHeight()
- + interCellSpacingVertical + rowOffsets[lc.firstRow]);
+ columnOffsets[lc.lastColumn + 1] = Math.max(columnOffsets[lc.lastColumn + 1],
+ lc.getComponentWidth() + interCellSpacingHorizontal + columnOffsets[lc.firstColumn]);
+ rowOffsets[lc.firstRow + 1] = Math.max(rowOffsets[lc.firstRow + 1],
+ lc.getComponentHeight() + interCellSpacingVertical + rowOffsets[lc.firstRow]);
}
if (logger.isLoggable(Level.FINE)) {
diff --git a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayoutData.java b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayoutData.java
index da2ff74..a464407 100644
--- a/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayoutData.java
+++ b/ardor3d-ui/src/main/java/com/ardor3d/extension/ui/layout/GridLayoutData.java
@@ -77,7 +77,8 @@ public class GridLayoutData implements UILayoutData {
* create a new GridLayoutData that specifies the number of cells the component should use horizontally
*
* @param columns
- * @return
+ * the number of columns
+ * @return the new GridLayoutData
*/
public static GridLayoutData Span(final int columns) {
return new GridLayoutData(columns, false, false);
@@ -88,7 +89,8 @@ public class GridLayoutData implements UILayoutData {
* layout line should wrap after this component
*
* @param columns
- * @return
+ * the number of columns
+ * @return the new GridLayoutData
*/
public static GridLayoutData SpanAndWrap(final int columns) {
return new GridLayoutData(columns, true, false);