Class JmtClipboard

java.lang.Object
jsimgraph.controller.JmtClipboard

public class JmtClipboard extends Object

Title: Jmt Clipboard

Description: This class provides clipboard facility to copy and paste selected sections of current model. It will operate both on data structure (JmodelStationDefinition) end and on graphic representation (Jgraph through mediator calls).

Author:
Bertoli Marco Date: 21-giu-2005 Time: 11.49.57
  • Field Details

  • Constructor Details

    • JmtClipboard

      public JmtClipboard(Mediator mediator)
      Initializes a new JmtClipboard with the given mediator.
      Parameters:
      mediator - mediator to be referenced
  • Method Details

    • flush

      public void flush()
      Flushes the clipboard.
    • cut

      public void cut(Object[] cells)
      Copies the given elements into clipboard and deletes them from graph.
    • copy

      public void copy(Object[] cells)
      Copies the given elements into clipboard.
    • paste

      public void paste()
      Pastes previously copied elements into graph at the original point.
    • paste

      public Object[] paste(Point2D where)
      Pastes previously copied elements into graph at the given point.
      Parameters:
      where - point where pasted elements will be put.
      Returns:
      array of pasted elements.
    • copyCell

      public void copyCell(JmtCell cell)
      Copies the given station into clipboard.
    • pasteCell

      public JmtCell pasteCell(Point2D where)
      Pastes a previously copied station into graph at the given point.
      Parameters:
      where - point where the pasted station will be put.
      Returns:
      pasted station.