public abstract class BasicGraphFrame extends PtolemyFrame implements java.awt.print.Printable, java.awt.datatransfer.ClipboardOwner, ChangeListener, java.awt.event.MouseWheelListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, ImageExportable, HTMLExportable
Red (johnr) |
Red (neuendor) |
Modifier and Type | Class and Description |
---|---|
protected class |
BasicGraphFrame.CopyAction
Action to copy the current selection.
|
protected class |
BasicGraphFrame.CutAction
Action to copy and delete the current selection.
|
protected class |
BasicGraphFrame.EditPreferencesAction
Action to edit the preferences.
|
class |
BasicGraphFrame.ExportImageAction
Export an image of the model.
|
protected class |
BasicGraphFrame.FindAction
Action to search for text in a model.
|
static class |
BasicGraphFrame.FolderFileFilter
Accept only folders in a file browser.
|
(package private) class |
BasicGraphFrame.HierarchyTreeCellRenderer
Render a cell in the model hierarchy tree.
|
protected static class |
BasicGraphFrame.MousePressedLayerAdapter
A Layer Adapter to handle the mousePressed layer event.
|
protected class |
BasicGraphFrame.MoveToBackAction
Action to move the current selection to the back (which corresponds
to first in the ordered list).
|
protected class |
BasicGraphFrame.MoveToFrontAction
Action to move the current selection to the back (which corresponds
to first in the ordered list).
|
protected class |
BasicGraphFrame.PasteAction
Paste the current contents of the clipboard into the current model.
|
TableauFrame.ExtensionFileFilter, TableauFrame.MenuItemListener
javax.swing.JFrame.AccessibleJFrame
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
protected javax.swing.Action |
_copyAction
The copy action.
|
protected javax.swing.Action |
_cutAction
The cut action.
|
protected LibraryAttribute |
_defaultLibrary
The default Library.
|
protected EditorDropTarget |
_dropTarget
The instance of EditorDropTarget associated with the JGraph.
|
protected javax.swing.JMenu |
_editMenu
The edit menu.
|
protected BasicGraphFrame.EditPreferencesAction |
_editPreferencesAction
The action to edit preferences.
|
protected javax.swing.Action |
_exportGIFAction
The export to GIF action.
|
protected javax.swing.Action |
_exportHTMLAction
The export HTML action.
|
protected javax.swing.Action |
_exportPDFAction
The export to PDF action.
|
protected javax.swing.Action |
_exportPNGAction
The export to PNG action.
|
protected javax.swing.Action |
_findAction
The find action.
|
(package private) javax.swing.JTextField |
_findInLibraryEntryBox
The entry box for find in library.
|
protected javax.swing.JMenu |
_graphMenu
The graph menu.
|
protected JCanvasPanner |
_graphPanner
The panner.
|
protected JGraph |
_jgraph
The instance of JGraph for this editor.
|
protected javax.swing.Action |
_layoutAction
The action for automatically laying out the graph.
|
protected javax.swing.Action |
_layoutConfigDialogAction
The action for opening the layout configuration dialog.
|
protected javax.swing.JTree |
_library
The library display widget.
|
protected PTreeMenuCreator |
_libraryContextMenuCreator
The library context menu creator.
|
protected EntityTreeModel |
_libraryModel
The library model.
|
protected javax.swing.JScrollPane |
_libraryScrollPane
The library scroll pane.
|
protected BasicGraphFrame.MoveToBackAction |
_moveToBackAction
Action to move to the back.
|
protected BasicGraphFrame.MoveToFrontAction |
_moveToFrontAction
Action to move to the front.
|
protected static java.util.LinkedList<BasicGraphFrame> |
_openGraphFrames
List of references to graph frames that are open.
|
protected javax.swing.JPanel |
_palettePane
The library display panel.
|
protected javax.swing.Action |
_pasteAction
The paste action.
|
protected javax.swing.JComponent |
_rightComponent
The right component for this editor.
|
protected javax.swing.JSplitPane |
_splitPane
The split pane for library and editor.
|
protected javax.swing.JToolBar |
_toolbar
The toolbar.
|
protected CompositeEntity |
_topLibrary
The library.
|
protected PTree |
_treeView
The tree view of the model, used for browsing large models.
|
protected ClassAndEntityTreeModel |
_treeViewModel
The tree view model.
|
protected javax.swing.JScrollPane |
_treeViewScrollPane
The tree view scroll pane.
|
protected javax.swing.Action |
_zoomFitAction
Action for zoom fitting.
|
protected boolean |
_zoomFlag
True if we are inside zoom().
|
protected javax.swing.Action |
_zoomInAction
Action for zooming in.
|
protected javax.swing.Action |
_zoomOutAction
Action for zooming out.
|
protected javax.swing.Action |
_zoomResetAction
Action for zoom reset.
|
static java.awt.Color |
BACKGROUND_COLOR
Default background color is a light grey.
|
static java.lang.String |
VERGIL_USER_LIBRARY_NAME
Deprecated.
|
_query
_initialSaveAsFileName, _topPack, _viewMenu, aboutFile, helpFile
_CANCELED, _debugClosing, _directory, _DISCARDED, _exitResult, _EXPORT_MENU_INDEX, _FAILED, _fileFilter, _fileMenu, _fileMenuItems, _filenameFilter, _helpMenu, _helpMenuItems, _IMPORT_MENU_INDEX, _menubar, _NEW_MENU_INDEX, _SAVED, _statusBar
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
BasicGraphFrame(NamedObj entity,
Tableau tableau)
Construct a frame associated with the specified Ptolemy II model
or object.
|
BasicGraphFrame(NamedObj entity,
Tableau tableau,
LibraryAttribute defaultLibrary)
Construct a frame associated with the specified Ptolemy II model.
|
Modifier and Type | Method and Description |
---|---|
protected void |
_addLayoutMenu(javax.swing.JMenu graphMenu)
Add a layout menu.
|
protected void |
_addMenus()
Create the menus that are used by this frame.
|
protected boolean |
_checkForImplied(java.util.List<NamedObj> elements)
Return true if any element of the specified list is implied.
|
protected boolean |
_close()
Override the base class to remove the listeners we have
created when the frame closes.
|
protected CompositeEntity |
_createDefaultLibrary(Workspace workspace)
Create the default library to use if an entity has no
LibraryAttribute.
|
protected javax.swing.JMenuItem[] |
_createFileMenuItems()
Create the items in the File menu's Export section
This method adds a menu items to export images of the plot
in GIF, PNG, and possibly PDF.
|
protected abstract GraphPane |
_createGraphPane(NamedObj entity)
Create a new graph pane.
|
protected javax.swing.JComponent |
_createRightComponent(NamedObj entity)
Create the component that goes to the right of the library.
|
protected SizeAttribute |
_createSizeAttribute()
Create a SizeAttribute for the current model when it is being saved to
a file.
|
protected java.lang.StringBuffer |
_deleteMoML(AbstractBasicGraphModel graphModel,
java.lang.Object[] selection,
SelectionModel model)
Return the MoML to delete the specified selection objects.
|
protected void |
_exportDesignPattern(java.io.Writer writer,
NamedObj model,
java.lang.String name)
Export the model into the writer with the given name.
|
protected void |
_finishExportDesignPattern()
Finish exporting a design pattern.
|
protected java.io.File |
_getDirectory()
Deprecated.
Use
getLastDirectory() instead |
protected GraphController |
_getGraphController()
Return the graph controller associated with this frame.
|
protected AbstractBasicGraphModel |
_getGraphModel()
Return the graph model associated with this frame.
|
protected javax.swing.JComponent |
_getRightComponent()
Return the right component on which graph editing occurs.
|
protected java.util.HashSet<NamedObj> |
_getSelectionSet()
Return a set of instances of NamedObj representing the objects
that are currently selected.
|
protected void |
_initBasicGraphFrame()
Initialize this BasicGraphFrame.
|
protected void |
_initBasicGraphFrameActions()
Add the cut, copy, paste, move to front, mode to back
actions.
|
protected void |
_initBasicGraphFrameInitialization()
Common initialization for a BasicGraphFrame.
|
protected void |
_initBasicGraphFrameRightComponent()
Set up the right component.
|
protected void |
_initBasicGraphFrameRightComponentMouseListeners()
Add listeners to the right component.
|
protected void |
_initBasicGraphFrameSetZoomAndPan()
Set the zoom factor and the pan.
|
protected void |
_initBasicGraphFrameToolBarZoomButtons()
Add tool bar buttons.
|
protected void |
_initLayoutGuiAction()
Initialize the layout gui.
|
protected boolean |
_isDesignPattern()
Return true if this is a design pattern.
|
protected void |
_prepareExportDesignPattern()
Prepare to export a design pattern.
|
protected java.awt.FileDialog |
_saveAsFileDialogComponent()
Create and return a file dialog for the "Save As" command.
|
protected javax.swing.JFileChooser |
_saveAsJFileChooserComponent()
Create and return a file dialog for the "Save As" command.
|
protected void |
_setDirectory(java.io.File directory)
Deprecated.
Use
Top.setDirectory(File) instead |
protected void |
_setDropIntoEnabled(boolean enable)
Enable or disable drop into.
|
protected void |
_writeFile(java.io.File file)
Write the model to the specified file.
|
void |
changeExecuted(ChangeRequest change)
React to the fact that a change has been successfully executed
by marking the data associated with this window modified.
|
void |
changeFailed(ChangeRequest change,
java.lang.Exception exception)
React to the fact that a change has triggered an error by
doing nothing (the effigy is also listening and will report
the error).
|
void |
clearSelection()
Clear the selected objects in this frame.
|
void |
copy()
Get the currently selected objects from this document, if any,
and place them on the clipboard in MoML format.
|
void |
createHierarchy()
Create a typed composite actor that contains the selected actors
and connections.
|
void |
cut()
Remove the currently selected objects from this document, if any,
and place them on the clipboard.
|
void |
delete()
Delete the currently selected objects from this document.
|
void |
dispose()
Dispose of this frame.
|
void |
disposeSuper()
Invoke the dispose() method of the superclass,
PtolemyFrame . |
void |
expandAllLibraryRows()
Expand all the rows of the library.
|
void |
exportDesignPattern()
Export the current submodel as a design pattern using a method similar to
Save As.
|
static BasicGraphFrame |
getBasicGraphFrame(Effigy effigy)
Given an Effigy, return the corresponding BasicGraphFrame, if any.
|
static BasicGraphFrame |
getBasicGraphFrame(NamedObj model)
Given a NamedObj, return the corresponding BasicGraphFrame.
|
java.awt.geom.Point2D |
getCenter()
Return the center location of the visible part of the pane.
|
java.awt.Dimension |
getContentSize()
Return the size of the contents of this window.
|
static Figure |
getFigureUnder(GraphPane pane,
java.awt.geom.Point2D point,
java.lang.Object[] filteredFigures)
Return the figure that is an icon of a NamedObj and is
under the specified point, or null if there is none.
|
PtolemyFrame |
getFrame()
The frame (window) being exported to HTML.
|
JCanvasPanner |
getGraphPanner()
Return the JCanvasPanner instance.
|
JGraph |
getJGraph()
Return the JGraph instance that this view uses to represent the
ptolemy model.
|
java.io.File |
getLastDirectory()
Get the directory that was last accessed.
|
java.util.HashSet<NamedObj> |
getSelectionSet()
Return a set of instances of NamedObj representing the objects
that are currently selected.
|
java.awt.geom.Rectangle2D |
getVisibleCanvasRectangle()
Return the rectangle representing the visible part of the
pane, transformed into canvas coordinates.
|
java.awt.geom.Rectangle2D |
getVisibleRectangle()
Return the rectangle representing the visible part of the
pane, in pixel coordinates on the screen.
|
void |
importDesignPattern()
Import a design pattern into the current design.
|
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable transferable)
Do nothing.
|
void |
mouseClicked(java.awt.event.MouseEvent event)
Called when the mouse is clicked.
|
void |
mouseDragged(java.awt.event.MouseEvent event)
Transform the graph by the amount the mouse is dragged
while the middle mouse button is held down.
|
void |
mouseEntered(java.awt.event.MouseEvent event)
Called when the mouse enters this component.
|
void |
mouseExited(java.awt.event.MouseEvent event)
Called when the mouse leaves this component.
|
void |
mouseMoved(java.awt.event.MouseEvent event)
Called when the mouse is moved.
|
void |
mousePressed(java.awt.event.MouseEvent event)
Store the location of the middle mouse event.
|
void |
mouseReleased(java.awt.event.MouseEvent event)
Called when the mouse is released.
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent event)
Scroll in when the mouse wheel is moved.
|
static void |
openComposite(java.awt.Frame owner,
NamedObj target)
Opens the nearest composite actor above the target in the hierarchy
and possibly change the zoom and centering to show the target.
|
void |
openContainer()
Open the container, if any, of the entity.
|
void |
paste()
Assuming the contents of the clipboard is MoML code, paste it into
the current model by issuing a change request.
|
int |
print(java.awt.Graphics graphics,
java.awt.print.PageFormat format,
int index)
Print the visible portion of the graph to a printer,
which is represented by the specified graphics object.
|
void |
redo()
Redo the last undone change on the model.
|
static void |
report(java.awt.Frame owner,
java.lang.String message)
Report a message to either the status bar or message handler.
|
static void |
saveComponentInLibrary(Configuration configuration,
Entity entity)
Deprecated.
|
void |
setCenter(java.awt.geom.Point2D center)
Set the center location of the visible part of the pane.
|
void |
setJGraph(JGraph jgraph)
Set the JGraph instance that this view uses to represent the
ptolemy model.
|
void |
setLastDirectory(java.io.File directory)
Set the directory that was last accessed by this window.
|
void |
undo()
Undo the last undoable change on the model.
|
void |
updateWindowAttributes()
Update the size, zoom and position of the window.
|
void |
writeHTML(ExportParameters parameters,
java.io.Writer writer)
Write an HTML page based on the current view of the model
to the specified destination directory.
|
void |
writeImage(java.io.OutputStream stream,
java.lang.String format)
Write an image to the specified output stream in the specified format.
|
void |
writeImage(java.io.OutputStream stream,
java.lang.String format,
java.awt.Color background)
Write an image to the specified output stream in the specified format with
the specified background color.
|
void |
zoom(double factor)
Zoom in or out to magnify by the specified factor, from the current
magnification.
|
void |
zoomFit()
Zoom to fit the current figures.
|
void |
zoomFit(GraphPane pane,
java.awt.geom.Rectangle2D bounds)
Zoom to fit the bounds.
|
void |
zoomReset()
Set zoom to the nominal.
|
_clear, _help, _print, _saveAs, getEffigy, getModel, setModel
_about, _confirmFile, _exit, _getDefaultIconImage, _getName, _read, _save, _saveAs, _saveAsHelper, getAlternateTopPack, getConfiguration, getDirectory, getEffigy, getTableau, isModified, pack, printPDF, setModified, setTableau
_getCurrentDirectory, _open, _openURL, _populateHistory, _printCrossPlatform, _printNative, _printPDF, _queryForSave, _saveAsFileDialog, _updateHistory, about, centerOnScreen, close, deferIfNecessary, exit, getCentering, hideMenuBar, isDisposed, isMenuPopulated, report, report, report, setBackground, setCentering, setDirectory, show
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, toBack, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final java.awt.Color BACKGROUND_COLOR
@Deprecated public static java.lang.String VERGIL_USER_LIBRARY_NAME
UserActorLibrary.USER_LIBRARY_NAME
protected javax.swing.Action _copyAction
protected javax.swing.Action _cutAction
protected LibraryAttribute _defaultLibrary
protected EditorDropTarget _dropTarget
protected javax.swing.JMenu _editMenu
protected BasicGraphFrame.EditPreferencesAction _editPreferencesAction
protected javax.swing.Action _exportGIFAction
protected javax.swing.Action _exportHTMLAction
protected javax.swing.Action _exportPDFAction
protected javax.swing.Action _exportPNGAction
protected javax.swing.Action _findAction
protected javax.swing.JMenu _graphMenu
protected JCanvasPanner _graphPanner
protected JGraph _jgraph
protected javax.swing.Action _layoutAction
protected javax.swing.Action _layoutConfigDialogAction
null
, since the dialog is only supported
if advanced layout is available. In this case the action should not
be shown in menus.protected javax.swing.JTree _library
protected PTreeMenuCreator _libraryContextMenuCreator
protected EntityTreeModel _libraryModel
protected javax.swing.JScrollPane _libraryScrollPane
protected BasicGraphFrame.MoveToBackAction _moveToBackAction
protected BasicGraphFrame.MoveToFrontAction _moveToFrontAction
protected static java.util.LinkedList<BasicGraphFrame> _openGraphFrames
protected javax.swing.JPanel _palettePane
protected javax.swing.Action _pasteAction
protected javax.swing.JComponent _rightComponent
protected javax.swing.JSplitPane _splitPane
protected javax.swing.JToolBar _toolbar
protected CompositeEntity _topLibrary
protected PTree _treeView
protected javax.swing.JScrollPane _treeViewScrollPane
protected ClassAndEntityTreeModel _treeViewModel
protected javax.swing.Action _zoomFitAction
protected javax.swing.Action _zoomInAction
protected javax.swing.Action _zoomOutAction
protected javax.swing.Action _zoomResetAction
protected boolean _zoomFlag
javax.swing.JTextField _findInLibraryEntryBox
public BasicGraphFrame(NamedObj entity, Tableau tableau)
entity
- The model or object to put in this frame.tableau
- The tableau responsible for this frame.Tableau.show()
public BasicGraphFrame(NamedObj entity, Tableau tableau, LibraryAttribute defaultLibrary)
entity
- The model or object to put in this frame.tableau
- The tableau responsible for this frame.defaultLibrary
- An attribute specifying the default library
to use if the model does not have a library. The defaultLibrary
attribute is only read if the model does not have a
LibraryAttribute
with the name
"_library
", or if the LibraryAttribute cannot be
read.Tableau.show()
public void changeExecuted(ChangeRequest change)
changeExecuted
in interface ChangeListener
change
- The change that has been executed.public void changeFailed(ChangeRequest change, java.lang.Exception exception)
changeFailed
in interface ChangeListener
change
- The change that was attempted.exception
- The exception that resulted.public void clearSelection()
public void copy()
public void createHierarchy()
public void cut()
public void delete()
public void dispose()
disposeSuper()
.dispose
in class PtolemyFrame
public void disposeSuper()
PtolemyFrame
.public void expandAllLibraryRows()
expandAllLibraryRows
in class PtolemyFrame
public void exportDesignPattern()
public static BasicGraphFrame getBasicGraphFrame(NamedObj model)
model
- The NamedObj for the model. See
ConfigurationApplication.openModel(String)
for a static method that returns the modelpublic static BasicGraphFrame getBasicGraphFrame(Effigy effigy)
effigy
- The Effigy. To determine the Effigy of a
NamedObj, use Configuration.findEffigy(NamedObj)
.public java.awt.geom.Point2D getCenter()
setCenter(Point2D)
public java.awt.Dimension getContentSize()
getContentSize
in class Top
public static Figure getFigureUnder(GraphPane pane, java.awt.geom.Point2D point, java.lang.Object[] filteredFigures)
EditorDropTargetListener._getFigureUnder(Point2D)
.pane
- The pane in which to searchpoint
- The point in the graph pane.filteredFigures
- figures that are filtered from the object searchpublic PtolemyFrame getFrame()
public JGraph getJGraph()
setJGraph(JGraph)
public JCanvasPanner getGraphPanner()
public java.io.File getLastDirectory()
setLastDirectory(File)
public void setLastDirectory(java.io.File directory)
directory
- The directory last accessed.getLastDirectory()
public java.util.HashSet<NamedObj> getSelectionSet()
public java.awt.geom.Rectangle2D getVisibleCanvasRectangle()
public java.awt.geom.Rectangle2D getVisibleRectangle()
public void importDesignPattern()
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable transferable)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public void openContainer()
public static void openComposite(java.awt.Frame owner, NamedObj target)
target
- The target.owner
- The frame that, per the user, is generating the dialog.public void paste()
public int print(java.awt.Graphics graphics, java.awt.print.PageFormat format, int index) throws java.awt.print.PrinterException
print
in interface java.awt.print.Printable
graphics
- The context into which the page is drawn.format
- The size and orientation of the page being drawn.index
- The zero based index of the page to be drawn.java.awt.print.PrinterException
- If the print job is terminated.public void redo()
undo()
public static void report(java.awt.Frame owner, java.lang.String message)
owner
- The frame that, per the user, is generating the
dialog.message
- The message.@Deprecated public static void saveComponentInLibrary(Configuration configuration, Entity entity)
UserActorLibrary.saveComponentInLibrary(Configuration, Entity)
configuration
- The configuration.entity
- The entity to save.public void setCenter(java.awt.geom.Point2D center)
center
- The center of the visible part.getCenter()
public void setJGraph(JGraph jgraph)
jgraph
- The JGraph.getJGraph()
public void undo()
redo()
public void updateWindowAttributes() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If there is a problem
getting a parameter.NameDuplicationException
- If there is a problem
creating a parameter.public void writeHTML(ExportParameters parameters, java.io.Writer writer) throws java.awt.print.PrinterException, java.io.IOException, IllegalActionException
The generated page has a header with the name of the model,
a reference to a GIF image file with name equal to the name
of the model with a ".gif" extension appended, and a script
that reacts when the mouse is moved over an actor by
displaying a table with the parameter values of the actor.
The gif image is assumed to have been generated with the
current view using the writeImage(OutputStream, String)
method.
writeHTML
in interface HTMLExportable
parameters
- The parameters that control the export.writer
- The writer to use the write the HTML. If this is null,
then create an index.html file in the
directory given by the directoryToExportTo field of the parameters.java.io.IOException
- If unable to write associated files, or if the
current configuration does not support it.java.awt.print.PrinterException
- If unable to write associated files.IllegalActionException
- If something goes wrong accessing the model.public void writeImage(java.io.OutputStream stream, java.lang.String format) throws java.awt.print.PrinterException, java.io.IOException
ExportModel
is a standalone class
that exports an image of a model.
writeImage
in interface ImageExportable
stream
- The output stream to write to.format
- The image format to generate.java.io.IOException
- If writing to the stream fails.java.awt.print.PrinterException
- If the specified format is not supported.writeHTML(ExportParameters, Writer)
public void writeImage(java.io.OutputStream stream, java.lang.String format, java.awt.Color background) throws java.awt.print.PrinterException, java.io.IOException
ExportModel
is a standalone class
that exports an image of a model.
stream
- The output stream to write to.format
- The image format to generate.background
- The background color, or null to use the current color.java.io.IOException
- If writing to the stream fails.java.awt.print.PrinterException
- If the specified format is not supported.writeHTML(ExportParameters, Writer)
public void zoom(double factor)
factor
- The magnification factor (relative to 1.0).public void zoomFit()
public void zoomFit(GraphPane pane, java.awt.geom.Rectangle2D bounds)
pane
- The pane.bounds
- The bound to zoom to.public void zoomReset()
public void mouseClicked(java.awt.event.MouseEvent event)
mouseClicked
in interface java.awt.event.MouseListener
event
- The mouse event.public void mouseDragged(java.awt.event.MouseEvent event)
mouseDragged
in interface java.awt.event.MouseMotionListener
event
- The drag event.public void mouseEntered(java.awt.event.MouseEvent event)
mouseEntered
in interface java.awt.event.MouseListener
event
- The mouse event.public void mouseExited(java.awt.event.MouseEvent event)
mouseExited
in interface java.awt.event.MouseListener
event
- The mouse event.public void mouseMoved(java.awt.event.MouseEvent event)
mouseMoved
in interface java.awt.event.MouseMotionListener
event
- Contains details of the movement event.
However, events _are_ handled by the components within this component.public void mousePressed(java.awt.event.MouseEvent event)
mousePressed
in interface java.awt.event.MouseListener
event
- The mouse event.public void mouseReleased(java.awt.event.MouseEvent event)
mouseReleased
in interface java.awt.event.MouseListener
event
- The mouse event.public void mouseWheelMoved(java.awt.event.MouseWheelEvent event)
mouseWheelMoved
in interface java.awt.event.MouseWheelListener
event
- The mouse wheel event.protected void _addLayoutMenu(javax.swing.JMenu graphMenu)
graphMenu
- The menu to which to add the layout menu.protected void _addMenus()
_addMenus
in class TableauFrame
protected boolean _checkForImplied(java.util.List<NamedObj> elements)
elements
- A list of instances of NamedObj.NamedObj.getDerivedLevel()
protected boolean _close()
_close
in class PtolemyFrame
protected CompositeEntity _createDefaultLibrary(Workspace workspace)
workspace
- The workspace in which to create
the library, if one needs to be created.protected javax.swing.JMenuItem[] _createFileMenuItems()
_createFileMenuItems
in class Top
protected abstract GraphPane _createGraphPane(NamedObj entity)
entity
- The object to be displayed in the pane.protected javax.swing.JComponent _createRightComponent(NamedObj entity)
entity
- The entity to display in the component.protected SizeAttribute _createSizeAttribute() throws IllegalActionException, NameDuplicationException
IllegalActionException
- If "_vergilSize" is found but is not
an instance of SizeAttribute, or if a SizeAttribute is not accepted by
the current model.NameDuplicationException
- If the name "_vergilSize" is already
used when trying to create the SizeAttribute.protected void _exportDesignPattern(java.io.Writer writer, NamedObj model, java.lang.String name) throws java.io.IOException
writer
- The writer.model
- The model to export.name
- The name of the exported model.java.io.IOException
- If an I/O error occurs.protected void _finishExportDesignPattern()
@Deprecated protected java.io.File _getDirectory()
getLastDirectory()
instead_setDirectory(java.io.File)
protected GraphController _getGraphController()
protected AbstractBasicGraphModel _getGraphModel()
protected javax.swing.JComponent _getRightComponent()
protected java.util.HashSet<NamedObj> _getSelectionSet()
protected void _initBasicGraphFrame()
protected void _initBasicGraphFrameActions()
protected void _initBasicGraphFrameRightComponent()
protected void _initBasicGraphFrameRightComponentMouseListeners()
protected void _initBasicGraphFrameInitialization()
protected void _initBasicGraphFrameToolBarZoomButtons()
protected void _initBasicGraphFrameSetZoomAndPan() throws IllegalActionException
IllegalActionException
- If the zoom or pan parameters
cannot be read.protected void _initLayoutGuiAction()
protected boolean _isDesignPattern()
protected void _prepareExportDesignPattern()
protected java.awt.FileDialog _saveAsFileDialogComponent()
If PtGUIUtilities.useFileDialog()
returns true
then Top._saveAs()
uses this method. Otherwise,
_saveAsJFileChooserComponent()
is used.
_saveAsFileDialogComponent
in class PtolemyFrame
protected javax.swing.JFileChooser _saveAsJFileChooserComponent()
If PtGUIUtilities.useFileDialog()
returns false
then Top._saveAs()
uses this method. Otherwise,
_saveAsFileDialogComponent()
is used.
_saveAsJFileChooserComponent
in class PtolemyFrame
@Deprecated protected void _setDirectory(java.io.File directory)
Top.setDirectory(File)
insteaddirectory
- The directory last accessed.getLastDirectory()
protected void _setDropIntoEnabled(boolean enable)
enable
- False to disable.protected void _writeFile(java.io.File file) throws java.io.IOException
_writeFile
in class PtolemyFrame
file
- The file to write to.java.io.IOException
- If the write fails.protected java.lang.StringBuffer _deleteMoML(AbstractBasicGraphModel graphModel, java.lang.Object[] selection, SelectionModel model)
graphModel
- The graph model.selection
- The selection.model
- The selection model.