Container.java (remove(int)): Wrote.
* java/awt/Container.java (remove(int)): Wrote. (remove(Component)): Wrote. (add(Component)): Wrote. (add(Component,int)): Wrote. (removeAll): Wrote. (addNotify): Set our own peer. * java/awt/Scrollbar.java (listeners): Changed type. (Scrollbar): Don't initialize listeners. (addNotify): Wrote. (setValue): Call setValues. (setMinimum): Likewise. (setMaxPriority): Likewise. (setVisibleAmount): Likewise. (setValues): Wrote. (setUnitIncrement): Forward to peer. (setLineIncrement): Call setUnitIncrement. (setPageIncrement): Call setBlockIncrement. (setBlockIncrement): Forward to peer. (addAdjustmentListener): Rewrote. (removeAdjustmentListener): Rewrote. (processAdjustmentEvent): Rewrote. (paramString): Wrote. * Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Added Button.java. * java/awt/Button.java: New file. * java/awt/Toolkit.java (createLabel): Declare. (createButton): Likewise. (createScrollbar): Likewise. (createContainer): Likewise. * java/awt/Label.java (addNotify): Wrote. (setAlignment): Call setAlignment in the peer. (setText): Call setText in the peer. From-SVN: r35354
This commit is contained in:
@@ -7,14 +7,14 @@ Libjava License. Please consult the file "LIBJAVA_LICENSE" for
|
||||
details. */
|
||||
|
||||
package java.awt;
|
||||
import java.awt.peer.ComponentPeer;
|
||||
import java.awt.peer.LabelPeer;
|
||||
|
||||
/**
|
||||
* @author Tom Tromey <tromey@cygnus.com>
|
||||
* @date April 12, 2000
|
||||
*/
|
||||
|
||||
/* Status: addNotify() not written. */
|
||||
|
||||
public class Label extends Component
|
||||
{
|
||||
public static final int CENTER = 1;
|
||||
@@ -41,7 +41,7 @@ public class Label extends Component
|
||||
|
||||
public void addNotify ()
|
||||
{
|
||||
// FIXME
|
||||
peer = (ComponentPeer) getToolkit ().createLabel (this);
|
||||
}
|
||||
|
||||
public int getAlignment ()
|
||||
@@ -64,11 +64,21 @@ public class Label extends Component
|
||||
if (alignment != CENTER && alignment != LEFT && alignment != RIGHT)
|
||||
throw new IllegalArgumentException ();
|
||||
this.alignment = alignment;
|
||||
if (peer != null)
|
||||
{
|
||||
LabelPeer lp = (LabelPeer) peer;
|
||||
lp.setAlignment (alignment);
|
||||
}
|
||||
}
|
||||
|
||||
public void setText (String text)
|
||||
{
|
||||
this.text = text;
|
||||
if (peer != null)
|
||||
{
|
||||
LabelPeer lp = (LabelPeer) peer;
|
||||
lp.setText (text);
|
||||
}
|
||||
}
|
||||
|
||||
private String text;
|
||||
|
||||
Reference in New Issue
Block a user