|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimtools.shapes.AbstractShape
jsynoptic.builtin.Abstract1DShape
jsynoptic.builtin.ConnectionShape
public class ConnectionShape
Connection Shape
Nested Class Summary | |
---|---|
static class |
ConnectionShape.ConnectionShapePropertiesNames
|
class |
ConnectionShape.SelectedConnectionShape
|
Nested classes/interfaces inherited from class jsynoptic.builtin.Abstract1DShape |
---|
Abstract1DShape.Abstract1DShapePropertiesNames |
Nested classes/interfaces inherited from class simtools.shapes.AbstractShape |
---|
AbstractShape.AbstractShapePropertiesNames |
Field Summary | |
---|---|
protected double[] |
_xv
x vertices |
protected double[] |
_yv
y vertices |
protected boolean |
displayFirstNarrow
Deprecated. |
protected boolean |
displayLastNarrow
Deprecated. |
protected java.awt.geom.AffineTransform |
firstArrowTransform
First arrow transfrom used to draw the arrow polygon |
protected java.awt.geom.AffineTransform |
lastArrowTransform
Last arrow transfrom used to draw the arrow polygon |
Fields inherited from class jsynoptic.builtin.Abstract1DShape |
---|
allowResize, bounds2D, delegateEndNotificationListener, dirty, dirtyDrawColor, dirtyRectangle, drawColor, drawDynamicColor, drawMapper, drawMapperIndex, drawMapperSource, fixedRatio, link, MIN_SIZE, ratio, resources, stroke, strokeParams, transform |
Fields inherited from class simtools.shapes.AbstractShape |
---|
_h, _ox, _oy, _propertyNames, _w, _x, _y, ANTI_ALIASING, currentDialogBox, FONT_NAMES, listeners, REFRESH_PERIOD |
Fields inherited from interface jsynoptic.base.ContextualActionProvider |
---|
EDITOR_CONTEXT, MOUSE_OUT_CONTEXT, MOUSE_OVER_CONTEXT, MOUSE_PRESSED_CONTEXT, SHAPELIST_CONTEXT, SOURCELIST_CONTEXT |
Constructor Summary | |
---|---|
ConnectionShape(double[] xs,
double[] ys)
|
|
ConnectionShape(int x,
int y,
int w,
int h)
Constructs a new Link instance |
Method Summary | |
---|---|
protected AbstractShape |
cloneShape()
Performs a copy of the shape This method has to be overriden to deal with concrete shapes |
boolean |
contains(double x,
double y)
|
JPropertiesPanel |
createPanel()
|
DiagramSelectedShape |
createSelectedShape(int ox,
int oy)
If the shape contains point at coordinates ox,oy then return a DiagramSelectedShape to manage the selection of this shape |
DiagramSelectedShape |
createSelectedShape(java.awt.Point point)
Return the DiagramSelectedShape to manage the selection of this shape |
DiagramSelectedShape |
createSelectedShape(java.awt.geom.Rectangle2D bounds2D)
If the shape is contained in the bounds then return a DiagramSelectedShape to manage the selection of this shape |
void |
draw(java.awt.Graphics2D g)
Draws the shape |
protected java.awt.Shape |
getDelegateShape()
|
java.lang.String[] |
getPropertyNames()
Get the list of property names |
java.lang.Object |
getPropertyValue(java.lang.String name)
Get the value of the property named name |
int |
getX(int index)
Get point coordinates |
int |
getY(int index)
Get point coordinates |
boolean |
intersects(double x,
double y,
double w,
double h)
|
int |
intersects(int ox,
int oy,
int fx,
int fy)
return the first segment number wich intersects with the provided rectangle or -1 if none |
int |
pointsNumber()
|
void |
resize(int dx,
int dy)
Resize the component |
protected void |
setBounds()
|
void |
setPropertyValue(java.lang.String name,
java.lang.Object value)
Assigns value to the property named name |
void |
translate(int x,
int y)
Translates the shape |
void |
translatePoint(int index,
int dx,
int dy)
Translate a point |
Methods inherited from class simtools.shapes.AbstractShape |
---|
addListener, getAnchor, getInnerProperties, getMax, getMaxTranslated, getMin, notifyChange, notifyChange, refresh, removeListener, setAnchor, setProperties, wipeOff |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double[] _xv
protected double[] _yv
protected boolean displayLastNarrow
protected boolean displayFirstNarrow
protected java.awt.geom.AffineTransform firstArrowTransform
protected java.awt.geom.AffineTransform lastArrowTransform
Constructor Detail |
---|
public ConnectionShape(int x, int y, int w, int h)
public ConnectionShape(double[] xs, double[] ys)
Method Detail |
---|
protected AbstractShape cloneShape()
Abstract1DShape
cloneShape
in class Abstract1DShape
public JPropertiesPanel createPanel()
createPanel
in class Abstract1DShape
public java.lang.Object getPropertyValue(java.lang.String name)
AbstractShape
name
getPropertyValue
in interface NamedProperties
getPropertyValue
in class Abstract1DShape
name
- the name of the property to get
AbstractShape.getPropertyValue(String)
public void setPropertyValue(java.lang.String name, java.lang.Object value)
AbstractShape
value
to the property named name
setPropertyValue
in interface NamedProperties
setPropertyValue
in class Abstract1DShape
name
- the name of the property to getvalue
- its new valueAbstractShape.setPropertyValue(String, Object)
public void translate(int x, int y)
AbstractShape
translate
in class Abstract1DShape
public void resize(int dx, int dy)
Resizable
resize
in interface Resizable
resize
in class Abstract1DShape
dx
- value on x axisdy
- value on y axisprotected void setBounds()
public int intersects(int ox, int oy, int fx, int fy)
public boolean contains(double x, double y)
contains
in interface java.awt.Shape
contains
in class Abstract1DShape
public boolean intersects(double x, double y, double w, double h)
intersects
in interface java.awt.Shape
intersects
in class Abstract1DShape
public void draw(java.awt.Graphics2D g)
AbstractShape
draw
in class Abstract1DShape
g
- the graphics contextpublic int pointsNumber()
pointsNumber
in interface LineShapeInterface
public int getX(int index)
LineShapeInterface
getX
in interface LineShapeInterface
index
- the index of the point between 0 and pointsNumber
public int getY(int index)
LineShapeInterface
getY
in interface LineShapeInterface
index
- the index of the point between 0 and pointsNumber
public void translatePoint(int index, int dx, int dy)
LineShapeInterface
translatePoint
in interface LineShapeInterface
index
- the index of the point between 0 and pointsNumberdx
- the x value for the translationdy
- the y value for the translationprotected java.awt.Shape getDelegateShape()
getDelegateShape
in class Abstract1DShape
public DiagramSelectedShape createSelectedShape(int ox, int oy)
SelectableShapeInterface
createSelectedShape
in interface SelectableShapeInterface
ox
- x coordinateoy
- y coordinate
public DiagramSelectedShape createSelectedShape(java.awt.geom.Rectangle2D bounds2D)
SelectableShapeInterface
createSelectedShape
in interface SelectableShapeInterface
bounds2D
- the bounds
public DiagramSelectedShape createSelectedShape(java.awt.Point point)
SelectableShapeInterface
createSelectedShape
in interface SelectableShapeInterface
point
- the selection origin
public java.lang.String[] getPropertyNames()
NamedProperties
getPropertyNames
in interface NamedProperties
getPropertyNames
in class Abstract1DShape
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |