TAILIEUCHUNG - Java Swing phần 8

Các lập trình viên thường không cần phải gọi phương pháp này. bảo vệ void addImpl (Component comp, những hạn chế đối tượng, chỉ số int) Thêm thành phần cho vào thanh công cụ với các khó khăn quy định, và ở vị trí quy định bởi chỉ số. | Java Swing - O Reilly Figure . JTextPane containing JButtons and Imageicons Other Public Method public void replaceSelection String content Inserts removes or replaces text. If there is any currently selected text it is removed. Then any new text is inserted in its place. If no text is passed in this is essentially a remove operation. If no text is selected the given text will be inserted at the current cursor position. Any new text will have the attributes currently defined for new given text inputAttributes . Protected Methods The following protected methods are defined in JTextPane protected final StyledEditorKit getStyledEditorKit Casts the result of getEditorKit to a StyledEditorKit. protected EditorKit createDefaultEditorKit Returns a new StyledEditorKit. This is the method called by if it is called before a kit has been set for the pane. Style If you ve ever worked with a reasonably powerful word processor you re probably already familiar with the concept of a style. A style is basically just a collection of attributes that describes how something should look. For example as I sit here writing this book the text I m entering into my word processor looks a certain way because of the paragraph style Body and character style Default I have selected. To produce the heading just before this paragraph I could have typed Style selected the text changed the font to Bodoni BT changed the font size to 18 and toggled on the italics button. Thankfully believe me I didn t have to do all that. All I had to do was click somewhere within the text and use a menu to select the HeadA style which encapsulates all of the properties described above not to mention more interesting things like the fact that the next paragraph should be a Body paragraph . Providing this type of functionality in your own programs would be a lot of work if you had to do it all yourself. Fortunately you don t. The Swing text package builds on the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.