Java software solutions foundations of program design 4th edition phần 10

được thực hiện bằng cách sử dụng liên kết. Sử dụng tài liệu tham khảo là các liên kết giữa các đối tượng, chúng ta có thể tạo ra bất cứ điều gì loại cấu trúc này là phù hợp với tình hình. Nếu thực hiện một cách cẩn thận, các cấu trúc có thể được khá hiệu quả để tìm kiếm và sửa đổi. | 822 APPENDIX M the java class library protected String name The name of the font. protected int size The size of the font in pixels. protected int style The style of the font. constructors public Font String str int st int sz Creates a new font with an initial name str style st and size sz . methods public static Font decode String arg Returns the requested font from a specified string. public boolean equals Object obj Returns a true value if this font is equal to obj. public String getFamily Returns the name of the family this font belongs to. public static Font getFont String str public static Font getFont String str Font ft Returns the font named str. If the font cannot be located the second method returns ft as the default. public String getName Returns the name of this font. public FontPeer getPeer Returns the peer of this font. public int getSize public int getStyle Returns the size or style of this font. public int hashCode Returns the hash code for this font. public boolean isBold public boolean isItalic public boolean isPlain Returns a true value if this font is bolded italicized or plain. public String toString Returns a string representation of this font. APPENDIX M the java class library 823 FontMetrics A public class derived from Object and implementing Serializable that provides detailed information about a particular font. variables and constructs protected Font font The font upon which the metrics are generated. constructors protected FontMetrics Font f Creates a new instance of metrics from a given font f. methods public int bytesWidth byte src int offset int size public int charsWidth char src int offset int size Returns the advance width for displaying the subarray of src starting at index offset and having a length of size. public int charWidth char c public int charWidth int c Returns the advance width of the character c for the font in this font metric. public int getAscent public int getDescent Returns the amount of ascent or descent

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
33    65    1    30-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.