|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectEDU.auburn.VGJ.graph.Node
EDU.utwente.CoCompose.lang.AbstractConcept
EDU.utwente.CoCompose.lang.ConstrainedConcept
EDU.utwente.CoCompose.lang.Composite
The CoCompose design language primitive Composite.
Field Summary | |
protected static java.lang.String |
DefaultLabelPos
Default label position. |
protected static int |
DefaultShape
Default Composite shape (rectangle). |
Fields inherited from class EDU.utwente.CoCompose.lang.AbstractConcept |
changeListeners, DEFAULT_EDGE_COLOR, DEFAULT_FILL_COLOR, DEFAULT_FONT_COLOR, DEFAULT_SELECT_COLOR, defaultLabel_, FONT_SIZE, realm_ |
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 | |
Composite()
Constructs a Composite. |
Method Summary | |
void |
accept(ModelVisitor visitor)
Accepts a ModelVisitor. |
void |
addImplementation(ImplementationGenerator implementation)
Adds an implementation generator for this composite. |
void |
addPartConcept(CompositePartConcept concept)
Adds a CompositePartConcept to this Composite and saves position offset. |
void |
addSolution(SolutionPattern solution)
Adds a solution pattern for this composite. |
void |
checkCompleteness()
Checks the completeness of the composite using default rules and the specific CompletenessConstraint, if it exists. |
void |
copyAttributes(Composite fromComposite)
Copies attributes from fromComposite to self. |
void |
copyTypeAttributes(Composite fromComposite)
Copies attributes from fromComposite to self. |
void |
draw(java.awt.Component comp,
java.awt.Graphics graphics,
Matrix44 transform,
int quality)
Draws the Composite on a component. |
protected void |
drawIcon(java.awt.Graphics graphics,
int x,
int y,
double scale)
Draws the icon of the composite, if any. |
javax.swing.ImageIcon |
getIcon()
Gets the composite type icon. |
java.util.Enumeration |
getImplementations()
Gets the implementation generators for this composite. |
java.util.Enumeration |
getImplementations(java.lang.String language)
Gets the implementation generators for this composite given the language. |
CompositePartConcept |
getPartConcept(java.lang.String name)
Gets a CompositePartConcept in this composite by name. |
java.util.Enumeration |
getPartConcepts()
Gets an enumeration of all the CompositePartConcepts in this composite. |
PublishedConcept |
getPublishedConcept(java.lang.String name)
Gets a published concept in this composite by name. |
java.util.Enumeration |
getPublishedConcepts()
Gets an enumeration of all the published concepts in this composite. |
CompositeRole |
getRole(java.lang.String name)
Gets a role in this composite by name. |
java.util.Enumeration |
getRoles()
Gets an enumeration of all the roles in this composite. |
boolean |
getShowIconOnly()
Gets show icon only attribute. |
java.util.Enumeration |
getSolutions()
Gets the solution patterns for this composite. |
java.lang.String |
getType()
Gets type attribute. |
UniqueRealm |
getTypeUniqueRealm()
Gets the type uniqueness realm. |
boolean |
hasImplementations(java.lang.String language)
Checks if there are implementation generators for this composite in the given language. |
boolean |
hasPartConcept(CompositePartConcept concept)
Checks whether this composite has the given CompositePartConcept. |
boolean |
hasSolutions()
Checks whether this composite has solution patterns. |
java.lang.String |
imagePS()
Gets the Postscript representation for the type image. |
protected void |
implementationsToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the implementation generators using a SAX DefaultHandler. |
void |
insertImplementation(ImplementationGenerator implementation,
int index)
Inserts an implementation generator for this composite on a given index. |
void |
insertSolution(SolutionPattern solution,
int index)
Inserts a solution pattern for this composite on a given index. |
boolean |
isDependent()
Checks whether this composite depends on other composites through using their published concepts. |
boolean |
isUnique(java.lang.String value)
Checks whether the given value is unique within the realm. |
protected void |
publishedToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the published concepts using a SAX DefaultHandler. |
void |
register(java.lang.String value)
Registers a new value in the realm. |
void |
removeImplementation(ImplementationGenerator implementation)
Removes an implementation generator for this composite. |
void |
removePartConcept(CompositePartConcept concept)
Removes a CompositePartConcept from this Composite. |
void |
removeSolution(SolutionPattern solution)
Removes a solution pattern for this composite. |
void |
restoreOffsets()
Restores the offset coordinates from all roles relative to this composite. |
protected void |
rolesToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the composite roles using a SAX DefaultHandler. |
void |
saveOffsets()
Saves the offset coordinates from all roles and published concepts relative to this composite. |
void |
scale(double scalex,
double scaley,
double scalez)
Scales the size of the Composite. |
void |
setDefaults()
Sets the defaults for this composite. |
void |
setIcon(javax.swing.ImageIcon icon)
Sets the composite type icon. |
void |
setLabel()
Sets the label using the object attributes. |
void |
setSelected(boolean selected)
Sets this composite as selected or unselected. |
void |
setShowIconOnly(boolean showIconOnly)
Sets show icon only attribute. |
void |
setType(java.lang.String type_in)
Sets type attribute. |
void |
setTypeUniqueRealm(UniqueRealm realm)
Sets the type uniqueness realm. |
protected void |
solutionsToXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from the solution patterns 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 |
toPSimage(Matrix44 transform)
Create the PostScript invocation for the image. |
void |
toXML(org.xml.sax.helpers.DefaultHandler handler)
Create XML from this object using a SAX DefaultHandler. |
void |
unRegister(java.lang.String value)
Unregisters a value from the realm. |
void |
updateAttributes(Composite fromComposite)
Updates attributes from fromComposite to self. |
protected void |
updateLangImplTable()
Updates the language => implementations lookup table. |
Methods inherited from class EDU.utwente.CoCompose.lang.ConstrainedConcept |
checkConstraint, checkCorrectness, copyAttributes, getCompletenessConstraint, getCorrectnessConstraint, setCompletenessConstraint, setCorrectnessConstraint, updateAttributes |
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, searchNextChild, setBoundingBox, setBoundingBox, setBoundingBox, setBoundingBox, setChild, setContext, setDefaultLabel, setGMLvalues, setGroup, setImage, setImageSource, setImageType, setLabel, setLabelPosition, setShape, setTemp, setToolkit, toPSimage |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface EDU.utwente.CoCompose.util.UniqueRealm |
getName |
Field Detail |
protected static final int DefaultShape
protected static final java.lang.String DefaultLabelPos
Constructor Detail |
public Composite()
Method Detail |
protected void drawIcon(java.awt.Graphics graphics, int x, int y, double scale)
graphics
- The graphics context.x
- The transformed X coordinate.y
- The transformed Y coordinate.scale
- The drawing scale.protected void rolesToXML(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 publishedToXML(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 solutionsToXML(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 implementationsToXML(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
startXML
in class ConstrainedConcept
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 updateLangImplTable()
public void setDefaults()
setDefaults
in class AbstractConcept
public void setLabel()
setLabel
in class AbstractConcept
public void setTypeUniqueRealm(UniqueRealm realm)
realm
- The uniqueness realm for type identifiers.public UniqueRealm getTypeUniqueRealm()
public java.lang.String getType()
public void setType(java.lang.String type_in) throws CoComposeException
type_in
- The new type.
CoComposeException
- if the type is not a valid identifier.public void setIcon(javax.swing.ImageIcon icon)
icon
- the composite type icon.public javax.swing.ImageIcon getIcon()
public void setShowIconOnly(boolean showIconOnly)
showIconOnly
- Whether or not to show only the composite icon.public boolean getShowIconOnly()
public void addPartConcept(CompositePartConcept concept)
concept
- The CompositePartConcept to be added.public void removePartConcept(CompositePartConcept concept)
concept
- The CompositePartConcept to be removed.public java.util.Enumeration getPartConcepts()
public boolean hasPartConcept(CompositePartConcept concept)
concept
- The composite part concept to check for.
public CompositePartConcept getPartConcept(java.lang.String name)
name
- The CompositePartConcept name.
public CompositeRole getRole(java.lang.String name)
name
- The composite role name.
public java.util.Enumeration getRoles()
public java.util.Enumeration getPublishedConcepts()
public PublishedConcept getPublishedConcept(java.lang.String name)
name
- The published concept name.
public void setSelected(boolean selected)
setSelected
in class Node
selected
- When true, sets this composite as selected, otherwise
unselected.public void addSolution(SolutionPattern solution)
solution
- The solution pattern to add.public void insertSolution(SolutionPattern solution, int index)
solution
- The solution pattern to insert.index
- The index on which to insert the solution pattern.public void removeSolution(SolutionPattern solution)
solution
- The solution pattern to remove.public java.util.Enumeration getSolutions()
public boolean hasSolutions()
public void addImplementation(ImplementationGenerator implementation)
implementation
- The implementation generator to add.public void insertImplementation(ImplementationGenerator implementation, int index)
implementation
- The implementation generator to insert.index
- The index on which to insert the implementation generator.public void removeImplementation(ImplementationGenerator implementation)
implementation
- The implementation generator to remove.public java.util.Enumeration getImplementations()
public java.util.Enumeration getImplementations(java.lang.String language)
language
- The language in which the implementation generators should be
expressed.
public boolean hasImplementations(java.lang.String language)
language
- The language in which the implementation generators should
be expressed.
public void saveOffsets()
public void restoreOffsets()
public void copyAttributes(Composite fromComposite) throws CoComposeException
fromComposite
- The Composite to copy the attributes from.
CoComposeException
- if the copy could not be made.public void copyTypeAttributes(Composite fromComposite) throws CoComposeException
fromComposite
- The Composite to copy the attributes from.
CoComposeException
- if the copy could not be made.public void updateAttributes(Composite fromComposite) throws CoComposeException
fromComposite
- The Composite to copy the attributes from.
CoComposeException
- if the copy could not be made.public void scale(double scalex, double scaley, double scalez)
scale
in class Node
scalex
- The X axis scale multiplier.scaley
- The Y axis scale multiplier.scalez
- The Z axis scale multiplier.public void draw(java.awt.Component comp, java.awt.Graphics graphics, Matrix44 transform, int quality)
draw
in class AbstractConcept
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
toXML
in class AbstractConcept
handler
- The SAX DefaultHandler.
org.xml.sax.SAXException
- if an XML handler error occurs.public void checkCompleteness() throws CoComposeException
checkCompleteness
in class ConstrainedConcept
CoComposeException
- if the composite is not completely specified.public boolean isUnique(java.lang.String value)
isUnique
in interface UniqueRealm
value
- The value to check.
public void register(java.lang.String value)
register
in interface UniqueRealm
value
- The value to register.public void unRegister(java.lang.String value)
unRegister
in interface UniqueRealm
value
- The value to unregister.public java.lang.String imagePS()
public java.lang.String toPSimage(Matrix44 transform)
transform
- The coordinate transformation matrix.
public void accept(ModelVisitor visitor) throws CoComposeException
accept
in class ConstrainedConcept
visitor
- The visitor object to accept.
CoComposeException
- if visiting operation failed.public boolean isDependent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |