From 1d0d27c3127392217b63cf4350e0fc0fd45ea608 Mon Sep 17 00:00:00 2001 From: Rocky Sloan Date: Thu, 26 Jun 2014 15:59:57 +0400 Subject: [PATCH] 8044276: Fix doclint warnings (missing javadoc tags) in javax.swing.plaf.synth Reviewed-by: alexsch --- .../javax/swing/plaf/synth/SynthButtonUI.java | 9 ++++++++- .../javax/swing/plaf/synth/SynthGraphicsUtils.java | 13 ++++++++++++- .../javax/swing/plaf/synth/SynthSeparatorUI.java | 14 +++++++++++++- 3 files changed, 33 insertions(+), 3 deletions(-) diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java index 38900d04b43..4bfa159602c 100644 --- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthButtonUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -513,6 +513,13 @@ public class SynthButtonUI extends BasicButtonUI implements /** * Returns the Icon used in calculating the * preferred/minimum/maximum size. + * + * @param b specifies the {@code AbstractButton} + * used when calculating the preferred/minimum/maximum + * size. + * + * @return the Icon used in calculating the + * preferred/minimum/maximum size. */ protected Icon getSizingIcon(AbstractButton b) { Icon icon = getEnabledIcon(b, b.getIcon()); diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java index 9f68e956a48..8464dd25e49 100644 --- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java +++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthGraphicsUtils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -137,6 +137,9 @@ public class SynthGraphicsUtils { * @param iconR Rectangle to place icon bounds in * @param textR Rectangle to place text in * @param iconTextGap gap between icon and text + * + * @return by reference, the location to + * place the icon and text. */ public String layoutText(SynthContext ss, FontMetrics fm, String text, Icon icon, int hAlign, @@ -166,6 +169,8 @@ public class SynthGraphicsUtils { * @param font Font to use * @param metrics FontMetrics, may be ignored * @param text Text to get size of. + * + * @return the size of the passed in string. */ public int computeStringWidth(SynthContext ss, Font font, FontMetrics metrics, String text) { @@ -187,6 +192,8 @@ public class SynthGraphicsUtils { * @param iconTextGap gap between icon and text * @param mnemonicIndex Index into text to render the mnemonic at, -1 * indicates no mnemonic. + * + * @return the minimum size needed to properly render an icon and text. */ public Dimension getMinimumSize(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, @@ -218,6 +225,8 @@ public class SynthGraphicsUtils { * @param iconTextGap gap between icon and text * @param mnemonicIndex Index into text to render the mnemonic at, -1 * indicates no mnemonic. + * + * @return the maximum size needed to properly render an icon and text. */ public Dimension getMaximumSize(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, @@ -263,6 +272,8 @@ public class SynthGraphicsUtils { * @param iconTextGap gap between icon and text * @param mnemonicIndex Index into text to render the mnemonic at, -1 * indicates no mnemonic. + * + * @return the preferred size needed to properly render an icon and text. */ public Dimension getPreferredSize(SynthContext ss, Font font, String text, Icon icon, int hAlign, int vAlign, int hTextPosition, diff --git a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSeparatorUI.java b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSeparatorUI.java index 158e16bd5c9..a222a428080 100644 --- a/jdk/src/share/classes/javax/swing/plaf/synth/SynthSeparatorUI.java +++ b/jdk/src/share/classes/javax/swing/plaf/synth/SynthSeparatorUI.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -78,6 +78,9 @@ public class SynthSeparatorUI extends SeparatorUI /** * Installs default setting. This method is called when a * {@code LookAndFeel} is installed. + * + * @param c specifies the {@code JSeparator} for the installed + * {@code LookAndFeel}. */ public void installDefaults(JSeparator c) { updateStyle(c); @@ -109,6 +112,9 @@ public class SynthSeparatorUI extends SeparatorUI /** * Uninstalls default setting. This method is called when a * {@code LookAndFeel} is uninstalled. + * + * @param c specifies the {@code JSeparator} for the (un)installed + * {@code LookAndFeel}. */ public void uninstallDefaults(JSeparator c) { SynthContext context = getContext(c, ENABLED); @@ -121,6 +127,9 @@ public class SynthSeparatorUI extends SeparatorUI /** * Installs listeners. This method is called when a * {@code LookAndFeel} is installed. + * + * @param c specifies the {@code JSeparator} for the installed + * {@code LookAndFeel}. */ public void installListeners(JSeparator c) { c.addPropertyChangeListener(this); @@ -129,6 +138,9 @@ public class SynthSeparatorUI extends SeparatorUI /** * Uninstalls listeners. This method is called when a * {@code LookAndFeel} is uninstalled. + * + * @param c specifies the {@code JSeparator} for the (un)installed + * {@code LookAndFeel}. */ public void uninstallListeners(JSeparator c) { c.removePropertyChangeListener(this);