|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--quoggles.representation.DefaultBoxRepresentation
| Field Summary | |
protected IBox |
box
The IBox this class represents. |
protected javax.swing.JLabel |
classLabel
|
protected BoxRepresentation |
graphicalRep
|
protected javax.swing.JLabel |
inputLabel
|
protected java.lang.String |
INPUTLABEL
|
protected java.awt.geom.Point2D[] |
inputsPos
|
protected javax.swing.JLabel |
outputLabel
|
protected java.lang.String |
OUTPUTLABEL
|
protected java.awt.geom.Point2D[] |
outputsPos
|
protected org.graffiti.plugin.parameter.Parameter[] |
parameters
|
| Constructor Summary | |
DefaultBoxRepresentation(IBox representedBox)
This constructor resets graphicalRep, uses
getParameters() to get the parameters and finally calls
updateGraphicalRep(). |
|
| Method Summary | |
BoxRepresentation |
createStandardPanel(BoxRepresentation boxRep)
|
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 |
repaintBoxRep(java.awt.event.ActionEvent e)
Used to make the system repaint the box representation, for example after the number of inputs / outputs has changed. |
void |
setParameters(org.graffiti.plugin.parameter.Parameter[] params,
boolean fromBox)
According to the value of the second parameter tells the box about the change or not. |
BoxRepresentation |
standardizeBoxRep(BoxRepresentation panel,
javax.swing.JComponent boxContents)
Makes all boxes look similar: Adds input and output specifications, sets background color, sizes, etc. |
void |
updateGraphicalRep()
Default implementation; uses createStandardPanel(BoxRepresentation) |
void |
updateId()
Called when the ID changed (e.g. the box number). |
protected void |
updateInputOutput()
After a change in the parameters, the input / output type may have changed. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected final java.lang.String INPUTLABEL
protected final java.lang.String OUTPUTLABEL
protected IBox box
protected BoxRepresentation graphicalRep
protected org.graffiti.plugin.parameter.Parameter[] parameters
protected java.awt.geom.Point2D[] inputsPos
protected java.awt.geom.Point2D[] outputsPos
protected javax.swing.JLabel inputLabel
protected javax.swing.JLabel outputLabel
protected javax.swing.JLabel classLabel
| Constructor Detail |
public DefaultBoxRepresentation(IBox representedBox)
graphicalRep, uses
getParameters() to get the parameters and finally calls
updateGraphicalRep().
representedBox - | Method Detail |
public void updateGraphicalRep()
createStandardPanel(BoxRepresentation)
updateGraphicalRep in interface IBoxRepresentationIBoxRepresentation.updateGraphicalRep(),
createStandardPanel(BoxRepresentation)
public void setParameters(org.graffiti.plugin.parameter.Parameter[] params,
boolean fromBox)
updateInputOutput().
setParameters in interface IBoxRepresentationparams - fromBox - public final BoxRepresentation createStandardPanel(BoxRepresentation boxRep)
public final BoxRepresentation standardizeBoxRep(BoxRepresentation panel,
javax.swing.JComponent boxContents)
panel - BoxRepresentation that will be enriched with contentboxContents - the contents that will appear in the center of the
box
public void updateId()
IBoxRepresentation
updateId in interface IBoxRepresentationIBoxRepresentation.updateId()protected void updateInputOutput()
public BoxRepresentation getRepresentation()
IBoxRepresentation
getRepresentation in interface IBoxRepresentationIBoxRepresentation.getRepresentation()public IBox getIBox()
IBoxRepresentation
getIBox in interface IBoxRepresentationIBoxRepresentation.getIBox()public java.awt.geom.Point2D[] getRelOutputsPos()
IBoxRepresentation
getRelOutputsPos in interface IBoxRepresentationquoggles.representation.IBoxRepresentation#getOtherRelOutputPos()public java.awt.geom.Point2D[] getRelInputsPos()
IBoxRepresentation
getRelInputsPos in interface IBoxRepresentationquoggles.representation.IBoxRepresentation#getOtherRelInputPos()public final void repaintBoxRep(java.awt.event.ActionEvent e)
e - an event whose data is used to generate other events
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||