Your SlideShare is downloading. ×
0
GraphitiThe Graphical Tooling Infrastructure Speaking Plain Java<br />Michael Wenz<br />SAP AG<br />03/23/2010<br />Graphi...
What Is Graphiti All About ?<br />“The goal of Graphiti is to support the fast and easy creation of unified graphical tool...
What Is Graphiti All About ?<br />“The goal of Graphiti is to support the fast and easy creation of unified graphical tool...
Why Should I Want to Use Graphiti ?<br />
How Does Graphiti Work ?<br />
What about the Diagram Type Agent ?<br />Diagram Type Agent<br />Feature Provider<br />Diagram Type Provider<br />A featur...
Domain<br />Hierarchie<br />Pictogram Elements<br />Links<br />Visualization<br />Graphics Algorithms<br />EClass<br />Con...
Well Then - How Do I Build a Tool ?<br />
Well Then - How Do I Build a Tool ?<br />
packageorg.eclipse.graphiti.tutorial;<br /> <br />importorg.eclipse.graphiti.dt.AbstractDiagramTypeProvider;<br /> <br />p...
Well Then - How Do I Build a Tool ?<br />
Well Then - How Do I Build a Tool ?<br />…<br /><extension point="org.eclipse.graphiti.eclipse.diagramTypes"><br /><diagra...
Well Then - How Do I Build a Tool ?<br />
Well Then - How Do I Build a Tool ?<br />packageorg.eclipse.graphiti.tutorial;<br />…<br />publicclassTutorialFeatureProvi...
Well Then - How Do I Build a Tool ?<br />
Well Then - How Do I Build a Tool ?<br />…<br />publicclassTutorialAddEClassFeatureextendsAbstractAddShapeFeature {<br /> ...
Well Then - How Do I Build a Tool ?<br />publicPictogramElement add(IAddContext context) {<br />EClassaddedClass = (EClass...
Well Then - How Do I Build a Tool ?<br />publicclassTutorialFeatureProviderextendsDefaultFeatureProvider {<br />…<br />@Ov...
Graphiti – What else to Mention ?<br />
Short Talk on Graphiti at EclipseCon 2010
Upcoming SlideShare
Loading in...5
×

Short Talk on Graphiti at EclipseCon 2010

6,161

Published on

This is the slide deck used for the shorttalk on Graphiti at EclipseCon 2010 in Santa Clara

Published in: Technology
3 Comments
3 Likes
Statistics
Notes
  • Hello Michael,

    I followed the presentation, followed th tutorial in eclipse and everything seems to work fine. But I am feeling that it would be better for me to have a more deeper look into each of the terms you mentioned in here like the interaction component, the Pictogram model, the link model etc.

    Could you please help me out finding some information on these ?

    Thanks
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • I allowed the download of the slideshow. Is that ok or would you like to have the pptx file?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • can i have the slide of this material?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
6,161
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
179
Comments
3
Likes
3
Embeds 0
No embeds

No notes for slide

Transcript of "Short Talk on Graphiti at EclipseCon 2010"

  1. 1. GraphitiThe Graphical Tooling Infrastructure Speaking Plain Java<br />Michael Wenz<br />SAP AG<br />03/23/2010<br />Graphiti are:<br />Christian Brand<br />Jürgen Pasch<br /> Matthias Gorning<br /> Michael Wenz<br /> Tim Kaiser<br />
  2. 2. What Is Graphiti All About ?<br />“The goal of Graphiti is to support the fast and easy creation of unified graphical tools, which can display and edit underlying domain models using a tool-defined graphical notation.”<br />
  3. 3. What Is Graphiti All About ?<br />“The goal of Graphiti is to support the fast and easy creation of unified graphical tools, which can display and edit underlying domain models using a tool-defined graphical notation.”<br />
  4. 4. Why Should I Want to Use Graphiti ?<br />
  5. 5. How Does Graphiti Work ?<br />
  6. 6. What about the Diagram Type Agent ?<br />Diagram Type Agent<br />Feature Provider<br />Diagram Type Provider<br />A feature implements an operation for a domain object and defines the context in which the operation can be triggered<br />Add Feature<br />Create Feature<br />Delete Feature<br />…<br />Specialized features for common user interactions available<br />
  7. 7. Domain<br />Hierarchie<br />Pictogram Elements<br />Links<br />Visualization<br />Graphics Algorithms<br />EClass<br />Container Shape<br />Link<br />EAttribute<br />Attribute<br />Text<br />Shape<br />Shape<br />Shape<br />Shape<br />Container Shape<br />Which Objects Do I Deal with ?<br />Text<br />Text<br />EOperation<br />Attribute<br />Link<br />Link<br />Link<br />Link<br />Result<br />Shape<br />Container Shape<br />
  8. 8. Well Then - How Do I Build a Tool ?<br />
  9. 9. Well Then - How Do I Build a Tool ?<br />
  10. 10. packageorg.eclipse.graphiti.tutorial;<br /> <br />importorg.eclipse.graphiti.dt.AbstractDiagramTypeProvider;<br /> <br />publicclassTutorialDiagramTypeProviderextendsAbstractDiagramTypeProvider {<br /> <br />publicTutorialDiagramTypeProvider() {<br />super();<br /> }<br />}<br />Well Then - How Do I Build a Tool ?<br />
  11. 11. Well Then - How Do I Build a Tool ?<br />
  12. 12. Well Then - How Do I Build a Tool ?<br />…<br /><extension point="org.eclipse.graphiti.eclipse.diagramTypes"><br /><diagramType<br /> id="org.eclipse.graphiti.tutorial.TutorialDiagramType„<br /> type="tutorial„<br /> name="Tutorial Diagram Type„<br /> description="This is the diagram type for the Graphiti tutorial"><br /></diagramType><br /></extension><br /><extension point="org.eclipse.graphiti.eclipse.diagramTypeProviders"><br /> <diagramTypeProvider<br /> id="org.eclipse.graphiti.tutorial.TutorialDiagramTypeProvider„<br /> name="Tutorial Editor„<br /> class="org.eclipse.graphiti.tutorial.TutorialDiagramTypeProvider„<br /> description="This is the editor for the Graphiti tutorial"><br /><diagramType<br /> id="org.eclipse.graphiti.tutorial.TutorialDiagramType"><br /> </diagramType><br /> </diagramTypeProvider><br /></extension><br />…<br />
  13. 13. Well Then - How Do I Build a Tool ?<br />
  14. 14. Well Then - How Do I Build a Tool ?<br />packageorg.eclipse.graphiti.tutorial;<br />…<br />publicclassTutorialFeatureProviderextendsDefaultFeatureProvider {<br /> <br />publicTutorialFeatureProvider(IDiagramTypeProviderdtp) {<br />super(dtp);<br /> }<br />}<br />…<br />publicTutorialDiagramTypeProvider() {<br />super();<br />setFeatureProvider(newTutorialFeatureProvider(this));<br /> }<br />…<br />
  15. 15. Well Then - How Do I Build a Tool ?<br />
  16. 16. Well Then - How Do I Build a Tool ?<br />…<br />publicclassTutorialAddEClassFeatureextendsAbstractAddShapeFeature {<br /> <br />publicTutorialAddEClassFeature(IFeatureProviderfp) {<br />super(fp);<br /> }<br /> <br />@Override<br />public booleancanAdd(IAddContext context) {<br />// Check if user wants to add an EClass<br />if (context.getNewObject() instanceofEClass) {<br />// Check if user wants to add to a diagram<br />if (context.getTargetContainer() instanceof Diagram) {<br />return true;<br /> }<br /> }<br />return false;<br /> }<br /> <br />@Override<br />publicPictogramElement add(IAddContext context) {<br />…<br /> }<br />}<br />
  17. 17. Well Then - How Do I Build a Tool ?<br />publicPictogramElement add(IAddContext context) {<br />EClassaddedClass = (EClass) context.getNewObject();<br /> Diagram targetDiagram = (Diagram) context.getTargetContainer();<br />int w = context.getWidth() <= 0 ? 100 : context.getWidth();<br />int h = context.getHeight() <= 0 ? 50 : context.getHeight();<br />ContainerShapecontainerShape = PeUtil.createContainerShape(targetDiagram, true);<br />RoundedRectangleroundedRectangle = GaUtil.createRoundedRectangle(containerShape, 5, 5);<br />roundedRectangle.setForeground(manageColor(CLASS_FOREGROUND));<br />roundedRectangle.setBackground(manageColor(CLASS_BACKGROUND));<br />roundedRectangle.setLineWidth(2);<br />GaUtil.setLocationAndSizeOfGraphicsAlgorithm(roundedRectangle, context.getX(), context.getY(), w, h);<br />  link(containerShape, addedClass);<br /> Shape shape = PeUtil.createShape(containerShape, false);<br /> Text text = GaUtil.createDefaultText(shape, addedClass.getName());<br />text.setForeground(manageColor(CLASS_TEXT_FOREGROUND));<br />text.setHorizontalAlignment(Orientation.ALIGNMENT_CENTER);<br />text.setVerticalAlignment(Orientation.ALIGNMENT_CENTER);<br />text.getFont().setBold(true);<br />GaUtil.setLocationAndSizeOfGraphicsAlgorithm(text, 0, 0, width, 20);<br /> shape = PeUtil.createShape(containerShape, false);<br />Polylinepolyline = GaUtil.createPolyline(shape, newint[] { 0, 20, width, 20 });<br />polyline.setForeground(manageColor(CLASS_FOREGROUND));<br />polyline.setLineWidth(2);<br />returncontainerShape;<br />}<br />
  18. 18. Well Then - How Do I Build a Tool ?<br />publicclassTutorialFeatureProviderextendsDefaultFeatureProvider {<br />…<br />@Override<br />public IAddFeature getAddFeature(IAddContext context) {<br />if (context.getNewObject() instanceof EClass) {<br />returnnew TutorialAddEClassFeature(this);<br /> }<br />returnsuper.getAddFeature(context);<br /> }<br />}<br />
  19. 19. Graphiti – What else to Mention ?<br />
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×