Skip to content

Commit

Permalink
PIVOT-976: More Javadoc fixes for the warnings from Java 8.
Browse files Browse the repository at this point in the history
Continuing on down the list, to finish off the WTK skin classes.

Most of the changes were missing @return or @param values.



git-svn-id: https://svn.apache.org/repos/asf/pivot/trunk@1745388 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Roger Lee Whitcomb committed May 24, 2016
1 parent 860d614 commit be2f002
Show file tree
Hide file tree
Showing 14 changed files with 284 additions and 114 deletions.
60 changes: 40 additions & 20 deletions wtk/src/org/apache/pivot/wtk/skin/BorderSkin.java
Expand Up @@ -316,14 +316,16 @@ public void paint(Graphics2D graphics) {
}

/**
* Returns the font used in rendering the title
* @return The font used in rendering the title.
*/
public Font getFont() {
return font;
}

/**
* Sets the font used in rendering the title
* Sets the font used in rendering the title.
*
* @param font The new font to use for the border title.
*/
public void setFont(Font font) {
if (font == null) {
Expand All @@ -335,9 +337,9 @@ public void setFont(Font font) {
}

/**
* Sets the font used in rendering the title
* Sets the font used in rendering the title.
*
* @param font A {@link ComponentSkin#decodeFont(String) font specification}
* @param font A {@linkplain ComponentSkin#decodeFont(String) font specification}.
*/
public final void setFont(String font) {
if (font == null) {
Expand All @@ -348,9 +350,9 @@ public final void setFont(String font) {
}

/**
* Sets the font used in rendering the title
* Sets the font used in rendering the title.
*
* @param font A dictionary {@link Theme#deriveFont describing a font}
* @param font A dictionary {@linkplain Theme#deriveFont describing a font}.
*/
public final void setFont(Dictionary<String, ?> font) {
if (font == null) {
Expand All @@ -361,14 +363,16 @@ public final void setFont(Dictionary<String, ?> font) {
}

/**
* Returns the color of the border
* @return The color of the border.
*/
public Color getColor() {
return color;
}

/**
* Sets the color of the border
* Sets the color of the border.
*
* @param color The new color for the border.
*/
public void setColor(Color color) {
if (color == null) {
Expand All @@ -380,7 +384,7 @@ public void setColor(Color color) {
}

/**
* Sets the color of the border
* Sets the color of the border.
*
* @param color Any of the {@linkplain GraphicsUtilities#decodeColor color
* values recognized by Pivot}.
Expand Down Expand Up @@ -415,14 +419,16 @@ public final void setTitleColor(String titleColor) {
}

/**
* Returns the thickness of the border
* @return The thickness of the border.
*/
public int getThickness() {
return thickness;
}

/**
* Sets the thickness of the border
* Sets the thickness of the border.
*
* @param thickness The border thickness (in pixels).
*/
public void setThickness(int thickness) {
if (thickness < 0) {
Expand All @@ -434,7 +440,9 @@ public void setThickness(int thickness) {
}

/**
* Sets the thickness of the border
* Sets the thickness of the border.
*
* @param thickness The border thickness (integer value in pixels).
*/
public void setThickness(Number thickness) {
if (thickness == null) {
Expand All @@ -445,7 +453,7 @@ public void setThickness(Number thickness) {
}

/**
* Returns the amount of space between the edge of the Border and its
* @return The amount of space between the edge of the Border and its
* content.
*/
public Insets getPadding() {
Expand All @@ -455,6 +463,8 @@ public Insets getPadding() {
/**
* Sets the amount of space to leave between the edge of the Border and its
* content.
*
* @param padding The set of padding values.
*/
public void setPadding(Insets padding) {
if (padding == null) {
Expand Down Expand Up @@ -483,6 +493,8 @@ public final void setPadding(Dictionary<String, ?> padding) {
/**
* Sets the amount of space to leave between the edge of the Border and its
* content, uniformly on all four edges.
*
* @param padding The padding value (in pixels) to use for all four sides.
*/
public final void setPadding(int padding) {
setPadding(new Insets(padding));
Expand All @@ -491,6 +503,8 @@ public final void setPadding(int padding) {
/**
* Sets the amount of space to leave between the edge of the Border and its
* content, uniformly on all four edges.
*
* @param padding The padding value (integer value in pixels) to use for all four sides.
*/
public void setPadding(Number padding) {
if (padding == null) {
Expand All @@ -516,15 +530,17 @@ public final void setPadding(String padding) {
}

/**
* Returns a {@link CornerRadii}, describing the radius of each of the
* @return A {@link CornerRadii}, describing the radius of each of the
* Border's corners.
*/
public CornerRadii getCornerRadii() {
return cornerRadii;
}

/**
* Sets the radii of the Border's corners
* Sets the radii of the Border's corners.
*
* @param cornerRadii The radii for each of the corners.
*/
public void setCornerRadii(CornerRadii cornerRadii) {
if (cornerRadii == null) {
Expand All @@ -536,10 +552,10 @@ public void setCornerRadii(CornerRadii cornerRadii) {
}

/**
* Sets the radii of the Border's corners
* Sets the radii of the Border's corners.
*
* @param cornerRadii A Dictionary
* {@link CornerRadii#CornerRadii(Dictionary) specifying the four corners}
* {@linkplain CornerRadii#CornerRadii(Dictionary) specifying the four corners}.
*/
public final void setCornerRadii(Dictionary<String, ?> cornerRadii) {
if (cornerRadii == null) {
Expand All @@ -550,14 +566,18 @@ public final void setCornerRadii(Dictionary<String, ?> cornerRadii) {
}

/**
* Sets the radii of the Border's four corners to the same value
* Sets the radii of the Border's four corners to the same value.
*
* @param cornerRadii The integer value to set all four corners' radii.
*/
public final void setCornerRadii(int cornerRadii) {
setCornerRadii(new CornerRadii(cornerRadii));
}

/**
* Sets the radii of the Border's four corners to the same value
* Sets the radii of the Border's four corners to the same value.
*
* @param cornerRadii The value for the radii (integer value in pixels).
*/
public final void setCornerRadii(Number cornerRadii) {
if (cornerRadii == null) {
Expand All @@ -571,7 +591,7 @@ public final void setCornerRadii(Number cornerRadii) {
* Sets the radii of the Border's corners
*
* @param cornerRadii A single integer value, or a JSON dictionary
* {@link CornerRadii#CornerRadii(Dictionary) specifying the four corners}
* {@linkplain CornerRadii#CornerRadii(Dictionary) specifying the four corners}.
*/
public final void setCornerRadii(String cornerRadii) {
if (cornerRadii == null) {
Expand Down
24 changes: 19 additions & 5 deletions wtk/src/org/apache/pivot/wtk/skin/BoxPaneSkin.java
Expand Up @@ -486,7 +486,7 @@ public void layout() {
}

/**
* Returns the horizontal alignment of the BoxPane's components within the
* @return The horizontal alignment of the BoxPane's components within the
* pane.
*/
public HorizontalAlignment getHorizontalAlignment() {
Expand All @@ -501,6 +501,8 @@ public HorizontalAlignment getHorizontalAlignment() {
* style. <p>If the orientation of the pane is VERTICAL, this means the
* alignment of each individual component within the pane. It has no effect
* if the <code>fill</code> style is true.
*
* @param horizontalAlignment The new horizontal alignment for our children.
*/
public void setHorizontalAlignment(HorizontalAlignment horizontalAlignment) {
if (horizontalAlignment == null) {
Expand All @@ -512,7 +514,7 @@ public void setHorizontalAlignment(HorizontalAlignment horizontalAlignment) {
}

/**
* Returns the vertical alignment of the BoxPane's components within the
* @return The vertical alignment of the BoxPane's components within the
* pane.
*/
public VerticalAlignment getVerticalAlignment() {
Expand All @@ -527,6 +529,8 @@ public VerticalAlignment getVerticalAlignment() {
* the orientation of the pane is HORIZONTAL, this means the alignment of
* each individual component within the pane. It has no effect if the
* <code>fill</code> style is true.
*
* @param verticalAlignment The new horizontal alignment for our children.
*/
public void setVerticalAlignment(VerticalAlignment verticalAlignment) {
if (verticalAlignment == null) {
Expand All @@ -538,7 +542,7 @@ public void setVerticalAlignment(VerticalAlignment verticalAlignment) {
}

/**
* Returns the amount of space between the edge of the BoxPane and its
* @return The amount of space between the edge of the BoxPane and its
* components.
*/
public Insets getPadding() {
Expand All @@ -548,6 +552,8 @@ public Insets getPadding() {
/**
* Sets the amount of space to leave between the edge of the BoxPane and its
* components.
*
* @param padding The new padding values for all edges.
*/
public void setPadding(Insets padding) {
if (padding == null) {
Expand Down Expand Up @@ -576,6 +582,8 @@ public final void setPadding(Dictionary<String, ?> padding) {
/**
* Sets the amount of space to leave between the edge of the BoxPane and its
* components, uniformly on all four edges.
*
* @param padding The new padding value for all edges.
*/
public final void setPadding(int padding) {
setPadding(new Insets(padding));
Expand All @@ -584,6 +592,8 @@ public final void setPadding(int padding) {
/**
* Sets the amount of space to leave between the edge of the BoxPane and its
* components, uniformly on all four edges.
*
* @param padding The integer value to use for padding on all edges.
*/
public final void setPadding(Number padding) {
if (padding == null) {
Expand All @@ -609,14 +619,16 @@ public final void setPadding(String padding) {
}

/**
* Returns the amount of space between the BoxPane's components.
* @return The amount of space between the BoxPane's components.
*/
public int getSpacing() {
return spacing;
}

/**
* Sets the amount of space to leave between the BoxPane's components.
*
* @param spacing The new amount of spacing between components.
*/
public void setSpacing(int spacing) {
if (spacing < 0) {
Expand All @@ -628,6 +640,8 @@ public void setSpacing(int spacing) {

/**
* Sets the amount of space to leave between the BoxPane's components.
*
* @param spacing The new amount of spacing to use between components.
*/
public final void setSpacing(Number spacing) {
if (spacing == null) {
Expand All @@ -638,7 +652,7 @@ public final void setSpacing(Number spacing) {
}

/**
* Returns a value indicating whether the BoxPane's components fill the
* @return A value indicating whether the BoxPane's components fill the
* available space in the pane in the dimension orthogonal to its
* orientation.
*/
Expand Down
17 changes: 14 additions & 3 deletions wtk/src/org/apache/pivot/wtk/skin/CardPaneSkin.java
Expand Up @@ -41,7 +41,12 @@ public class CardPaneSkin extends ContainerSkin implements CardPaneListener {
* Defines the supported selection change effects.
*/
public enum SelectionChangeEffect {
CROSSFADE, HORIZONTAL_SLIDE, VERTICAL_SLIDE, HORIZONTAL_FLIP, VERTICAL_FLIP, ZOOM
CROSSFADE,
HORIZONTAL_SLIDE,
VERTICAL_SLIDE,
HORIZONTAL_FLIP,
VERTICAL_FLIP,
ZOOM
}

/**
Expand Down Expand Up @@ -488,7 +493,7 @@ public void layout() {
}

/**
* Returns the amount of space between the edge of the CardPane and its
* @return The amount of space between the edge of the CardPane and its
* content.
*/
public Insets getPadding() {
Expand All @@ -498,6 +503,8 @@ public Insets getPadding() {
/**
* Sets the amount of space to leave between the edge of the CardPane and
* its content.
*
* @param padding The new padding values for all edges.
*/
public void setPadding(Insets padding) {
if (padding == null) {
Expand Down Expand Up @@ -526,6 +533,8 @@ public final void setPadding(Dictionary<String, ?> padding) {
/**
* Sets the amount of space to leave between the edge of the CardPane and
* its content, uniformly on all four edges.
*
* @param padding The new single padding value to use for all edges.
*/
public final void setPadding(int padding) {
setPadding(new Insets(padding));
Expand All @@ -534,6 +543,8 @@ public final void setPadding(int padding) {
/**
* Sets the amount of space to leave between the edge of the CardPane and
* its content, uniformly on all four edges.
*
* @param padding The new integer value to use for the padding on all edges.
*/
public void setPadding(Number padding) {
if (padding == null) {
Expand Down Expand Up @@ -600,7 +611,7 @@ public void setSelectionChangeRate(int selectionChangeRate) {
}

/**
* Sets the circular style, which controls the direction of certain
* Returns the circular style, which controls the direction of certain
* transitions (transitions for which a direction makes sense) when looping
* from the first index of a card pane to the last, or vice versa. When this
* style is <tt>false</tt> (the default), directional transitions will
Expand Down

0 comments on commit be2f002

Please sign in to comment.