y.view.hierarchy
Class Graph2DHierarchyClipboard

java.lang.Object
  extended by y.view.Graph2DClipboard
      extended by y.view.hierarchy.Graph2DHierarchyClipboard

public class Graph2DHierarchyClipboard
extends Graph2DClipboard

Provides clipboard functionality for diagrams that are hierarchically organized by a HierarchyManager instance.

 

Field Summary
 
Fields inherited from class y.view.Graph2DClipboard
propertyChangeSupport
 
Constructor Summary
Graph2DHierarchyClipboard(ViewContainer view)
          Creates a new clipboard for the graphs managed by the given view container.
 
Method Summary
 void copyToClipBoard(Graph graph, NodeCursor selection)
          Copies parts the given graph to the clipboard.
 boolean isEmpty()
          Returns whether or not the clipboard is currently empty.
 NodeList pasteFromClipBoard(Graph graph)
          Pastes the elements of the clipboard graph to the given graph.
 NodeList pasteFromClipBoard(Graph graph, double x, double y)
          Pastes the elements of the clipboard graph to the given graph.
 
Methods inherited from class y.view.Graph2DClipboard
addPropertyChangeListener, copyGraph, getClipboardGraph, getCopyAction, getCutAction, getGraph2D, getGraphFactory, getPasteAction, getViewContainer, isSelectionEmpty, isSelectionStateObserverEnabled, removePropertyChangeListener, setGraphFactory, setSelectionStateObserverEnabled, updateSelectionState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Graph2DHierarchyClipboard

public Graph2DHierarchyClipboard(ViewContainer view)
Creates a new clipboard for the graphs managed by the given view container.

Method Detail

isEmpty

public boolean isEmpty()
Description copied from class: Graph2DClipboard
Returns whether or not the clipboard is currently empty. A PropertyChangeEvent will be fired whenever this state changes.

Overrides:
isEmpty in class Graph2DClipboard

copyToClipBoard

public void copyToClipBoard(Graph graph,
                            NodeCursor selection)
Description copied from class: Graph2DClipboard
Copies parts the given graph to the clipboard. The copied subgraph is induced by the nodes accessible via the given NodeCursor.

Overrides:
copyToClipBoard in class Graph2DClipboard

pasteFromClipBoard

public NodeList pasteFromClipBoard(Graph graph,
                                   double x,
                                   double y)
Description copied from class: Graph2DClipboard
Pastes the elements of the clipboard graph to the given graph. The clipboard graph will be pasted in a way that the upper left corner of its bounding box matches the given location.

Overrides:
pasteFromClipBoard in class Graph2DClipboard
Parameters:
graph - the graph pasted to.
x - the x-coordinate of the paste location
y - the y-coordinate of the paste location

pasteFromClipBoard

public NodeList pasteFromClipBoard(Graph graph)
Description copied from class: Graph2DClipboard
Pastes the elements of the clipboard graph to the given graph.

Overrides:
pasteFromClipBoard in class Graph2DClipboard
Parameters:
graph - the graph pasted to.

© Copyright 2000-2008,
yWorks GmbH.
All rights reserved.