|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--EDU.auburn.VGJ.graph.Node | +--EDU.utwente.CoCompose.lang.AbstractConcept
The abstract base class for CoCompose design language primitives.
Field Summary | |
protected java.util.Set |
changeListeners
Change listeners (observers). |
protected static java.awt.Color |
DEFAULT_EDGE_COLOR
Default edge/link color. |
protected static java.awt.Color |
DEFAULT_FILL_COLOR
Default shape filling color. |
protected static java.awt.Color |
DEFAULT_FONT_COLOR
Default font color. |
protected static java.awt.Color |
DEFAULT_SELECT_COLOR
Default selection rectangle color. |
protected java.lang.String |
defaultLabel_
The default label displayed in the model when no name is set. |
protected static java.lang.String |
DefaultLabelPos
Default label position. |
protected static int |
DefaultShape
Default shape (oval). |
static int |
FONT_SIZE
Font size (fixed). |
protected UniqueRealm |
realm_
The realm in which identifiers must be unique. |
Fields inherited from class EDU.auburn.VGJ.graph.Node |
BELOW, CENTER, data, data_, defaultDataTypes_, defaults, depth_, groupActive_, groupbox_, groupNode_, groupNodeId_, grouppos_, haveId_, height_, id_, IN, inActiveGroup_, index_, isDummy_, isGroup_, label_, oldbox_, oldpos_, OVAL, RECTANGLE, shapeNames, width_, x_, y_, z_ |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
AbstractConcept()
Constructs a Concept. |
Method Summary | |
void |
accept(ModelVisitor visitor)
Accepts a ModelVisitor. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener (observer) to the list of listeners. |
protected void |
alignToGrid(DPoint new_position)
Aligns new coordinates to the grid, if needed. |
protected void |
alignToGrid(DPoint3 new_position)
Aligns new coordinates to the grid, if needed. |
protected void |
commentsToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the comments attribute using a SAX DefaultHandler. |
void |
copyAttributes(AbstractConcept fromConcept)
Copies attributes from fromConcept to self. |
void |
draw(java.awt.Component comp,
java.awt.Graphics graphics,
Matrix44 transform,
int quality)
Draws the Concept on a component. |
protected void |
drawLabel(java.awt.Graphics graphics,
int x,
int y,
double h)
Draws the label of the concept. |
protected void |
drawSelected(java.awt.Graphics graphics,
DPoint3 position,
double scale)
Draws the selection artifacts of the concept. |
protected void |
drawShape(java.awt.Graphics graphics,
int x,
int y,
double w,
double h)
Draws the shape of the concept. |
protected void |
endXML(org.xml.sax.helpers.DefaultHandler handler,
java.lang.String element)
Create XML end from this object using a SAX DefaultHandler and element name. |
java.lang.String |
getComments()
Gets comments attribute. |
AbstractConcept |
getCopiedFrom()
Gets the AbstractConcept from which this one is copied, if any. |
java.awt.Color |
getDefaultFillColor()
Gets default fill color, depending on whether this concept is already part of a role concept or not. |
void |
getDrawBounds(java.awt.Graphics graphics,
Matrix44 transform,
DPoint width,
DPoint height)
Get the drawing bounds (including label). |
java.awt.Color |
getEdgeColor()
Gets the edge color for drawing. |
java.awt.Color |
getFillColor()
Gets the filling color for drawing. |
java.awt.Color |
getFontColor()
Gets the font color for drawing. |
AbstractConcept |
getInstantiatedBy()
When instantiated from a solution pattern role part, returns what concept instantiated the role part. |
Model |
getModel()
Gets the model this concept is part of. |
java.lang.String |
getName()
Gets name attribute. |
SolutionRole |
getPartOf()
Gets the solution role representing the role part this concept is part of. |
java.lang.String |
getPublicName()
Gets the public name attribute, which is the same as the name attribute. |
java.awt.Color |
getSelectColor()
Gets the selection artifact color for drawing. |
java.lang.String |
getSpecification()
Gets specification attribute. |
java.lang.String |
getSpecificationLang()
Gets specification language attribute. |
java.lang.String |
getTargetLanguage()
Gets target language to translate the concept to. |
UniqueRealm |
getUniqueRealm()
Gets the uniqueness realm. |
protected void |
gmlToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the GML data using a SAX DefaultHandler. |
protected void |
notifyListeners(java.beans.PropertyChangeEvent evt)
Notifies the PropertyChangeListeners of a PropertyChangeEvent. |
protected void |
notifyNameChange(java.lang.String oldName,
java.lang.String newName)
Notfies the PropertyChangeListeners of a name change. |
protected void |
notifyRemovedFromModel()
Notfies the PropertyChangeListeners that we are removed from this model. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener (observer) from the list of listeners. |
protected void |
scaleBounds(java.awt.Graphics graphics,
double scale)
Scale the bounds of a Concept if label is put inside. |
void |
setComments(java.lang.String comments_in)
Sets comments attribute. |
void |
setDefaults()
Sets the defaults for this concept. |
void |
setEdgeColor(java.awt.Color edgeColor)
Sets the edge color for drawing. |
void |
setFillColor(java.awt.Color fillColor)
Sets the filling color for drawing. |
void |
setFontColor(java.awt.Color fontColor)
Sets the font color for drawing. |
void |
setId(int id)
Sets Id and initial label as well. |
void |
setInstantiatedBy(AbstractConcept instantiatedBy)
Sets what concept instantiated the role part to which this belongs. |
void |
setLabel()
Sets the label using the object attributes. |
void |
setModel(Model model)
Sets the model this concept is part of. |
void |
setName(java.lang.String name_in)
Sets name attribute - sets label as well. |
void |
setPartOf(SolutionRole role)
Sets the solution role representing the role part this concept is part of. |
void |
setPosition(double new_x,
double new_y)
Sets a new position in the model. |
void |
setPosition(double new_x,
double new_y,
double new_z)
Sets a new position in the model. |
void |
setPosition(DPoint new_position)
Sets a new position in the model. |
void |
setPosition(DPoint3 new_position)
Sets a new position in the model. |
void |
setSelectColor(java.awt.Color selectColor)
Sets the selection artifact color for drawing. |
void |
setSpecification(java.lang.String specification_in)
Sets specification attribute. |
void |
setSpecificationLang(java.lang.String specificationLang_in)
Sets specification language attribute. |
void |
setUniqueRealm(UniqueRealm realm)
Sets the uniqueness realm. |
void |
slide(Matrix44 moveTransform,
Matrix44 viewTransform,
int xoffs,
int yoffs)
Moves to a new position in the model. |
protected void |
specToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the specification attribute using a SAX DefaultHandler. |
protected void |
startXML(org.xml.sax.helpers.DefaultHandler handler,
java.lang.String element,
org.xml.sax.helpers.AttributesImpl atts)
Create XML start from this object using a SAX DefaultHandler, element name and given attributes. |
java.lang.String |
toPS(Matrix44 transform)
Generate Postscript code for the node. |
java.lang.String |
toString()
|
void |
toXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from this object using a SAX DefaultHandler. |
void |
unRegister()
Unregisters all identifiers from the realm. |
Methods inherited from class EDU.auburn.VGJ.graph.Node |
clearChild, clone, copyAttributes, firstChild, getBoundingBox, getBoundingBox3, getChildren, getDefaultLabel, getDrawBounds_, getId, getIdObject, getImage, getImagePixels, getImageSource, getImageType, getIndex, getLabel, getLabelPosition, getPosition, getPosition3, getSelected, getShape, getTemp, getVisibleGroupRoot, groupActive, hasChild, hasChild, imagePS, imageUpdate, inGroup, intersectWithLineTo, isGroup, isVisible, nextChild, numberOfChildren, PSnum_, psString_, saveState, scale, searchNextChild, setBoundingBox, setBoundingBox, setBoundingBox, setBoundingBox, setChild, setContext, setDefaultLabel, setGMLvalues, setGroup, setImage, setImageSource, setImageType, setLabel, setLabelPosition, setSelected, setShape, setTemp, setToolkit, toPSimage |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.awt.Color DEFAULT_EDGE_COLOR
protected static final java.awt.Color DEFAULT_FONT_COLOR
protected static final java.awt.Color DEFAULT_SELECT_COLOR
protected static final java.awt.Color DEFAULT_FILL_COLOR
protected static final int DefaultShape
protected static final java.lang.String DefaultLabelPos
public static final int FONT_SIZE
protected UniqueRealm realm_
protected java.lang.String defaultLabel_
protected java.util.Set changeListeners
Constructor Detail |
public AbstractConcept()
Method Detail |
protected void gmlToXML(org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException
handler
- The SAX DefaultHandler.org.xml.sax.SAXException
- if an XML handler error occurs.protected void commentsToXML(org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException
handler
- The SAX DefaultHandler.org.xml.sax.SAXException
- if an XML handler error occurs.protected void specToXML(org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException
handler
- The SAX DefaultHandler.org.xml.sax.SAXException
- if an XML handler error occurs.protected void startXML(org.xml.sax.helpers.DefaultHandler handler, java.lang.String element, org.xml.sax.helpers.AttributesImpl atts) throws org.xml.sax.SAXException
handler
- The SAX DefaultHandler.element
- The XML element name.atts
- The XML element attributes.org.xml.sax.SAXException
- if an XML handler error occurs.protected void endXML(org.xml.sax.helpers.DefaultHandler handler, java.lang.String element) throws org.xml.sax.SAXException
handler
- The SAX DefaultHandler.element
- The XML element name.atts
- The XML element attributes.org.xml.sax.SAXException
- if an XML handler error occurs.protected void scaleBounds(java.awt.Graphics graphics, double scale)
graphics
- The graphics context.scale
- The drawing scale.protected void drawShape(java.awt.Graphics graphics, int x, int y, double w, double h)
graphics
- The graphics context.x
- The transformed X coordinate.y
- The transformed Y coordinate.w
- The width.h
- The height.protected void drawLabel(java.awt.Graphics graphics, int x, int y, double h)
graphics
- The graphics context.x
- The transformed X coordinate.y
- The transformed Y coordinate.h
- The height of the concept shape.protected void drawSelected(java.awt.Graphics graphics, DPoint3 position, double scale)
graphics
- The graphics context.position
- The transformed coordinates.scale
- The drawing scale.protected void alignToGrid(DPoint new_position)
new_position
- The new coordinates.protected void alignToGrid(DPoint3 new_position)
new_position
- The new coordinates.protected void notifyListeners(java.beans.PropertyChangeEvent evt)
evt
- The PropertyChangeEvent to send.protected void notifyNameChange(java.lang.String oldName, java.lang.String newName)
oldName
- The old name property value.newName
- The new name property value.protected void notifyRemovedFromModel()
public void setDefaults()
public void setPosition(double new_x, double new_y)
setPosition
in class Node
new_x
- The new X coordinate.new_y
- The new Y coordinate.public void setPosition(DPoint new_position)
setPosition
in class Node
new_position
- The new coordinates.public void setPosition(double new_x, double new_y, double new_z)
setPosition
in class Node
new_x
- The new X coordinate.new_y
- The new Y coordinate.new_z
- The new Z coordinate.public void setPosition(DPoint3 new_position)
setPosition
in class Node
new_position
- The new coordinates.public void slide(Matrix44 moveTransform, Matrix44 viewTransform, int xoffs, int yoffs)
slide
in class Node
moveTransform
- Move transformation matrix - see Node class.viewTransform
- View transformation matrix - see Node class.xoffs
- X offset - see Node class.yoffs
- Y offset - see Node class.public void setUniqueRealm(UniqueRealm realm)
realm
- The uniqueness realm for identifiers.public UniqueRealm getUniqueRealm()
public void setLabel()
public void setModel(Model model)
model
- The model this concept is part of.public Model getModel()
public java.awt.Color getDefaultFillColor()
public void setFillColor(java.awt.Color fillColor)
fillColor
- The color.public java.awt.Color getFillColor()
public void setEdgeColor(java.awt.Color edgeColor)
edgeColor
- The color.public java.awt.Color getEdgeColor()
public void setFontColor(java.awt.Color fontColor)
fontColor
- The color.public java.awt.Color getFontColor()
public void setSelectColor(java.awt.Color selectColor)
selectColor
- The color.public java.awt.Color getSelectColor()
public void setId(int id)
setId
in class Node
id
- Node identifier.public java.lang.String getName()
public java.lang.String getPublicName()
public void setName(java.lang.String name_in) throws CoComposeException
name_in
- The new name.CoComposeException
- if the name is not a valid unique identifier.public java.lang.String getComments()
public void setComments(java.lang.String comments_in)
comments_in
- The new comments.public java.lang.String getSpecification()
public void setSpecification(java.lang.String specification_in)
specification_in
- The new specification.public java.lang.String getSpecificationLang()
public void setSpecificationLang(java.lang.String specificationLang_in)
specificationLang_in
- The new specification language.public AbstractConcept getCopiedFrom()
public void setPartOf(SolutionRole role)
role
- The solution role this concept is part of.public SolutionRole getPartOf()
public void copyAttributes(AbstractConcept fromConcept)
fromConcept
- The Concept to copy the attributes from.public void draw(java.awt.Component comp, java.awt.Graphics graphics, Matrix44 transform, int quality)
draw
in class Node
comp
- The component to draw upon.graphics
- The graphics context.transform
- The coordinate transformation matrix.quality
- The drawing quality.public void toXML(org.xml.sax.helpers.DefaultHandler handler) throws org.xml.sax.SAXException
handler
- The SAX DefaultHandler.org.xml.sax.SAXException
- if an XML handler error occurs.public void unRegister()
public java.lang.String toPS(Matrix44 transform)
toPS
in class Node
transform
- The coordinate transformation matrix (3D -> 2D).public void getDrawBounds(java.awt.Graphics graphics, Matrix44 transform, DPoint width, DPoint height)
graphics
- The graphics context to measure for.transform
- The coordinate transformation matrix.width
- The variable to store the width.height
- The variable to store the height.public java.lang.String getTargetLanguage()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The PropertyChangeListener to add.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- The PropertyChangeListener to remove.public void accept(ModelVisitor visitor) throws CoComposeException
visitor
- The visitor object to accept.CoComposeException
- if visiting operation failed.public AbstractConcept getInstantiatedBy()
public void setInstantiatedBy(AbstractConcept instantiatedBy)
instantiatedBy
- The concept that instantiated this.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |