Color.java: New file.
* java/awt/Color.java: New file. * java/awt/Graphics.java: New file. * java/awt/Image.java: New file. * java/awt/Paint.java: New file. * java/awt/PaintContext.java: New file. * java/awt/Transparency.java: New file. * java/util/Collection.java: New file. * java/util/Comparator.java: New file. * java/util/Iterator.java: New file. * java/util/List.java: New file. * java/util/ListIterator.java: New file. * Makefile.am: Added above new files. * Makefile.in: Rebuilt. * java/awt/Font.java (PLAIN): New field. (BOLD): New field. (ITALIC): New field. (ROMAN_BASELINE): New field. (CENTER_BASELINE): New field. (HANGING_BASELINE): New field. (name): New field. (style): New field. (size): New field. (pointSize): New field. (Font): Implemented constructor. (isPlain): Implemented method. (isBold): Implemented method. (isItalic): Implemented method. (getName): Implemented method. (getStyle): Implemented method. (getSize): Implemented method. (getSize2D): Implemented method. (decode): Stubbed. * java/awt/Frame.java (getFont): Stubbed. (postEvent): Stubbed. (remove): Stubbed. * java/awt/Menu.java (postEvent): Stubbed. * java/awt/MenuBar.java (getFont): Stubbed. (postEvent): Stubbed. * java/awt/Toolkit.java (getImage): Added abstract method. From-SVN: r32598
This commit is contained in:
parent
c9869b75ee
commit
d05165c393
19 changed files with 533 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 1999 Free Software Foundation
|
||||
/* Copyright (C) 1999, 2000 Free Software Foundation
|
||||
|
||||
This file is part of libjava.
|
||||
|
||||
|
@ -8,8 +8,83 @@ details. */
|
|||
|
||||
package java.awt;
|
||||
|
||||
/* A *very* incomplete placeholder. */
|
||||
/**
|
||||
* @author Warren Levy <warrenl@cygnus.com>
|
||||
* @date March 16, 2000.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Written using on-line Java Platform 1.2 API Specification, as well
|
||||
* as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
|
||||
* Status: Stubbed; A very incomplete implementation.
|
||||
*/
|
||||
|
||||
public class Font
|
||||
{
|
||||
// FIXME
|
||||
|
||||
public static final int PLAIN = 0;
|
||||
public static final int BOLD = 1;
|
||||
public static final int ITALIC = 2;
|
||||
public static final int ROMAN_BASELINE = 0;
|
||||
public static final int CENTER_BASELINE = 1;
|
||||
public static final int HANGING_BASELINE = 2;
|
||||
protected String name;
|
||||
protected int style;
|
||||
protected int size;
|
||||
protected float pointSize;
|
||||
|
||||
public Font(String name, int style, int size)
|
||||
{
|
||||
this.name = name;
|
||||
this.style = style & 0x3; // Only use lowest 2 bits.
|
||||
this.size = size;
|
||||
pointSize = size; // Assume some subclass can set a different val.
|
||||
}
|
||||
|
||||
public boolean isPlain()
|
||||
{
|
||||
if (style == PLAIN)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isBold()
|
||||
{
|
||||
if (style & BOLD == BOLD)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isItalic()
|
||||
{
|
||||
if (style & ITALIC == ITALIC)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getStyle()
|
||||
{
|
||||
return style;
|
||||
}
|
||||
|
||||
public int getSize()
|
||||
{
|
||||
return size;
|
||||
}
|
||||
|
||||
public float getSize2D()
|
||||
{
|
||||
return pointSize;
|
||||
}
|
||||
|
||||
public static Font decode(String str) { return null; } // FIXME
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue