/** * Displays a print dialog to print the transcript found in a <code>TranscriptWindow</code> * * @param transcriptWindow the <code>TranscriptWindow</code> containing the transcript. */ public static void printChatTranscript(TranscriptWindow transcriptWindow) { final ChatPrinter printer = new ChatPrinter(); printer.print(transcriptWindow); }
/** * print(HTMLDocument) is called to set an HTMLDocument for printing. * * @param htmlDocument the HtmlDocument to print. */ public void print(HTMLDocument htmlDocument) { setDocument(htmlDocument); printDialog(); }
/** * Method to set an HTMLDocument as the Document to print. * * @param htmlDocument sets the html document. */ public void setDocument(HTMLDocument htmlDocument) { JEditorPane = new JEditorPane(); setDocument("text/html", htmlDocument); }
if (childAllocation != null) { childView = view.getView(i); if (printView(graphics2D, childAllocation, childView)) { pageExists = true;
private void setDocument(String type, Document document) { setContentType(type); JEditorPane.setDocument(document); }
/** * Method to set a PlainDocument as the Document to print. * * @param plainDocument the PlainDocument to use. */ public void setDocument(PlainDocument plainDocument) { JEditorPane = new JEditorPane(); setDocument("text/plain", plainDocument); }
(int)(JEditorPane.getPreferredSize().getHeight())); if (printView(graphics2D, allocation, rootView)) { return Printable.PAGE_EXISTS;
/** * print(PlainDocument) is called to set a PlainDocument for printing. * * @param plainDocument the PlainDocument to print. */ public void print(PlainDocument plainDocument) { setDocument(plainDocument); printDialog(); }
/** * Prints the transcript of a given chat room. * * @param room the chat room that contains the transcript to print. */ public static void printChatRoomTranscript(ChatRoom room) { final ChatPrinter printer = new ChatPrinter(); final TranscriptWindow currentWindow = room.getTranscriptWindow(); if (currentWindow != null) { printer.print(currentWindow); } }
/** * Method to set the Document to print as the one contained in a JEditorPane. * This method is useful when Java does not provide direct access to a * particular Document type, such as a Rich Text Format document. With this * method such a document can be sent to the DocumentRenderer class enclosed * in a JEditorPane. * * @param jedPane the JEditorPane document container. */ public void setDocument(JEditorPane jedPane) { JEditorPane = new JEditorPane(); setDocument(jedPane.getContentType(), jedPane.getDocument()); }