public class EditFrame
extends JFrame
implements MouseListener, MouseMotionListener, Runnable, KeyListener, chargerlib.ManagedWindow
CanvasPanel
,
EditManager
,
OperManager
,
HubFrame
,
Serialized FormModifier and Type | Class and Description |
---|---|
class |
EditFrame.HandleCompEvents |
class |
EditFrame.ManageWinEvents |
Modifier and Type | Field and Description |
---|---|
JMenuItem |
ActualSizeItem |
private boolean |
alreadyDragging
to tell routines whether dragging in progress
|
JMenuItem |
BackToHubCmdItem |
static Font |
borderFont
The text to be displayed in the status bar of the edit frame
|
static int |
borderWidth |
double |
canvasScaleFactor
Scaling factor for this canvas panel.
|
chargerlib.GenericTextFrame |
CGIFDisplay |
JMenuItem |
ChangeColorBlackAndWhiteItem |
JMenuItem |
ChangeColorDefaultItem |
JMenuItem |
ChangeColorFactoryItem |
JMenuItem |
ChangeColorGrayscaleItem |
JMenu |
changeColorMenu |
JPanel |
changedMarker |
JMenuItem |
ChangeFillItem |
JMenu |
changeFontItem |
JMenuItem |
ChangeTextItem |
private ComponentListener |
componentAdapter |
boolean |
contentHasChanged
whether logical content of the graph has changed
|
CanvasPanel |
cp
Panel that contains the actual drawing objects
|
(package private) GEdge |
currentEdge
used so that mousepressed and mousereleased can communicate
|
Font |
currentFont |
FontMetrics |
currentFontMetrics |
(package private) Graph |
currentGraph
used so that mousepressed and mousereleased can communicate
|
(package private) GNode |
currentNode
used so that mousepressed and mousereleased can communicate
|
(package private) GraphObject |
currentObject
used so that mousepressed and mousereleased can communicate
|
JMenuItem |
CurrentSizeItem |
private GraphObject |
cursorObject
the single object under the cursor
|
static Dimension |
defaultFrameDim |
static int |
defaultFrameHeight |
static int |
defaultFrameWidth |
JPanel |
descriptorPanel |
boolean |
dotIsBeingDragged
Whether we're dragging the end of a GEdge or not
|
Point2D.Double |
dragCurrPt |
Point2D.Double |
dragStartPt |
Point2D.Double |
dragStopPt |
private JScrollPane |
dsp |
JMenuBar |
editFrameMenuBar |
int |
editFrameNum
Global unique number assigned to this frame; never used again in this
session.
|
(package private) Thread |
editFrameThread |
EditToolbar |
editingToolbar |
JMenu |
editMenu |
ArrayList<GraphObject> |
EFSelectedNodes
list containing all selected nodes; maintained as nodes are
selected/unselected
|
ArrayList<GraphObject> |
EFSelectedObjects
list containing all selected objects (including edges); maintained as
objects are selected/unselected
|
EditManager |
emgr |
JMenu |
examineMenu |
JMenu |
fileMenu |
JMenuItem |
FindAgainMenuItem |
JMenuItem |
FindMenuItem |
private FocusListener |
focusAdapter |
FormatToolbar |
formatToolbar |
File |
graphAbsoluteFile |
String |
graphName
basename of graph, not including any suffixes, modalities, etc.
|
File |
graphSourceFile
an absolute or relative path including trailing sep (e.g., "CG/Graphs/" )
|
Point2D.Double |
lastMouseClickPoint |
Color |
LEDcolor |
Color |
lineDragColor
Color of an edge whenever we're in the process of an edge being drawn
|
JTextField |
messageBox |
static Font |
messageBoxFont |
static int |
messageBoxHeight |
JPanel |
messagePanel |
chargerlib.GenericTextFrame |
metricsDisplay |
private boolean |
mShown |
private GraphObject |
ObjectBeingDragged |
OperManager |
omgr |
JMenu |
operateMenu |
PageFormat |
pformat |
PragmaticSense |
purpose
graph's modality, as an abbreviation
|
JMenuItem |
RedoItem |
static double |
scaleIncrement
Quantum increment for scaling.
|
int |
scaleIndex
number of increments to add or subtract from 1.
|
boolean |
selectionIsBeingDragged
Whether we're dragging a selection or just dragging for the fun of it.
|
Rectangle2D.Double |
selectionRect
physical rectangle of the selection
|
static Color |
selectionRectColor |
JCheckBoxMenuItem |
ShowGlossMenuItem |
JMenuItem |
ShowHistoryMenuItem |
boolean |
showRubberBand
whether to display a rubber band while dragging
|
boolean |
somethingHasBeenSelected
whether there is anything already selected
|
boolean |
somethingHasChanged
whether anything (including positioning) in the graph has changed
|
JScrollPane |
sp
the pane in which cp is contained, for scrolling purposes only
|
JMenu |
testingItemsMenu |
chargerlib.GenericTextFrame |
textFormDisplay
Utility windows possibly used by this frame
|
Graph |
TheGraph
The root graph of the edit frame
|
ThreadGroup |
threadgroup
the group to which all this window's updaters belong
|
JMenuItem |
UndoItem |
JMenu |
viewMenu |
private WindowAdapter |
windowAdapter |
JMenu |
windowMenu |
chargerlib.GenericTextFrame |
XMLDisplay |
static int |
xoffsetForCopy |
static int |
yoffsetForCopy |
JMenuItem |
ZoomInItem |
JMenuItem |
ZoomOutItem |
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 |
---|
EditFrame()
Creates an empty editing window, with an empty graph and untitled
filename.
|
EditFrame(File graphFile,
Graph g,
boolean needsSaving)
Creates a new editing window based on the filename being a suffix-ed CG
file.
|
Modifier and Type | Method and Description |
---|---|
void |
addToSelection(GraphObject go)
Mark an object as being selected, and let the edit frame know that
something was selected.
|
Point2D.Double |
antiscaled(Point2D.Double p)
Convert a logical point of the canvas's graphics context into its
physical location in the panel.
|
Rectangle2D.Double |
antiscaled(Rectangle2D.Double r)
Convert a logical rectangle of the canvas's graphics context into its
physical rectangle in the panel.
|
void |
attachGraphToFrame(String filename,
Graph startingGraph,
boolean needsSaving)
Attaches a graph to an edit frame, using the filename as a guide.
|
void |
clearStatus()
Blanks out the status line at the bottom of the editing frame
|
boolean |
closeOut()
Does a logical close (with respect to the user).
|
void |
displayOneLiner(String s)
Shows a string in the message box.
|
void |
doDoubleClick(MouseEvent me)
Processes 2-click events; called by mouseClicked.
|
boolean |
entireGraphSelected(Graph g)
Checks to see if the entire (deep) contents of the target context graph
are selected
|
protected void |
finalize() |
void |
fixToolbarDisplay()
For all the selected nodes, determines what best to show on the format toolbar.
|
String |
getFilename() |
String |
getGraphName()
Returns the graph name (NOT the filename) of the current window.
|
String |
getMenuItemLabel()
Part of the ManagedWindow interface
|
boolean |
getShowRubberBand() |
JMenu |
getWindowMenu() |
private String |
identifyComponent(Component c) |
void |
includeContextMembers()
For every selected object, if it's a context, make sure all its
components are marked HERE!!
|
void |
includeContextMembers(Graph g)
For the given graph, mark its contents (recursively) as selected
|
GraphObject |
insideGEdge(Point2D.Double p)
Determine whether there is any GEdge whose display rectangle contains a
point on the canvas.
|
GraphObject |
insideGNode(Point2D.Double p)
Determine whether a given point is conntained in any GNode's display
rectangle.
|
void |
keyPressed(KeyEvent e)
Handles key-presses while on the canvas.
|
void |
keyReleased(KeyEvent e) |
void |
keyTyped(KeyEvent e) |
void |
makeContext(ArrayList selectedNodes,
String what,
Rectangle2D.Double border)
Gathers a collection of objects into a single graph we call a context
Assumes all selected objects have isSelected set Assumes all selected
objects are in the same outer graph
|
void |
mouseClicked(MouseEvent me)
Handles actual mouse clicks, noting that most work is done by press and
release.
|
void |
mouseDragged(MouseEvent me)
Performed while the mouse is being dragged.
|
void |
mouseEntered(MouseEvent me) |
void |
mouseExited(MouseEvent me) |
void |
mouseMoved(MouseEvent me)
Track the mouse's movements.
|
void |
mousePressed(MouseEvent me)
Handles the operations needed when the mouse is pressed.
|
void |
mouseReleased(MouseEvent me)
Handles any actions where the mouse is released.
|
void |
moveSelectedObjects(Graph g,
Point2D.Double delta)
Translates all selected objects by a common x,y displacement.
|
GraphObject |
onTopOfGNode(Point2D.Double p)
Determine whether a given point is on top of a GNode's relevent portion.
|
GraphObject |
onTopOfObject(Point2D.Double p)
Determine whether an object's display rectangle contains a point on the
canvas.
|
boolean |
performCheckSaved()
Checks whether graph in the edit frame has been saved.
|
void |
refreshBorders()
Refreshes the top border containing the scale factor for the graph, the
count for each kind of graph node, and an indication of whether actors
are active.
|
private void |
refreshDescriptorPanel(AbstractTypeDescriptor[] something) |
void |
renameGraphInFrame(String filename)
Get purpose from the filename, so it works for a newly-opened graph too.
|
void |
requestToStop()
Sets the editFrameThread to null.
|
void |
resetSelection()
Set selection to be empty.
|
void |
run() |
Point2D.Double |
scaled(Point2D.Double p)
Convert a physical screen point into its logical scaled point in the
context.
|
void |
setEditFrameSizes()
Only bothers with the toolbar for now...
|
void |
setGraphPragmatics(PragmaticSense mode) |
void |
setMenuItems()
Tell the EditManager and OperManager to examine menus and gray out items
as needed
|
void |
setMyCursor()
Decide which cursor to show if we're positioned on something interesting.
|
void |
setMyFont(Font f)
Sets the font for the edit frame.
|
protected void |
setSelectedGraphObjects(Graph g,
Rectangle2D.Double r,
boolean select)
For all graph objects in a graph, mark each as selected if it lies within
the rect.
|
void |
setup()
Called by both constructors; for convenience.
|
private void |
setupCanvasScrollPane() |
void |
setupComponents() |
private void |
setupDescriptorPanel() |
private void |
setupMenus()
Adds menus to the menu bar.
|
void |
stopDragging(Point2D.Double dragStartPt,
Point2D.Double dragStopPt,
boolean shiftDown)
Do whatever gets done by dragging; performed when dragging has stopped.
|
String |
summarizeSelection() |
void |
takeFromSelection(GraphObject go)
If object is already selected, remove it from the selection.
|
void |
tearDown()
Break down the edit frame and set things to null.
|
void |
thisComponentResized(ComponentEvent e) |
void |
thisFocusGained(FocusEvent e) |
void |
thisFocusLost(FocusEvent e) |
void |
thisWindowActivated() |
void |
thisWindowClosing(WindowEvent e)
Handles close events on this frame.
|
void |
thisWindowDeactivated(WindowEvent e) |
void |
thisWindowOpened(WindowEvent e) |
boolean |
unMakeContext(ArrayList<GraphObject> selectedNodes,
Rectangle2D.Double border)
Takes a single context and un-makes its border, moving all its contents
out one graph level.
|
void |
windowMenuActionPerformed() |
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, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, 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, pack, 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, show, 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 EditToolbar editingToolbar
public JTextField messageBox
public JPanel messagePanel
public JPanel descriptorPanel
private JScrollPane dsp
private ComponentListener componentAdapter
private WindowAdapter windowAdapter
private FocusListener focusAdapter
public static int borderWidth
public static int defaultFrameWidth
public static int defaultFrameHeight
public static Dimension defaultFrameDim
public static int messageBoxHeight
public static Font messageBoxFont
public static Font borderFont
public static Color selectionRectColor
public Color LEDcolor
public Font currentFont
public FontMetrics currentFontMetrics
public JPanel changedMarker
public JMenuBar editFrameMenuBar
public JMenu fileMenu
public JMenu editMenu
public JMenu viewMenu
public JMenu examineMenu
public JMenu operateMenu
public JMenu changeFontItem
public JMenu changeColorMenu
public JMenu windowMenu
public JMenuItem BackToHubCmdItem
public JMenuItem UndoItem
public JMenuItem RedoItem
public JMenu testingItemsMenu
public JMenuItem ChangeTextItem
public JMenuItem ChangeFillItem
public JMenuItem ChangeColorDefaultItem
public JMenuItem ChangeColorFactoryItem
public JMenuItem ChangeColorBlackAndWhiteItem
public JMenuItem ChangeColorGrayscaleItem
public JMenuItem ZoomInItem
public JMenuItem ZoomOutItem
public JMenuItem ActualSizeItem
public JMenuItem CurrentSizeItem
public JMenuItem FindMenuItem
public JMenuItem FindAgainMenuItem
public JMenuItem ShowHistoryMenuItem
public JCheckBoxMenuItem ShowGlossMenuItem
public int editFrameNum
public String graphName
public PragmaticSense purpose
public File graphSourceFile
public File graphAbsoluteFile
public PageFormat pformat
public Graph TheGraph
public EditManager emgr
public OperManager omgr
public FormatToolbar formatToolbar
public boolean somethingHasChanged
public boolean contentHasChanged
public boolean somethingHasBeenSelected
public ArrayList<GraphObject> EFSelectedNodes
public ArrayList<GraphObject> EFSelectedObjects
public ThreadGroup threadgroup
public static int xoffsetForCopy
public static int yoffsetForCopy
public CanvasPanel cp
public JScrollPane sp
public Rectangle2D.Double selectionRect
private GraphObject cursorObject
public boolean showRubberBand
private boolean alreadyDragging
private GraphObject ObjectBeingDragged
public Point2D.Double dragStartPt
public Point2D.Double dragStopPt
public Point2D.Double dragCurrPt
public Point2D.Double lastMouseClickPoint
public boolean selectionIsBeingDragged
public boolean dotIsBeingDragged
public Color lineDragColor
public double canvasScaleFactor
Global.ScalingFactor
public static double scaleIncrement
scaleIndex
public int scaleIndex
scaleIncrement
public chargerlib.GenericTextFrame textFormDisplay
public chargerlib.GenericTextFrame CGIFDisplay
public chargerlib.GenericTextFrame XMLDisplay
public chargerlib.GenericTextFrame metricsDisplay
private boolean mShown
Thread editFrameThread
GraphObject currentObject
GNode currentNode
GEdge currentEdge
Graph currentGraph
public EditFrame()
public EditFrame(File graphFile, Graph g, boolean needsSaving)
graphFile
- file in which the graph to be edited is supposed to
resideg
- a graph to be displayed in the frame, if one already exists in
graph formneedsSaving
- whether the graph is to be marked as un-saved or not.Global
,
EditManager
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void setupComponents() throws Exception
Exception
public void attachGraphToFrame(String filename, Graph startingGraph, boolean needsSaving)
filename
- String to use in setting up the frame's title, etc.startingGraph
- A ready-to-use CharGer graphneedsSaving
- Whether the resulting window thinks the graph has
changed since savingpublic void run()
run
in interface Runnable
public void requestToStop()
public void thisWindowClosing(WindowEvent e)
public void thisWindowActivated()
public void thisWindowOpened(WindowEvent e)
public void thisWindowDeactivated(WindowEvent e)
public void setup()
public void tearDown()
private void setupCanvasScrollPane()
private void setupMenus()
public void windowMenuActionPerformed()
public void setMenuItems()
public void setEditFrameSizes()
public void refreshBorders()
public void thisFocusGained(FocusEvent e)
public void thisFocusLost(FocusEvent e)
private String identifyComponent(Component c)
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public void setGraphPragmatics(PragmaticSense mode)
public Point2D.Double scaled(Point2D.Double p)
p
- The actual point on the canvas ( relative to the canvas panel's
0,0 pointpublic Point2D.Double antiscaled(Point2D.Double p)
p
- The actual point on the canvas ( relative to the canvas panel's
0,0 pointpublic Rectangle2D.Double antiscaled(Rectangle2D.Double r)
r
- The actual rectangle on the canvas ( relative to the canvas
panel's 0,0 pointpublic void mousePressed(MouseEvent me)
mousePressed
in interface MouseListener
mouseReleased(java.awt.event.MouseEvent)
public void mouseReleased(MouseEvent me)
mouseReleased
in interface MouseListener
me
- mouseClicked(java.awt.event.MouseEvent)
,
stopDragging(java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Double, boolean)
public void mouseClicked(MouseEvent me)
mouseClicked
in interface MouseListener
mouseReleased(java.awt.event.MouseEvent)
,
mouseClicked(java.awt.event.MouseEvent)
public void doDoubleClick(MouseEvent me)
public void mouseEntered(MouseEvent me)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent me)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent me)
mouseDragged
in interface MouseMotionListener
mouseReleased(java.awt.event.MouseEvent)
public void stopDragging(Point2D.Double dragStartPt, Point2D.Double dragStopPt, boolean shiftDown)
dragStartPt
- the point at which the user started to dragdragStopPt
- the point at which the user stopped the draggingshiftDown
- whether the user is holding the shift key when the drag
stops.public void mouseMoved(MouseEvent me)
mouseMoved
in interface MouseMotionListener
me
- used for determining where the mouse is.public GraphObject onTopOfObject(Point2D.Double p)
p
- the point on the canvasinsideGNode(java.awt.geom.Point2D.Double)
public GraphObject onTopOfGNode(Point2D.Double p)
p
- the point on the canvasonTopOfObject(java.awt.geom.Point2D.Double)
,
insideGNode(java.awt.geom.Point2D.Double)
public GraphObject insideGNode(Point2D.Double p)
p
- the point on the canvasonTopOfObject(java.awt.geom.Point2D.Double)
,
onTopOfGNode(java.awt.geom.Point2D.Double)
public GraphObject insideGEdge(Point2D.Double p)
p
- the point on the canvasonTopOfObject(java.awt.geom.Point2D.Double)
,
insideGNode(java.awt.geom.Point2D.Double)
public void includeContextMembers()
public void includeContextMembers(Graph g)
protected void setSelectedGraphObjects(Graph g, Rectangle2D.Double r, boolean select)
g
- look through all objects in this graphr
- bounding rectangle within which to selectselect
- whether to select or de-select the objects in questionpublic void moveSelectedObjects(Graph g, Point2D.Double delta)
g
- outermost graph in which anything could be moved into or out ofdelta
- the translation displacementpublic void addToSelection(GraphObject go)
go
- Object to be marked as selected. If already selected, has no
effect.public void takeFromSelection(GraphObject go)
go
- Object to be removed if possible.public void resetSelection()
public String summarizeSelection()
public boolean getShowRubberBand()
public void fixToolbarDisplay()
public void makeContext(ArrayList selectedNodes, String what, Rectangle2D.Double border) throws CGContextException
selectedNodes
- Collection of the objects to be placed into the
contextwhat
- either "context" or "cut"border
- The minimum rectangle to form the context boundary; may be
expanded if necessary.CGContextException
public boolean unMakeContext(ArrayList<GraphObject> selectedNodes, Rectangle2D.Double border) throws CGContextException
selectedNodes
- Nodes to be un-made; must be a single context.border
- the enclosed area -- should contain exactly one context.CGContextException
public boolean entireGraphSelected(Graph g)
g
- The graph to be checkedpublic void setMyCursor()
public void setMyFont(Font f)
f
- font to which the edit frame should be set.public void clearStatus()
public void displayOneLiner(String s)
s
- String to be displayed.public boolean closeOut()
public boolean performCheckSaved()
public String getGraphName()
public void renameGraphInFrame(String filename)
filename
- fully qualified path/file for the new graphpublic void thisComponentResized(ComponentEvent e)
private void refreshDescriptorPanel(AbstractTypeDescriptor[] something)
private void setupDescriptorPanel()
public String getMenuItemLabel()
getMenuItemLabel
in interface chargerlib.ManagedWindow
ManagedWindow
public String getFilename()
getFilename
in interface chargerlib.ManagedWindow
public JMenu getWindowMenu()
getWindowMenu
in interface chargerlib.ManagedWindow