Project

General

Profile

Actions

Bug #3056

closed

unable to print output of Display actor

Added by Kevin Drury almost 17 years ago. Updated almost 17 years ago.

Status:
Resolved
Priority:
Normal
Category:
general
Target version:
Start date:
01/09/2008
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
3056

Description

The Display actor receives summary output from an RExpression actor. The summary displays perfectly, but does not print. The summary also appears normally in the text editor available from the Display Tools menu, but also does not print from there.

Actions #1

Updated by Dan Higgins almost 17 years ago

Both the Display window and the Text Editor have a 'Print...' menu item but it does not appear to do anything! Note the 'Print...' from the main Kepler window just prints an image of the workflow.

Note that in Ptolemy, the 'Print' menu item in the Display window is 'grayed out', so you cannot print directly from that window in Ptolemy either!

Dan Higgins

Actions #2

Updated by Christopher Brooks almost 17 years ago

The issue here is that the Display actor does not implement the Java
Printable interface

Display has an inner class that creates a ptolemy.actor.gui.TextEditor.
TextEditor extends ptolemy.actor.gui.TableauFrame which in turn
extends ptolemy.gui.Top. Top contains:

// Print button disabled by default, unless this class implements
// one of the JDK1.2 printing interfaces.
if (Top.this instanceof Printable || Top.this instanceof Pageable) {
_fileMenuItems[5].setEnabled(true);
} else {
_fileMenuItems[5].setEnabled(false);
}

ptolemy.actor.gui.HTMLViewer implements Printable and includes a print()
method that could be used as an example. Note that HTMLViewer does
have a FIXME:

// FIXME: This should be handled in Top...
and then defines the print() method.

Other classes that implements Printable are:
diva.canvas.JCanvas
ptolemy.plot.PlotBox
vergil.basic.BasicGraphFrame

Actions #3

Updated by Christopher Brooks almost 17 years ago

The "Print" menu choice is now enabled in Display. The change was to ptolemy/actor/gui/TextEditor.java
Getting multiple pages to work properly was tricky.
There also might be issues with the "Page Setup" tab and changing the
top margin not being propagated to the app. I think this is a Java bug.
If I change both the top margin and the bottom margin, then changes
are propagated to the app.

Note that recent changes also fix a similar bug in the Plot actor where
the Print menu choice was not highlighted for Plots started from within Vergil.

The fixes that enable the Print menu choice in Display and Plot have been
added to the Ptolemy II rel-7-0-beta-2 branch for use in the upcoming
Ptolemy II 7.0 release.

Actions #4

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 3056

Actions

Also available in: Atom PDF