GtkListPeer.java, [...]: Fix handling of alias methods...
2004-02-03 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GtkListPeer.java, java/awt/BorderLayout.java, java/awt/CardLayout.java, java/awt/CheckboxGroup.java, java/awt/Choice.java, java/awt/Component.java, java/awt/Container.java, java/awt/FontMetrics.java, java/awt/GridBagLayout.java, java/awt/LayoutManager2.java, java/awt/List.java, java/awt/Menu.java, java/awt/MenuBar.java, java/awt/MenuItem.java, java/awt/Polygon.java, java/awt/Rectangle.java, java/awt/ScrollPane.java, java/awt/Scrollbar.java, java/awt/TextArea.java, java/awt/TextField.java, java/awt/image/renderable/RenderContext.java, javax/swing/JApplet.java: Fix handling of alias methods, where a method has been deprecated in favour of a new one with the same funtion but a different name. Put the method implementation in the deprecated method and have the new method call the deprecated one. Make all other code call the new method. From-SVN: r77178
This commit is contained in:
parent
5a98fa7bdb
commit
b6d3cb37ef
23 changed files with 726 additions and 711 deletions
|
@ -446,32 +446,7 @@ removeNotify()
|
|||
public void
|
||||
doLayout()
|
||||
{
|
||||
Component[] list = getComponents();
|
||||
if ((list != null) && (list.length > 0))
|
||||
{
|
||||
Dimension dim = list[0].getPreferredSize();
|
||||
Dimension vp = getViewportSize ();
|
||||
|
||||
if (dim.width < vp.width)
|
||||
dim.width = vp.width;
|
||||
|
||||
if (dim.height < vp.height)
|
||||
dim.height = vp.height;
|
||||
|
||||
ScrollPanePeer peer = (ScrollPanePeer) getPeer ();
|
||||
if (peer != null)
|
||||
peer.childResized (dim.width, dim.height);
|
||||
|
||||
list[0].resize (dim);
|
||||
|
||||
Point p = getScrollPosition();
|
||||
if (p.x > dim.width)
|
||||
p.x = dim.width;
|
||||
if (p.y > dim.height)
|
||||
p.y = dim.height;
|
||||
|
||||
setScrollPosition(p);
|
||||
}
|
||||
layout ();
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
@ -486,7 +461,32 @@ doLayout()
|
|||
public void
|
||||
layout()
|
||||
{
|
||||
doLayout();
|
||||
Component[] list = getComponents ();
|
||||
if ((list != null) && (list.length > 0))
|
||||
{
|
||||
Dimension dim = list[0].getPreferredSize ();
|
||||
Dimension vp = getViewportSize ();
|
||||
|
||||
if (dim.width < vp.width)
|
||||
dim.width = vp.width;
|
||||
|
||||
if (dim.height < vp.height)
|
||||
dim.height = vp.height;
|
||||
|
||||
ScrollPanePeer peer = (ScrollPanePeer) getPeer ();
|
||||
if (peer != null)
|
||||
peer.childResized (dim.width, dim.height);
|
||||
|
||||
list[0].setSize (dim);
|
||||
|
||||
Point p = getScrollPosition ();
|
||||
if (p.x > dim.width)
|
||||
p.x = dim.width;
|
||||
if (p.y > dim.height)
|
||||
p.y = dim.height;
|
||||
|
||||
setScrollPosition (p);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue