quoggles.stdboxes.input
Class Input_Box.InputBoxRepresentation

java.lang.Object
  |
  +--quoggles.stdboxes.input.Input_Box.InputBoxRepresentation
All Implemented Interfaces:
IBoxRepresentation
Enclosing class:
Input_Box

public class Input_Box.InputBoxRepresentation
extends java.lang.Object
implements IBoxRepresentation

Representation of an input box


Field Summary
private  java.lang.String boxName
           
private  BoxRepresentation boxRep
           
private  IBox iBox
           
private  java.awt.geom.Point2D outputPos
           
 
Constructor Summary
Input_Box.InputBoxRepresentation(IBox box, java.lang.String name)
          Constructor of InputBoxRepresentation.
 
Method Summary
 IBox getIBox()
          Returns the IBox it represents.
 java.awt.geom.Point2D[] getRelInputsPos()
          Relative position of inputs, measured from top left corner, values between 0 and 1.
 java.awt.geom.Point2D[] getRelOutputsPos()
          Relative position of outputs, measured from top left corner, values between 0 and 1.
 BoxRepresentation getRepresentation()
          Gets a representation that can be added to the visual system.
 void setParameters(org.graffiti.plugin.parameter.Parameter[] params, boolean fromBox)
          Empty method.
 void updateGraphicalRep()
          Called whenever something (parameters, number of IO, ...) changed that requires a change in the looks of the box's graphicsal representation.
 void updateId()
          Empty (no ID displayed).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

boxRep

private BoxRepresentation boxRep

iBox

private IBox iBox

outputPos

private java.awt.geom.Point2D outputPos

boxName

private java.lang.String boxName
Constructor Detail

Input_Box.InputBoxRepresentation

public Input_Box.InputBoxRepresentation(IBox box,
                                        java.lang.String name)
Constructor of InputBoxRepresentation.

Parameters:
box -
name - name of the box. Used to decide what input it needs. Use constants from IBoxConstants here.
Method Detail

updateGraphicalRep

public void updateGraphicalRep()
Description copied from interface: IBoxRepresentation
Called whenever something (parameters, number of IO, ...) changed that requires a change in the looks of the box's graphicsal representation.

Also useful to be called in the constructor of an IBoxRepresentation.

Implementation node:

Don't assign to the graphicalRep field. Just add components to it and adjust its size.

Specified by:
updateGraphicalRep in interface IBoxRepresentation
See Also:
IBoxRepresentation.updateGraphicalRep()

getRepresentation

public BoxRepresentation getRepresentation()
Description copied from interface: IBoxRepresentation
Gets a representation that can be added to the visual system.

Specified by:
getRepresentation in interface IBoxRepresentation
See Also:
IBoxRepresentation.getRepresentation()

setParameters

public void setParameters(org.graffiti.plugin.parameter.Parameter[] params,
                          boolean fromBox)
Empty method.

Specified by:
setParameters in interface IBoxRepresentation
Parameters:
params -
fromBox -
See Also:
setParameters(quoggles.parameters.Parameter[], boolean)

getIBox

public IBox getIBox()
Description copied from interface: IBoxRepresentation
Returns the IBox it represents.

Specified by:
getIBox in interface IBoxRepresentation
Returns:
See Also:
IBoxRepresentation.getIBox()

getRelOutputsPos

public java.awt.geom.Point2D[] getRelOutputsPos()
Description copied from interface: IBoxRepresentation
Relative position of outputs, measured from top left corner, values between 0 and 1. Only used if the box has several outputs.

Specified by:
getRelOutputsPos in interface IBoxRepresentation
See Also:
getOtherRelOutputPos()

getRelInputsPos

public java.awt.geom.Point2D[] getRelInputsPos()
Description copied from interface: IBoxRepresentation
Relative position of inputs, measured from top left corner, values between 0 and 1. Only used if the box has several inputs.

Specified by:
getRelInputsPos in interface IBoxRepresentation
See Also:
getOtherRelInputPos()

updateId

public void updateId()
Empty (no ID displayed).

Specified by:
updateId in interface IBoxRepresentation
See Also:
IBoxRepresentation.updateId()