diff options
Diffstat (limited to 'javax/swing/text/IconView.java')
-rw-r--r-- | javax/swing/text/IconView.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/javax/swing/text/IconView.java b/javax/swing/text/IconView.java index 699cda90e..7bb7635b4 100644 --- a/javax/swing/text/IconView.java +++ b/javax/swing/text/IconView.java @@ -44,7 +44,6 @@ import java.awt.Shape; import javax.swing.Icon; import javax.swing.JTextPane; -import javax.swing.SwingConstants; /** * A View that can render an icon. This view is created by the @@ -156,4 +155,21 @@ public class IconView return el.getStartOffset(); } + /** + * Returns the alignment for this view. This will be 1.0 for the Y_AXIS, + * and the super behaviour for the X_AXIS. + * + * @param axis the axis for which to calculate the alignment + * + * @return the alignment + */ + public float getAlignment(int axis) + { + float align; + if (axis == Y_AXIS) + align = 1.0F; + else + align = super.getAlignment(axis); + return align; + } } |