Class TerpPaintContainer

java.lang.Object
  extended by TerpPaintContainer
All Implemented Interfaces:
TerpOfficeAppInterface

public class TerpPaintContainer
extends java.lang.Object
implements TerpOfficeAppInterface

TerpPaintContainer is used to hold a TerpPaint class object. It also implements TerpOfficeAppInterface. There is no visible state for this class. It works with all operating systems and hardware. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.


Field Summary
 TerpPaint[] Instances
          A TerpPaint object array to hold multiple instances of TerpPaint.
(package private)  int maxSize
          Integer representing the Maximum size.
 TerpPaint newInstance
          This is the TerpPaint object which is used to store a TerpPaint object that is passed from the constructor.
 int size
          An integer that represents the number of instances in 'Instances'.
(package private)  boolean standalone
          This is a boolean which is used to store a boolean value which is passed from the constructor.
 
Constructor Summary
TerpPaintContainer(boolean alone)
          Constructor of the TerpPaintContainer.
 
Method Summary
 void Add()
          Adds a new window This method closes Terp Paint main program.
 boolean alive()
          The TerpPaint object, newInstance created in TerpPaintContainer class, calls the isDisplayable function from the TerpPaint class.
 void close()
          A TerpPaint object created in TerpPaintContainer class calls a dipose function from TerpPaint class.
 void launch(java.io.File file)
          This function launches the program and sets a new main canvase image to the newInstance object, which is from the TerpPaint class.
 void launchFixed(java.io.File file)
          This function launches the program and sets a new main canvase image to the newInstance object, which is from the TerpPaint class.
 void launchPrompt(java.io.File file)
          This function launches the program and sets a new main canvase image to the newInstance object, which is from the TerpPaint class.
 boolean Remove(TerpPaint removeMe)
          removes a TerpPaint object and returns true if there is only one left also if you remove the last one creates a new one and again returns true This method closes Terp Paint main program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newInstance

public TerpPaint newInstance
This is the TerpPaint object which is used to store a TerpPaint object that is passed from the constructor.


Instances

public TerpPaint[] Instances
A TerpPaint object array to hold multiple instances of TerpPaint.


maxSize

int maxSize
Integer representing the Maximum size.


size

public int size
An integer that represents the number of instances in 'Instances'.


standalone

boolean standalone
This is a boolean which is used to store a boolean value which is passed from the constructor.

Constructor Detail

TerpPaintContainer

public TerpPaintContainer(boolean alone)
Constructor of the TerpPaintContainer. It creates new TerpPaintContainer object to operate the program. It is called by main function in TerpPaint class to run the progam. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Parameters:
alone - Boolean value that indicates the program runs.
Method Detail

Add

public void Add()
Adds a new window This method closes Terp Paint main program. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.


Remove

public boolean Remove(TerpPaint removeMe)
removes a TerpPaint object and returns true if there is only one left also if you remove the last one creates a new one and again returns true This method closes Terp Paint main program. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Parameters:
removeMe - a TerpPaint instance to remove
Returns:
true if there is only one TerpPaint instance left false otherwise

close

public void close()
A TerpPaint object created in TerpPaintContainer class calls a dipose function from TerpPaint class. This method closes Terp Paint main program. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Specified by:
close in interface TerpOfficeAppInterface

launch

public void launch(java.io.File file)
This function launches the program and sets a new main canvase image to the newInstance object, which is from the TerpPaint class. It throws an exception if there is any. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Specified by:
launch in interface TerpOfficeAppInterface
Parameters:
file - FileInputStream object used to set the new main canvas image.

launchPrompt

public void launchPrompt(java.io.File file)
This function launches the program and sets a new main canvase image to the newInstance object, which is from the TerpPaint class. It throws an exception if there is any. This size is determined by prompting the user The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Parameters:
file - FileInputStream object used to set the new main canvas image.

launchFixed

public void launchFixed(java.io.File file)
This function launches the program and sets a new main canvase image to the newInstance object, which is from the TerpPaint class. It throws an exception if there is any. The size is determined by the specified size in preferences The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Parameters:
file - FileInputStream object used to set the new main canvas image.

alive

public boolean alive()
The TerpPaint object, newInstance created in TerpPaintContainer class, calls the isDisplayable function from the TerpPaint class. It returns a boolean value, which comes from the isDisplayable function. The OS is windows. There is no implementation variances. There is no security constaints. There is no external secification.

Specified by:
alive in interface TerpOfficeAppInterface
Returns:
True boolean value if it is displayable, otherwise false.