quoggles.stdboxes.input
Class Input_Box

java.lang.Object
  |
  +--quoggles.boxes.Box
        |
        +--quoggles.stdboxes.input.Input_Box
All Implemented Interfaces:
IBox

public class Input_Box
extends Box

( Input: set by the system; depends on the name of the box )

Output: same as input

Input box without incoming edges. Those boxes are displayed to the left and they get their input by the system.


Nested Class Summary
 class Input_Box.InputBox_Rep
          Graphical representation of an input box.
 class Input_Box.InputBoxRepresentation
          Representation of an input box
 
Field Summary
private  java.lang.String boxName
          Name of the box; indicates the type of its input
 
Fields inherited from class quoggles.boxes.Box
boxExecuted, iBoxGRep, inputs, outputs, parameters
 
Constructor Summary
Input_Box(java.lang.String text)
          Construct the input box.
 
Method Summary
 void execute()
          Overridden to prevent InputNotSetException.
 java.lang.String getBoxName()
          Returns the text string given to the constructor.
 IBoxRepresentation getGraphicalRepresentation()
          This implementation returns a new instance of DefaultBoxRepresentation.
 int[] getInputTypes()
          This implementation returns ONE element, the most general type.
 int getNumberOfInputs()
          Returns zero.
 java.lang.Object[] getOutputs()
          Overridden to prevent InputNotSetException.
 void setInputBoxInput(java.lang.Object input)
          Special set input method for InputBox.
 
Methods inherited from class quoggles.boxes.Box
areAllInputsNull, getClassName, getId, getNode, getNumberOfOutputs, getOutputAt, getOutputTypes, getParameters, hasBeenExecuted, ignoreBox, isGraphicalRepNull, isInputSet, isInputSetAt, needsQueryRunner, removeNullValues, reset, reset, setBoxNumber, setCurrentNodesTodo, setCurrentResult, setDefaultParameters, setIgnoreBox, setInputAt, setInputs, setNode, setParameters, setQueryRunner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boxName

private java.lang.String boxName
Name of the box; indicates the type of its input

Constructor Detail

Input_Box

public Input_Box(java.lang.String text)
Construct the input box.

Parameters:
text - name of the box specifying the type of the input
Method Detail

getBoxName

public java.lang.String getBoxName()
Returns the text string given to the constructor.

Returns:
name of the box

getGraphicalRepresentation

public IBoxRepresentation getGraphicalRepresentation()
Description copied from class: Box
This implementation returns a new instance of DefaultBoxRepresentation. If your subclass has any parameters, you will probably have to design your own representation and override this method for example as follows: if (iBoxGRep == null || !(iBoxGRep instanceof MYOWNBOX_Rep)) { iBoxGRep = new MYOWNBOX_Rep(this); } return iBoxGRep;

Specified by:
getGraphicalRepresentation in interface IBox
Overrides:
getGraphicalRepresentation in class Box
See Also:
IBox.getGraphicalRepresentation()

getNumberOfInputs

public int getNumberOfInputs()
Returns zero.

Specified by:
getNumberOfInputs in interface IBox
Overrides:
getNumberOfInputs in class Box
See Also:
IBox.getNumberOfInputs()

setInputBoxInput

public void setInputBoxInput(java.lang.Object input)
Special set input method for InputBox. Using the standard one would make the system throw an InvalidInputException since an InputBox's getNumberOfInputs method returns 0.

Parameters:
input -

execute

public void execute()
             throws QueryExecutionException
Overridden to prevent InputNotSetException.

Specified by:
execute in interface IBox
Overrides:
execute in class Box
QueryExecutionException
See Also:
IBox.execute()

getOutputs

public java.lang.Object[] getOutputs()
                              throws BoxNotExecutedException
Overridden to prevent InputNotSetException.

Specified by:
getOutputs in interface IBox
Overrides:
getOutputs in class Box
BoxNotExecutedException
See Also:
IBox.getOutputs()

getInputTypes

public int[] getInputTypes()
Description copied from class: Box
This implementation returns ONE element, the most general type. Override this method to specify more restricted types for the input(s) of the box. The size of the returned array must be consistent with the return value of getNumberOfInputs.

Specified by:
getInputTypes in interface IBox
Overrides:
getInputTypes in class Box
See Also:
IBox.getInputTypes()