public class RodFigure extends CellFigure implements ILWRComponentVisitor
CellFigure
to provide a radial view of an
LWRComponent
. Currently, it supports LWRRod
s and Tube
s. It also provides both a geometric view of the component and a data-based
view for an associated IDataProvider
.Modifier and Type | Class and Description |
---|---|
static class |
RodFigure.DisplayType
This enum provides the two possible views for a RodFigure: geometry and
data.
|
Constructor and Description |
---|
RodFigure()
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addRingListener(RodAnalysisView listener)
Adds a RodAnalysisView as a listener for clicking on a Ring graphic.
|
org.eclipse.draw2d.IFigure |
getFigure()
Overrides the default behavior to make this the root figure.
|
void |
setAxialLevel(int axialLevel)
Set the axial level for the feature being shown.
|
void |
setColorScale(ColorScale colorScale)
Sets the
ColorScale currently used to determine the background
color of the RodFigure. |
void |
setComponent(LWRComponent component)
Sets the component displayed by this RodFigure.
|
void |
setComponent(LWRComponent component,
java.lang.Double maxRadius)
Sets the component displayed by this RodFigure.
|
void |
setDataProvider(IDataProvider dataProvider)
Sets the data provider for the data displayed by this RodFigure.
|
void |
setDisplayType(RodFigure.DisplayType displayType)
Set whether geometry or data is shown by this Figure.
|
void |
setFeature(java.lang.String feature)
Set the feature for the data being shown.
|
void |
setMaterialLevel(int materialLevel)
Sets the level for which the MaterialBlocks are displayed.
|
void |
setMaxRadius(double maxRadius)
Set the max radius for this Figure.
|
void |
setMaxValue(java.lang.Double customMaxValue)
Sets the custom maximum value for determining the background color of the
RodFigure.
|
void |
setMinValue(java.lang.Double customMinValue)
Sets the custom minimum value for determining the background color of the
RodFigure.
|
void |
setSelected(boolean selected)
Overrides the default behavior to apply the selected/unselected state to
all display types.
|
void |
setState(Cell.State state)
Overrides the default behavior to apply the current Cell state to all
display types.
|
void |
useCustomExtrema(boolean useCustomExtrema)
Sets whether or not this RodFigure uses custom min and max values to
determine the color of the data label.
|
void |
visit(BWReactor lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as a BWReactor.
|
void |
visit(ControlBank lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as a ControlBank.
|
void |
visit(FuelAssembly lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as a FuelAssembly.
|
void |
visit(IncoreInstrument lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as an IncoreInstrument.
|
void |
visit(LWRRod rod)
This function needs to draw a radial view of an LWR rod.
|
void |
visit(PressurizedWaterReactor lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as a PWReactor.
|
void |
visit(Ring lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as a Tube.
|
void |
visit(RodClusterAssembly lwrComp)
This operation directs a visitor to perform its actions on the
LWRComponent as a RodClusterAssembly.
|
void |
visit(Tube tube)
This function needs to draw a radial view of a tube.
|
addLabel
add, add, add, add, addAncestorListener, addCoordinateListener, addFigureListener, addFocusListener, addKeyListener, addLayoutListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, containsPoint, containsPoint, erase, findFigureAt, findFigureAt, findFigureAt, findFigureAtExcluding, findMouseEventTargetAt, getBackgroundColor, getBorder, getBounds, getChildren, getClientArea, getClientArea, getClippingStrategy, getCursor, getFont, getForegroundColor, getInsets, getLayoutManager, getLocalBackgroundColor, getLocalForegroundColor, getLocation, getMaximumSize, getMinimumSize, getMinimumSize, getParent, getPreferredSize, getPreferredSize, getSize, getToolTip, getUpdateManager, handleFocusGained, handleFocusLost, handleKeyPressed, handleKeyReleased, handleMouseDoubleClicked, handleMouseDragged, handleMouseEntered, handleMouseExited, handleMouseHover, handleMouseMoved, handleMousePressed, handleMouseReleased, hasFocus, internalGetEventDispatcher, intersects, invalidate, invalidateTree, isCoordinateSystem, isEnabled, isFocusTraversable, isMirrored, isOpaque, isRequestFocusEnabled, isShowing, isVisible, paint, remove, removeAll, removeAncestorListener, removeCoordinateListener, removeFigureListener, removeFocusListener, removeKeyListener, removeLayoutListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, revalidate, setBackgroundColor, setBorder, setBounds, setClippingStrategy, setConstraint, setCursor, setEnabled, setFocusTraversable, setFont, setForegroundColor, setLayoutManager, setLocation, setMaximumSize, setMinimumSize, setOpaque, setParent, setPreferredSize, setPreferredSize, setRequestFocusEnabled, setSize, setSize, setToolTip, setValid, setVisible, translate, translateFromParent, translateToAbsolute, translateToParent, translateToRelative, validate
public void setComponent(LWRComponent component)
component
- The new component.public void setComponent(LWRComponent component, java.lang.Double maxRadius)
component
- The new component.maxRadius
- The max radius. This influences the size of the pin that is
drawn.public void setDataProvider(IDataProvider dataProvider)
dataProvider
- The data provider for the new component. Can be null for
tubes.public void setDisplayType(RodFigure.DisplayType displayType)
displayType
- The new display type.public void setFeature(java.lang.String feature)
feature
- The new feature.public void setAxialLevel(int axialLevel)
axialLevel
- The new axial level.public void setMaterialLevel(int materialLevel)
materialLevel
- The index for the MaterialBlock to display.public void setMaxRadius(double maxRadius)
maxRadius
- The new maximum radius.public void useCustomExtrema(boolean useCustomExtrema)
useCustomExtrema
- Whether or not to use custom extrema for the background color
of the RodFigure.public void setMinValue(java.lang.Double customMinValue)
customMinValue
- The custom minimum value for computing background color.public void setMaxValue(java.lang.Double customMaxValue)
customMaxValue
- The custom maximum value for computing background color.public void setColorScale(ColorScale colorScale)
ColorScale
currently used to determine the background
color of the RodFigure. For handy preset scales, see
ColorScalePalette
.colorScale
- The new ColorScale to use for the RodFigure's background.public org.eclipse.draw2d.IFigure getFigure()
getFigure
in class CellFigure
public void setState(Cell.State state)
setState
in class CellFigure
state
- The State of the model Cell (unselected, selected, disabled,
or invalid).public void setSelected(boolean selected)
setSelected
in class CellFigure
selected
- Whether or not the CellFigure is selected.public void addRingListener(RodAnalysisView listener)
listener
- The RodAnalysisView that was to listen for Ring click events.public void visit(LWRRod rod)
visit
in interface ILWRComponentVisitor
rod
- The LWRRod that must accept this visitor
public void visit(Tube tube)
visit
in interface ILWRComponentVisitor
tube
- The Ring that must accept this visitor
public void visit(PressurizedWaterReactor lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as a PWReactor.
visit
in interface ILWRComponentVisitor
lwrComp
- The PWReactor that must accept this visitor
public void visit(BWReactor lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as a BWReactor.
visit
in interface ILWRComponentVisitor
lwrComp
- The BWReactor that must accept this visitor
public void visit(FuelAssembly lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as a FuelAssembly.
visit
in interface ILWRComponentVisitor
lwrComp
- The FuelAssembly that must accept this visitor
public void visit(RodClusterAssembly lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as a RodClusterAssembly.
visit
in interface ILWRComponentVisitor
lwrComp
- The RCA that must accept this visitor
public void visit(ControlBank lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as a ControlBank.
visit
in interface ILWRComponentVisitor
lwrComp
- The ControlBank that must accept this visitor
public void visit(IncoreInstrument lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as an IncoreInstrument.
visit
in interface ILWRComponentVisitor
lwrComp
- The IncoreInstrument that must accept this visitor
public void visit(Ring lwrComp)
ILWRComponentVisitor
This operation directs a visitor to perform its actions on the LWRComponent as a Tube.
visit
in interface ILWRComponentVisitor
lwrComp
- The Tube that must accept this visitor