Class ProjectDataItem

java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.interfaces.projects.ProjectDataItem
All Implemented Interfaces:
java.lang.Cloneable, AttributeListener, InterfaceObject, NamedObject, TreeObject, CleanableObject, IconObject

public class ProjectDataItem
extends AbstractInterfaceObject
implements AttributeListener, IconObject, java.lang.Cloneable
Specifies a data item in a modelGUI project, including its name, its I/O classes, and its filename form (a pattern identifying the location or URL of the item).

TODO: Also specify options for the item

Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Details

    • ProjectDataItem

      public ProjectDataItem​(java.lang.String name, java.lang.String filename_form)
  • Method Details

    • init

      protected void init()
    • getObjectIcon

      public javax.swing.Icon getObjectIcon()
      Description copied from interface: IconObject
      Returns the Icon associated with this object.
      Specified by:
      getObjectIcon in interface IconObject
      Returns:
    • getFilenameForInstance

      public java.lang.String getFilenameForInstance​(java.lang.String instance)
      Constructs a filename from the given parameters and the file name form.
      Parameters:
      instance - Instance ID, or null
      Returns:
    • getFilenameForInstance

      public java.lang.String getFilenameForInstance​(java.lang.String instance, java.lang.Integer series)
      Constructs a filename from the given parameters and the file name form.
      Parameters:
      instance - Instance ID, or null
      series - Series number, or null if none
      Returns:
    • getSeriesReplaced

      protected java.lang.String getSeriesReplaced​(java.lang.String filename, int series)
    • setName

      public void setName​(java.lang.String name)
      Description copied from interface: NamedObject
      Sets the name for this object.
      Specified by:
      setName in interface NamedObject
      Overrides:
      setName in class AbstractInterfaceObject
    • getName

      public java.lang.String getName()
      Description copied from interface: NamedObject
      Gets the name for this object.
      Specified by:
      getName in interface NamedObject
      Overrides:
      getName in class AbstractInterfaceObject
      Returns:
    • setFileLoader

      public void setFileLoader​(FileLoader loader)
    • getLoaderIOType

      public InterfaceIOType getLoaderIOType()
    • getFileLoader

      public FileLoader getFileLoader()
    • getWriterIOType

      public InterfaceIOType getWriterIOType()
    • setFileWriter

      public void setFileWriter​(FileWriter writer)
    • getFileWriter

      public FileWriter getFileWriter()
    • setFilenameForm

      public void setFilenameForm​(java.lang.String form)
    • getFilenameForm

      public java.lang.String getFilenameForm()
    • attributeUpdated

      public void attributeUpdated​(AttributeEvent e)
      Description copied from interface: AttributeListener
      Called when an Attribute's value has been updated.
      Specified by:
      attributeUpdated in interface AttributeListener
    • getTreeLabel

      public java.lang.String getTreeLabel()
      Description copied from interface: TreeObject
      Returns the label text to appear in a tree node.
      Specified by:
      getTreeLabel in interface TreeObject
      Overrides:
      getTreeLabel in class AbstractInterfaceObject
      Returns:
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode node)
      Description copied from interface: TreeObject
      Sets the children for this node's InterfaceTreeNode.
      Specified by:
      setTreeNode in interface TreeObject
      Overrides:
      setTreeNode in class AbstractInterfaceObject
    • clone

      public java.lang.Object clone()
      Overrides:
      clone in class java.lang.Object