graphl-cvs Mailing List for Graphl - Hybrid graph visualization tool (Page 12)
Status: Pre-Alpha
Brought to you by:
flo1
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(48) |
Sep
(6) |
Oct
(64) |
Nov
(12) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(34) |
Sep
(31) |
Oct
|
Nov
|
Dec
(25) |
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(43) |
Jul
(16) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Flo L. <fl...@us...> - 2004-08-21 22:31:16
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158/src/org/mediavirus/graphl/graph Modified Files: Node.java Log Message: * added martin klinke's contributions (File>New and mousewheel zooming) * implemented facet configuration from rdf config file * added configuration data to config.rdf * removed historic JGraphPane, merged with GraphlPane * factored out vocabulary registry mechanism from GraphlPane Index: Node.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/Node.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Node.java 20 Aug 2004 12:38:52 -0000 1.7 --- Node.java 21 Aug 2004 22:31:04 -0000 1.8 *************** *** 60,64 **** /** ! * This must only be called by the painter registry, to set the current painter (be it * assigned to this node, the type or per default) for performance reasons. All other * classes should use the method --- 60,64 ---- /** ! * This must only be called by the facet registry, to set the current painter (be it * assigned to this node, the type or per default) for performance reasons. All other * classes should use the method *************** *** 70,75 **** --- 70,87 ---- public void setCurrentPainter(NodePainter painter); + /** + * @return The node layouter that is set for rendering this node. + */ public NodeLayouter getCurrentLayouter(); + /** + * This must only be called by the facet registry, to set the current layouter (be it + * assigned to this node, the type or per default) for performance reasons. All other + * classes should use the method + * @see org.mediavirus.graphl.view.FacetRegistry#setLayouterForNode() to set a specific + * layouter for this node. + * + * @param layouter The NodeLayouter that is currently rendering this node. + */ public void setCurrentLayouter(NodeLayouter layouter); |
From: Flo L. <fl...@us...> - 2004-08-21 22:31:16
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158/src/org/mediavirus/graphl Modified Files: GraphlApplication.java GraphlPane.java GraphlPanel.java Log Message: * added martin klinke's contributions (File>New and mousewheel zooming) * implemented facet configuration from rdf config file * added configuration data to config.rdf * removed historic JGraphPane, merged with GraphlPane * factored out vocabulary registry mechanism from GraphlPane Index: GraphlPanel.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPanel.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GraphlPanel.java 20 Aug 2004 12:38:52 -0000 1.11 --- GraphlPanel.java 21 Aug 2004 22:31:02 -0000 1.12 *************** *** 13,19 **** import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.util.Collection; import java.util.Collections; - import java.util.Enumeration; import java.util.Iterator; import java.util.Vector; --- 13,20 ---- import java.awt.event.KeyEvent; import java.awt.event.KeyListener; + import java.awt.event.MouseWheelEvent; + import java.awt.event.MouseWheelListener; import java.util.Collection; import java.util.Collections; import java.util.Iterator; import java.util.Vector; *************** *** 32,36 **** import org.mediavirus.graphl.selection.SelectionListener; import org.mediavirus.graphl.selection.SelectionModel; - import org.mediavirus.graphl.vocabulary.Vocabulary; import javax.swing.JLabel; --- 33,36 ---- *************** *** 44,47 **** --- 44,49 ---- public class GraphlPanel extends JPanel implements GraphListener, KeyListener, SelectionListener { + private static final int WHEEL_ZOOM_FACTOR = 3; + GraphlPane graphPane; GraphlManipulator gui; *************** *** 66,70 **** initialize(); ! layouter = new Layouter(new GraphlLayoutStrategy(graphPane.getGraph(), graphPane.getPainterRegistry())); layouter.start(); } --- 68,72 ---- initialize(); ! layouter = new Layouter(new GraphlLayoutStrategy(graphPane.getGraph(), graphPane.getFacetRegistry())); layouter.start(); } *************** *** 240,245 **** graphPane.getGraph().addGraphListener(this); graphPane.addKeyListener(this); } - return graphPane; } --- 242,267 ---- graphPane.getGraph().addGraphListener(this); graphPane.addKeyListener(this); + graphPane.addMouseWheelListener(new MouseWheelListener () { + public void mouseWheelMoved(MouseWheelEvent e) { + //invert the rotation to create standard scroll-zoom + //behaviour (scroll up=zoom in, scroll down=zoom out) + int wheelRotation = e.getWheelRotation() * -1; + int sliderValue = getZoomSlider().getValue(); + //ignore scrolling in invariant directions at extreme values + if ((wheelRotation < 0 && getZoomSlider().getValue() == getZoomSlider().getMinimum()) + ||(wheelRotation > 0 && getZoomSlider().getValue() == getZoomSlider().getMaximum())) { + return; + } + sliderValue += wheelRotation * e.getScrollAmount() * WHEEL_ZOOM_FACTOR; + if(sliderValue < getZoomSlider().getMinimum()) { + sliderValue = getZoomSlider().getMinimum(); + } + if(sliderValue > getZoomSlider().getMaximum()) { + sliderValue = getZoomSlider().getMaximum(); + } + getZoomSlider().setValue(sliderValue); + } + }); } return graphPane; } *************** *** 252,256 **** nodePainterMenu = new JComboBox(); nodePainterMenu.setFont(new Font(null, Font.PLAIN, 9)); ! Vector painters = graphPane.getPainterRegistry().getAvailableNodePainters(); for (Iterator iter = painters.iterator(); iter.hasNext();) { NodePainter painter = (NodePainter) iter.next(); --- 274,278 ---- nodePainterMenu = new JComboBox(); nodePainterMenu.setFont(new Font(null, Font.PLAIN, 9)); ! Vector painters = graphPane.getFacetRegistry().getAvailableNodePainters(); for (Iterator iter = painters.iterator(); iter.hasNext();) { NodePainter painter = (NodePainter) iter.next(); *************** *** 260,264 **** public void actionPerformed(ActionEvent e) { NodePainter p = (NodePainter)nodePainterMenu.getSelectedItem(); ! graphPane.getPainterRegistry().setDefaultNodePainter((NodePainter)p.clone()); getNodePainterConfigureButton().setEnabled(p.hasVisualController()); graphPane.repaint(); --- 282,286 ---- public void actionPerformed(ActionEvent e) { NodePainter p = (NodePainter)nodePainterMenu.getSelectedItem(); ! graphPane.getFacetRegistry().setDefaultNodePainter((NodePainter)p.clone()); getNodePainterConfigureButton().setEnabled(p.hasVisualController()); graphPane.repaint(); *************** *** 277,281 **** edgePainterMenu = new JComboBox(); edgePainterMenu.setFont(new Font(null, Font.PLAIN, 9)); ! Vector painters = graphPane.getPainterRegistry().getAvailableEdgePainters(); for (Iterator iter = painters.iterator(); iter.hasNext();) { EdgePainter painter = (EdgePainter) iter.next(); --- 299,303 ---- edgePainterMenu = new JComboBox(); edgePainterMenu.setFont(new Font(null, Font.PLAIN, 9)); ! Vector painters = graphPane.getFacetRegistry().getAvailableEdgePainters(); for (Iterator iter = painters.iterator(); iter.hasNext();) { EdgePainter painter = (EdgePainter) iter.next(); *************** *** 286,290 **** public void actionPerformed(ActionEvent e) { EdgePainter p = (EdgePainter)edgePainterMenu.getSelectedItem(); ! graphPane.getPainterRegistry().setDefaultEdgePainter((EdgePainter)p.clone()); getEdgePainterConfigureButton().setEnabled(p.hasVisualController()); graphPane.repaint(); --- 308,312 ---- public void actionPerformed(ActionEvent e) { EdgePainter p = (EdgePainter)edgePainterMenu.getSelectedItem(); ! graphPane.getFacetRegistry().setDefaultEdgePainter((EdgePainter)p.clone()); getEdgePainterConfigureButton().setEnabled(p.hasVisualController()); graphPane.repaint(); *************** *** 373,387 **** } - /** - * @return Returns the registered Vocabularies. - */ - public Enumeration getRegisteredVocabularies() { - return graphPane.getRegisteredVocabularies(); - } - - public void registerVocabulary(Vocabulary v) { - graphPane.registerVocabulary(v); - } - /** * @see de.fzi.wim.guibase.graphview.selection.SelectionListener#nodesAddedToSelection(de.fzi.wim.guibase.graphview.selection.NodeSelectionModel, java.util.Collection) --- 395,398 ---- *************** *** 448,452 **** public void actionPerformed(java.awt.event.ActionEvent e) { ! int result = GenericDialog.showModalDialog(null, graphPane.getPainterRegistry().getDefaultNodePainter().getVisualController(), "Default Node Painter Properties"); } }); --- 459,463 ---- public void actionPerformed(java.awt.event.ActionEvent e) { ! int result = GenericDialog.showModalDialog(null, graphPane.getFacetRegistry().getDefaultNodePainter().getVisualController(), "Default Node Painter Properties"); } }); *************** *** 475,479 **** public void actionPerformed(java.awt.event.ActionEvent e) { ! int result = GenericDialog.showModalDialog(null, graphPane.getPainterRegistry().getDefaultEdgePainter().getVisualController(), "Default Edge Painter Properties"); } }); --- 486,490 ---- public void actionPerformed(java.awt.event.ActionEvent e) { ! int result = GenericDialog.showModalDialog(null, graphPane.getFacetRegistry().getDefaultEdgePainter().getVisualController(), "Default Edge Painter Properties"); } }); Index: GraphlApplication.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlApplication.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GraphlApplication.java 27 Jul 2004 13:24:06 -0000 1.5 --- GraphlApplication.java 21 Aug 2004 22:31:02 -0000 1.6 *************** *** 29,32 **** --- 29,33 ---- import org.mediavirus.graphl.gui.GenericDialog; import org.mediavirus.graphl.gui.OpenURLPanel; + import org.mediavirus.graphl.view.GraphFacetRegistry; import org.mediavirus.graphl.vocabulary.DC; import org.mediavirus.graphl.vocabulary.FOAF; *************** *** 47,50 **** --- 48,52 ---- JMenu fileMenu; + JMenuItem newItem; JMenuItem openFileItem; JMenuItem openURLItem; *************** *** 60,63 **** --- 62,67 ---- private boolean doReload; + private RDFGraph settings = new RDFGraph(); + /** * @throws java.awt.HeadlessException *************** *** 90,93 **** --- 94,107 ---- fileMenu.setFont(menuFont); + newItem = new JMenuItem("New"); + newItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, KeyEvent.CTRL_DOWN_MASK)); + newItem.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + doNew(); + } + }); + newItem.setFont(menuFont); + fileMenu.add(newItem); + openFileItem = new JMenuItem("Open File..."); openFileItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, KeyEvent.CTRL_DOWN_MASK)); *************** *** 135,143 **** // TODO (Future): the whole vocab. registration should be defined in RDF files ! mainPanel.registerVocabulary(Graphl.getVocabulary()); ! mainPanel.registerVocabulary(RDF.getVocabulary()); ! mainPanel.registerVocabulary(RDFS.getVocabulary()); ! mainPanel.registerVocabulary(DC.getVocabulary()); ! mainPanel.registerVocabulary(FOAF.getVocabulary()); //mainPanel.graphPane.getPainterRegistry().setEdgePainterForType("http://www.mediavirus.org/graphl#frontLink", new StraightLineEdgePainter(0.7f, LineEdgePainter.DASHED, true, false, 9)); --- 149,157 ---- // TODO (Future): the whole vocab. registration should be defined in RDF files ! mainPanel.graphPane.getVocabularyRegistry().registerVocabulary(Graphl.getVocabulary()); ! mainPanel.graphPane.getVocabularyRegistry().registerVocabulary(RDF.getVocabulary()); ! mainPanel.graphPane.getVocabularyRegistry().registerVocabulary(RDFS.getVocabulary()); ! mainPanel.graphPane.getVocabularyRegistry().registerVocabulary(DC.getVocabulary()); ! mainPanel.graphPane.getVocabularyRegistry().registerVocabulary(FOAF.getVocabulary()); //mainPanel.graphPane.getPainterRegistry().setEdgePainterForType("http://www.mediavirus.org/graphl#frontLink", new StraightLineEdgePainter(0.7f, LineEdgePainter.DASHED, true, false, 9)); *************** *** 207,210 **** --- 221,249 ---- * */ + protected void doNew() { + if (mainPanel.getGraph().isDirty()) { + int choice = JOptionPane.showConfirmDialog(this, "File has been changed. Do you want to save your changes?", "Save Changes?", JOptionPane.YES_NO_CANCEL_OPTION); + if (choice == JOptionPane.CANCEL_OPTION) return; + if (choice == JOptionPane.YES_OPTION) { + boolean result = doSave(); + // if save not succesful, treat as cancel + if (result != true) { + return; + } + } + } + + mainPanel.stopLayout(); + mainPanel.getGraph().clear(); + mainPanel.getGraph().resetDirty(); + + currentFile = null; + setTitle("Graphl - untitled"); + + mainPanel.resumeLayout(); + } + /** + * + */ protected boolean doSaveAs() { JFileChooser chooser = new JFileChooser(); *************** *** 318,335 **** } } public static void main(String[] args) { - System.out.println(RDF.getVocabulary().getNamespace()); - System.out.println(RDFS.getVocabulary().getNamespace()); - GraphlApplication app = new GraphlApplication(); ! app.setSize(800, 600); app.show(); try { app.mainPanel.getGraph().readFromFile(System.getProperty("user.dir") + "/graphs/default.rdf"); ! app.setTitle("Graphl - test.rdf"); } catch (IOException ioex) { --- 357,379 ---- } } + + public void loadSettings(String filename) throws IOException { + settings.clear(); + settings.readFromFile(filename); + + mainPanel.graphPane.setFacetRegistry(new GraphFacetRegistry(settings)); + } public static void main(String[] args) { GraphlApplication app = new GraphlApplication(); ! app.setSize(1024, 768); app.show(); try { + app.loadSettings(System.getProperty("user.dir") + "/config/config.rdf"); app.mainPanel.getGraph().readFromFile(System.getProperty("user.dir") + "/graphs/default.rdf"); ! app.setTitle("Graphl - default.rdf"); } catch (IOException ioex) { Index: GraphlPane.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPane.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GraphlPane.java 2 Aug 2004 12:36:49 -0000 1.10 --- GraphlPane.java 21 Aug 2004 22:31:02 -0000 1.11 *************** *** 5,8 **** --- 5,9 ---- package org.mediavirus.graphl; + import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; *************** *** 11,33 **** import java.awt.Rectangle; import java.awt.RenderingHints; import java.awt.geom.AffineTransform; import java.awt.geom.NoninvertibleTransformException; import java.awt.geom.Point2D; import java.util.Collection; ! import java.util.Enumeration; import java.util.HashSet; import java.util.Iterator; import java.util.Set; - import java.util.Vector; ! import org.mediavirus.graphl.graph.*; import org.mediavirus.graphl.graph.rdf.RDFGraph; import org.mediavirus.graphl.interaction.Manipulator; import org.mediavirus.graphl.layout.AbsoluteNodeLayouter; import org.mediavirus.graphl.layout.RepulsionNodeLayouter; import org.mediavirus.graphl.layout.SortedNodeLayouter; - import org.mediavirus.graphl.layout.UnconstrainedNodeLayouter; - import org.mediavirus.graphl.layout.NeutralEdgeLayouter; import org.mediavirus.graphl.layout.SpringEdgeLayouter; import org.mediavirus.graphl.painter.BoxNodePainter; import org.mediavirus.graphl.painter.EdgePainter; --- 12,48 ---- import java.awt.Rectangle; import java.awt.RenderingHints; + import java.awt.event.ComponentEvent; + import java.awt.event.FocusEvent; + import java.awt.event.KeyEvent; + import java.awt.event.MouseEvent; import java.awt.geom.AffineTransform; import java.awt.geom.NoninvertibleTransformException; import java.awt.geom.Point2D; + import java.util.ArrayList; import java.util.Collection; ! import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; + import java.util.List; + import java.util.ListIterator; + import java.util.Map; import java.util.Set; ! import javax.swing.JPanel; ! import javax.swing.SwingUtilities; ! import javax.swing.ToolTipManager; ! ! import org.mediavirus.graphl.graph.Edge; ! import org.mediavirus.graphl.graph.Graph; ! import org.mediavirus.graphl.graph.GraphListener; ! import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.graph.rdf.RDFGraph; import org.mediavirus.graphl.interaction.Manipulator; import org.mediavirus.graphl.layout.AbsoluteNodeLayouter; + import org.mediavirus.graphl.layout.NeutralEdgeLayouter; import org.mediavirus.graphl.layout.RepulsionNodeLayouter; import org.mediavirus.graphl.layout.SortedNodeLayouter; import org.mediavirus.graphl.layout.SpringEdgeLayouter; + import org.mediavirus.graphl.layout.UnconstrainedNodeLayouter; import org.mediavirus.graphl.painter.BoxNodePainter; import org.mediavirus.graphl.painter.EdgePainter; *************** *** 38,46 **** import org.mediavirus.graphl.painter.NodePainter; import org.mediavirus.graphl.painter.StraightLineEdgePainter; import org.mediavirus.graphl.view.FacetRegistry; - import org.mediavirus.graphl.view.JGraphPane; import org.mediavirus.graphl.view.SimpleFacetRegistry; ! import org.mediavirus.graphl.vocabulary.*; ! import org.mediavirus.graphl.vocabulary.Vocabulary; /** --- 53,62 ---- import org.mediavirus.graphl.painter.NodePainter; import org.mediavirus.graphl.painter.StraightLineEdgePainter; + import org.mediavirus.graphl.selection.DefaultSelectionModel; + import org.mediavirus.graphl.selection.SelectionModel; import org.mediavirus.graphl.view.FacetRegistry; import org.mediavirus.graphl.view.SimpleFacetRegistry; ! import org.mediavirus.graphl.vocabulary.SimpleVocabularyRegistry; ! import org.mediavirus.graphl.vocabulary.VocabularyRegistry; /** *************** *** 48,57 **** * @author flo */ ! public class GraphlPane extends JGraphPane implements GraphListener, VocabularyRegistry { private Set registeredEdgeTypes = new HashSet(); - Vector registeredVocabularies = new Vector(); - private boolean autoRegisterTypes = true; --- 64,71 ---- * @author flo */ ! public class GraphlPane extends JPanel implements GraphListener { private Set registeredEdgeTypes = new HashSet(); private boolean autoRegisterTypes = true; *************** *** 61,126 **** private Point2D.Double translationPoint; ! FacetRegistry painterRegistry = new SimpleFacetRegistry(); public GraphlPane() { this(new RDFGraph()); } ! public FacetRegistry getPainterRegistry() { ! return painterRegistry; } /** ! * @param graph */ ! public GraphlPane(RDFGraph graph) { ! super(graph); ! ! updateTransform(); ! ! graph.addGraphListener(this); ! ! setupDefaultPainters(); ! } private void setupDefaultPainters() { // register the available painter classes (for user selection) ! painterRegistry.registerEdgePainter(new StraightLineEdgePainter()); ! painterRegistry.registerEdgePainter(new ManhattanEdgePainter()); ! painterRegistry.registerEdgePainter(new InvisibleEdgePainter()); ! painterRegistry.registerNodePainter(new BoxNodePainter()); ! painterRegistry.registerNodePainter(new ImageNodePainter()); ! painterRegistry.registerNodePainter(new InvisibleNodePainter()); ! painterRegistry.registerEdgeLayouter(new SpringEdgeLayouter()); ! painterRegistry.registerEdgeLayouter(new NeutralEdgeLayouter()); ! painterRegistry.registerNodeLayouter(new UnconstrainedNodeLayouter()); ! painterRegistry.registerNodeLayouter(new RepulsionNodeLayouter()); ! painterRegistry.registerNodeLayouter(new AbsoluteNodeLayouter()); ! painterRegistry.registerNodeLayouter(new SortedNodeLayouter()); // set default painters ! painterRegistry.setDefaultEdgePainter(new StraightLineEdgePainter()); ! painterRegistry.setDefaultNodePainter(new BoxNodePainter()); ! painterRegistry.setDefaultEdgeLayouter(new SpringEdgeLayouter()); ! painterRegistry.setDefaultNodeLayouter(new RepulsionNodeLayouter()); ! ! // painterRegistry.setNodePainterForType("http://xmlns.com/foaf/0.1/Person", new BoxNodePainter() { ! // protected Color getBackgroundColor( ! // boolean isHighlighted, ! // boolean isSelected, ! // boolean isDragging) { ! // return Color.green; ! // } ! // }); ! // ! // painterRegistry.setEdgePainterForType("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", new StraightLineEdgePainter(0.7f, LineEdgePainter.DOTTED, false, true, 9)); ! // painterRegistry.setEdgePainterForType("http://www.mediavirus.org/graphl#connectedTo", new StraightLineEdgePainter(0.7f, LineEdgePainter.SOLID, false, false, 9)); - // painterRegistry.setEdgeLayouterForType("http://www.w3.org/1999/02/22-rdf-syntax-ns#type", new NeutralEdgeLayouter()); } --- 75,172 ---- private Point2D.Double translationPoint; ! FacetRegistry facetRegistry = new SimpleFacetRegistry(); ! VocabularyRegistry vocabularyRegistry = new SimpleVocabularyRegistry(); ! ! /** The graph being visualized. */ ! protected Graph graph; ! /** The listener for the graph. */ ! protected GraphListener graphListner; ! /** The map of node positions. */ ! protected Map nodePositions; ! /** The array of registered manipulators in the order they were registered. */ ! protected List manipulators; ! /** The map of rigestered manipulators keyed by their name. */ ! protected Map manipulatorsByName; ! private NodePainter defaultNodePainter; ! ! protected SelectionModel selection; ! ! /** ! * Creates a graph pane. ! * ! * @param graph The graph ! */ ! public GraphlPane(Graph graph) { ! super(null); ! graphListner=new GraphHandler(); ! nodePositions=new HashMap(); ! manipulators=new ArrayList(); ! manipulatorsByName=new HashMap(); ! setGraph(graph); ! enableEvents(MouseEvent.MOUSE_EVENT_MASK | MouseEvent.MOUSE_MOTION_EVENT_MASK | KeyEvent.KEY_EVENT_MASK | FocusEvent.FOCUS_EVENT_MASK | ComponentEvent.COMPONENT_EVENT_MASK); ! setBackground(Color.white); ! ToolTipManager.sharedInstance().registerComponent(this); ! defaultNodePainter = new BoxNodePainter(); + updateTransform(); + + graph.addGraphListener(this); + + setupDefaultPainters(); + } + public GraphlPane() { this(new RDFGraph()); } ! public FacetRegistry getFacetRegistry() { ! return facetRegistry; ! } ! ! public void setFacetRegistry(FacetRegistry registry) { ! this.facetRegistry = registry; } /** ! * @return Returns the vocabularyRegistry. */ ! public VocabularyRegistry getVocabularyRegistry() { ! return vocabularyRegistry; ! } ! /** ! * @param vocabularyRegistry The vocabularyRegistry to set. ! */ ! public void setVocabularyRegistry(VocabularyRegistry vocabularyRegistry) { ! this.vocabularyRegistry = vocabularyRegistry; } + /** + * @param graph + */ private void setupDefaultPainters() { // register the available painter classes (for user selection) ! facetRegistry.registerEdgePainter(new StraightLineEdgePainter()); ! facetRegistry.registerEdgePainter(new ManhattanEdgePainter()); ! facetRegistry.registerEdgePainter(new InvisibleEdgePainter()); ! facetRegistry.registerNodePainter(new BoxNodePainter()); ! facetRegistry.registerNodePainter(new ImageNodePainter()); ! facetRegistry.registerNodePainter(new InvisibleNodePainter()); ! facetRegistry.registerEdgeLayouter(new SpringEdgeLayouter()); ! facetRegistry.registerEdgeLayouter(new NeutralEdgeLayouter()); ! facetRegistry.registerNodeLayouter(new UnconstrainedNodeLayouter()); ! facetRegistry.registerNodeLayouter(new RepulsionNodeLayouter()); ! facetRegistry.registerNodeLayouter(new AbsoluteNodeLayouter()); ! facetRegistry.registerNodeLayouter(new SortedNodeLayouter()); // set default painters ! facetRegistry.setDefaultEdgePainter(new StraightLineEdgePainter()); ! facetRegistry.setDefaultNodePainter(new BoxNodePainter()); ! facetRegistry.setDefaultEdgeLayouter(new SpringEdgeLayouter()); ! facetRegistry.setDefaultNodeLayouter(new RepulsionNodeLayouter()); } *************** *** 147,156 **** } - public void setGraph(RDFGraph graph) { - super.setGraph(graph); - - graph.addGraphListener(this); - } - /** * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) --- 193,196 ---- *************** *** 160,164 **** g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); if (transform != null) g2.setTransform(transform); ! super.paintComponent(g); } --- 200,232 ---- g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); if (transform != null) g2.setTransform(transform); ! ! Rectangle clipRectangle=g.getClipBounds(); ! Color oldColor=g.getColor(); ! g.setColor(getBackground()); ! g.fillRect(clipRectangle.x,clipRectangle.y,clipRectangle.width,clipRectangle.height); ! g.setColor(oldColor); ! if (graph!=null) ! synchronized (graph) { ! Rectangle bounds=new Rectangle(); ! long edgesStart=System.currentTimeMillis(); ! Iterator iterator=graph.getEdges().iterator(); ! while (iterator.hasNext()) { ! Edge edge=(Edge)iterator.next(); ! getEdgeScreenBounds(edge,bounds); ! if (clipRectangle.intersects(bounds)) ! paintEdge(g2,edge); ! } ! long edgesDur=System.currentTimeMillis()-edgesStart; ! long nodesStart=System.currentTimeMillis(); ! iterator=graph.getNodes().iterator(); ! while (iterator.hasNext()) { ! Node node=(Node)iterator.next(); ! getNodeScreenBounds(node,bounds); ! if (clipRectangle.intersects(bounds)) ! paintNode(g2,node); ! } ! for (int i=0;i<manipulators.size();i++) ! ((Manipulator)manipulators.get(i)).paint(g2); ! } } *************** *** 229,233 **** * Overrides @see de.fzi.wim.guibase.graphview.graph.GraphListener#graphContentsChanged(de.fzi.wim.guibase.graphview.graph.Graph) */ ! public void graphContentsChanged(Graph graph) { } /* --- 297,313 ---- * Overrides @see de.fzi.wim.guibase.graphview.graph.GraphListener#graphContentsChanged(de.fzi.wim.guibase.graphview.graph.Graph) */ ! public void graphContentsChanged(Graph graph) { ! Iterator nodes = graph.getNodes().iterator(); ! while (nodes.hasNext()) { ! Node node = (Node) nodes.next(); ! facetRegistry.updateNodeFacets(node); ! } ! ! Iterator edges = graph.getEdges().iterator(); ! while (edges.hasNext()) { ! Edge edge = (Edge) edges.next(); ! facetRegistry.updateEdgeFacets(edge); ! } ! } /* *************** *** 238,243 **** for (Iterator iter = edges.iterator(); iter.hasNext();) { Edge edge = (Edge) iter.next(); ! edge.setCurrentPainter(painterRegistry.getDefaultEdgePainter()); ! edge.setCurrentLayouter(painterRegistry.getDefaultEdgeLayouter()); if (autoRegisterTypes) { registeredEdgeTypes.add(edge.getType()); --- 318,322 ---- for (Iterator iter = edges.iterator(); iter.hasNext();) { Edge edge = (Edge) iter.next(); ! facetRegistry.updateEdgeFacets(edge); if (autoRegisterTypes) { registeredEdgeTypes.add(edge.getType()); *************** *** 248,255 **** for (Iterator iter = nodes.iterator(); iter.hasNext();) { Node node = (Node) iter.next(); ! node.setCurrentPainter(painterRegistry.getDefaultNodePainter()); ! node.setCurrentLayouter(painterRegistry.getDefaultNodeLayouter()); } } } --- 327,338 ---- for (Iterator iter = nodes.iterator(); iter.hasNext();) { Node node = (Node) iter.next(); ! facetRegistry.updateNodeFacets(node); } } + + // we have to update all nodes' facets, because new nodes may have changed an existing node's type + // TODO (2) implement node and edge change notification in GraphListener + // then we can detect type changes properly + graphContentsChanged(graph); } *************** *** 260,273 **** /** - * @return Returns the registered Vocabularies. - */ - public Enumeration getRegisteredVocabularies() { - return registeredVocabularies.elements(); - } - - public void registerVocabulary(Vocabulary v) { - registeredVocabularies.add(v); - } - /** * @return Returns the transform. */ --- 343,346 ---- *************** *** 320,322 **** --- 393,808 ---- } + /** + * Returns a manipulator with given name. + * + * @param name the name of the manpulator + * @return the manipulator with given name (or <code>null</code> if the manipualtor with given name is not registered) + */ + public Manipulator getManipulator(String name) { + return (Manipulator)manipulatorsByName.get(name); + } + /** + * Removes a manipulator with given name. + * + * @param name the name of the manpulator + */ + public void removeManipulator(String name) { + Manipulator manipulator=(Manipulator)manipulatorsByName.remove(name); + if (manipulator!=null) { + manipulators.remove(manipulator); + manipulator.setGraphPane(null); + } + } + + /** + * Returns the current graph. + * + * @return the current graph + */ + public Graph getGraph() { + return graph; + } + /** + * Sets the current graph. + * + * @param graph the new graph + */ + public void setGraph(Graph graph) { + Graph oldGraph = this.graph; + if (this.graph!=null) + this.graph.removeGraphListener(graphListner); + this.graph=graph; + if (this.graph!=null) + this.graph.addGraphListener(graphListner); + nodePositions.clear(); + repaint(); + selection = new DefaultSelectionModel(graph); + firePropertyChange("graph",oldGraph,this.graph); + + graph.addGraphListener(this); + } + + /** + * Paints the edge. + * + * @param g the graphics + * @param edge the edge + */ + protected void paintEdge(Graphics2D g,Edge edge) { + EdgePainter edgePainter = getPainterForEdge(edge); + edgePainter.paintEdge(this, g, edge, selection.isEdgeSelected(edge), false); + } + + /** + * Paints the node. + * + * @param g the graphics + * @param node the node + */ + protected void paintNode(Graphics2D g,Node node) { + NodePainter nodePainter = getPainterForNode(node); + nodePainter.paintNode(this, g, node, selection.isNodeSelected(node), false); + } + + /** + * @return + */ + private NodePainter getDefaultNodePainter() { + return defaultNodePainter; + } + + /** + * Returns the node at given point, or <code>null</code> if there is no such node. + * + * @param point the screen point + * @return the node at given point (or <code>null</code> if there is no such node) + */ + public Node getNodeAtPoint(Point point) { + synchronized (graph) { + List nodes=graph.getNodes(); + ListIterator iterator=nodes.listIterator(nodes.size()); + while (iterator.hasPrevious()) { + Node node=(Node)iterator.previous(); + NodePainter nodePainter=getPainterForNode(node); + if (nodePainter.isInNode(this,node,point)) + return node; + } + return null; + } + } + /** + * Returns the set of nodes in given rectangle. + * + * @param rectangle the rectangle in which the nodes must be located + * @return the set of nodes in the region + */ + public Set getNodesInRectangle(Rectangle rectangle) { + synchronized (graph) { + Set nodesInRectangle=new HashSet(); + Rectangle nodeRectangle=new Rectangle(); + Iterator nodes=graph.getNodes().iterator(); + while (nodes.hasNext()) { + Node node=(Node)nodes.next(); + getNodeScreenBounds(node,nodeRectangle); + if (rectangle.contains(nodeRectangle)) + nodesInRectangle.add(node); + } + return nodesInRectangle; + } + } + /** + * Returns the edge at given point, or <code>null</code> if there is no such edge. + * + * @param point the screen point + * @return the edge at given point (or <code>null</code> if there is no such edge) + */ + public Edge getNearestEdge(Point point) { + Edge nearestEdge=null; + double minDistance=4; + synchronized (graph) { + List edges=graph.getEdges(); + ListIterator iterator=edges.listIterator(edges.size()); + while (iterator.hasPrevious()) { + Edge edge=(Edge)iterator.previous(); + EdgePainter edgePainter=getPainterForEdge(edge); + double distance=edgePainter.screenDistanceFromEdge(this,edge,point); + if (distance<minDistance) { + minDistance=distance; + nearestEdge=edge; + } + } + return nearestEdge; + } + } + /** + * Returns the position of the node on the screen. + * + * @param node the node whose on-screen position is required + * @return the position of the node on screen + */ + public Point getScreenPointForNode(Node node) { + Point point=(Point)nodePositions.get(node); + if (point==null) { + point=new Point(); + graphToScreenPoint(new Point2D.Double(node.getX(),node.getY()),point); + nodePositions.put(node,point); + } + return point; + } + /** + * Updates the map of screen positions of nodes. + */ + protected void updateNodeScreenPositions() { + synchronized (graph) { + Point2D graphPoint=new Point2D.Double(); + Iterator nodes=graph.getNodes().iterator(); + while (nodes.hasNext()) { + Node node=(Node)nodes.next(); + Point point=(Point)nodePositions.get(node); + if (point==null) { + point=new Point(); + nodePositions.put(node,point); + } + graphPoint.setLocation(node.getX(),node.getY()); + graphToScreenPoint(graphPoint,point); + } + } + } + /** + * Returns the screen bounds of given node. + * + * @param node the node for which the bounds must be returned + * @param nodeScreenRectangle the rectangle receiving the node's coordinates + */ + public void getNodeScreenBounds(Node node,Rectangle nodeScreenRectangle) { + NodePainter nodePainter = getPainterForNode(node); + nodePainter.getNodeScreenBounds(this,node,nodeScreenRectangle); + } + /** + * Repaints the given node. + * + * @param node the node that needs to be repainted + */ + public void repaintNode(Node node) { + Rectangle nodeScreenRectangle=new Rectangle(); + getNodeScreenBounds(node,nodeScreenRectangle); + repaint(nodeScreenRectangle); + } + /** + * Returns the screen bounds of given edge. + * + * @param edge the edge for which the bounds must be returned + * @param edgeScreenRectangle the rectangle receiving the edge's coordinates + */ + public void getEdgeScreenBounds(Edge edge,Rectangle edgeScreenRectangle) { + EdgePainter edgePainter=getPainterForEdge(edge); + edgePainter.getEdgeScreenBounds(this,edge,edgeScreenRectangle); + } + /** + * Repaints the given edge. + * + * @param edge the edge that needs to be repainted + */ + public void repaintEdge(Edge edge) { + Rectangle edgeScreenRectangle=new Rectangle(); + getEdgeScreenBounds(edge,edgeScreenRectangle); + edgeScreenRectangle.grow(5,5); + repaint(edgeScreenRectangle); + } + /** + * Returns the text for the tool-tip. + * + * @param event the mouse event + * @return the text for the tool-tip + */ + public String getToolTipText(MouseEvent event) { + Point point = event.getPoint(); + Node node = getNodeAtPoint(point); + if (node != null) { + NodePainter nodePainter = getPainterForNode(node); + String toolTipText = nodePainter.getToolTipText(this,node,point); + if (toolTipText != null) + return toolTipText; + } + return super.getToolTipText(event); + } + /** + * Processes the component event. + * + * @param e the event + */ + protected void processComponentEvent(ComponentEvent e) { + super.processComponentEvent(e); + updateNodeScreenPositions(); + repaint(); + } + /** + * Processes the mouse event. + * + * @param e the event + */ + protected void processMouseEvent(MouseEvent e) { + super.processMouseEvent(e); + switch (e.getID()) { + case MouseEvent.MOUSE_PRESSED: + if (!hasFocus() && isRequestFocusEnabled()) + requestFocus(); + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mousePressed(e); + break; + case MouseEvent.MOUSE_RELEASED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mouseReleased(e); + break; + case MouseEvent.MOUSE_CLICKED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mouseClicked(e); + break; + case MouseEvent.MOUSE_ENTERED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mouseEntered(e); + break; + case MouseEvent.MOUSE_EXITED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mouseExited(e); + break; + } + } + /** + * Processes the mouse motion events. + * + * @param e mouse event + */ + protected void processMouseMotionEvent(MouseEvent e) { + super.processMouseMotionEvent(e); + switch (e.getID()) { + case MouseEvent.MOUSE_MOVED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mouseMoved(e); + break; + case MouseEvent.MOUSE_DRAGGED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).mouseDragged(e); + break; + } + } + /** + * Processes the key event. + * + * @param e the event + */ + protected void processKeyEvent(KeyEvent e) { + super.processKeyEvent(e); + switch (e.getID()) { + case KeyEvent.KEY_TYPED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).keyTyped(e); + break; + case KeyEvent.KEY_PRESSED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).keyPressed(e); + break; + case KeyEvent.KEY_RELEASED: + for (int i=0;i<manipulators.size() && !e.isConsumed();i++) + ((Manipulator)manipulators.get(i)).keyReleased(e); + break; + } + } + /** + * Processes the focus event. + * + * @param e the event + */ + protected void processFocusEvent(FocusEvent e) { + super.processFocusEvent(e); + switch (e.getID()) { + case FocusEvent.FOCUS_GAINED: + for (int i=0;i<manipulators.size();i++) + ((Manipulator)manipulators.get(i)).focusGained(e); + break; + case FocusEvent.FOCUS_LOST: + for (int i=0;i<manipulators.size();i++) + ((Manipulator)manipulators.get(i)).focusLost(e); + break; + } + } + /** + * Overridden to notify the manipulators that the scroll position has changed. + * + * @param rectangle the rectangle + */ + public void scrollRectToVisible(Rectangle rectangle) { + super.scrollRectToVisible(rectangle); + for (int i=0;i<manipulators.size();i++) + ((Manipulator)manipulators.get(i)).notifyGraphPaneScrolled(); + } + + /** + * The handler of graph events. + */ + protected class GraphHandler implements GraphListener { + public void graphLayoutUpdated(Graph graph) { + if (SwingUtilities.isEventDispatchThread()) { + updateNodeScreenPositions(); + repaint(); + } + else + SwingUtilities.invokeLater(new Runnable() { + public void run() { + updateNodeScreenPositions(); + repaint(); + } + }); + } + public void graphUpdated(Graph graph) { + if (SwingUtilities.isEventDispatchThread()) + repaint(); + else + SwingUtilities.invokeLater(new Runnable() { + public void run() { + repaint(); + } + }); + } + public void graphContentsChanged(Graph graph) { + nodePositions.clear(); + repaint(); + } + public void elementsAdded(Graph graph,Collection nodes,Collection edges) { + repaint(); + } + public void elementsRemoved(Graph graph,Collection nodes,Collection edges) { + if (nodes!=null) { + Iterator iterator=nodes.iterator(); + while (iterator.hasNext()) { + Node node=(Node)iterator.next(); + nodePositions.remove(node); + } + } + repaint(); + } + } + + /** + * @return Returns the selection. + */ + public SelectionModel getSelection() { + + return selection; + } + + /** + * @param edge + * @return + */ + public boolean isSelected(Object o) { + if (o instanceof Edge) { + return (selection.isEdgeSelected((Edge)o)); + } + if (o instanceof Node) { + return (selection.isNodeSelected((Node)o)); + } + return false; + } + } |
From: Flo L. <fl...@us...> - 2004-08-21 22:31:15
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158/config Modified Files: config.rdf Log Message: * added martin klinke's contributions (File>New and mousewheel zooming) * implemented facet configuration from rdf config file * added configuration data to config.rdf * removed historic JGraphPane, merged with GraphlPane * factored out vocabulary registry mechanism from GraphlPane Index: config.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/config.rdf,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config.rdf 20 Aug 2004 12:41:34 -0000 1.4 --- config.rdf 21 Aug 2004 22:31:02 -0000 1.5 *************** *** 50,59 **** <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> </graphl:NodePainter> </rdf:li> <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> <graphl:defaultImage> <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> --- 50,59 ---- <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.painter.BoxNodePainter"> </graphl:NodePainter> </rdf:li> <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.painter.ImageNodePainter"> <graphl:defaultImage> <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> *************** *** 63,77 **** <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> </graphl:NodePainter> </rdf:li> </rdf:Bag> </graphl:availableNodePainters> ! <graphl:assignedNodePainters> <rdf:Bag> <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" graphl:baseColor="#66ff66"> <graphl:labelGenerator> --- 63,150 ---- <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.painter.InvisibleNodePainter"> </graphl:NodePainter> </rdf:li> </rdf:Bag> </graphl:availableNodePainters> ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.painter.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.painter.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.painter.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:defaultNodePainter> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.painter.BoxNodePainter" ! graphl:baseColor="#fffaa8"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="Value" ! graphl:guessName="true"/> ! </rdf:first> ! <rdf:rest> ! <rdf:nil/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! </graphl:NodePainter> ! </graphl:defaultNodePainter> ! ! <graphl:defaultEdgePainter> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.painter.StraightLineEdgePainter"/> ! </graphl:defaultEdgePainter> ! ! <graphl:defaultNodeLayouter> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"/> ! </graphl:defaultNodeLayouter> ! ! <graphl:defaultEdgeLayouter> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"/> ! </graphl:defaultEdgeLayouter> ! <graphl:assignedNodePainters> <rdf:Bag> <rdf:li> <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.painter.BoxNodePainter" graphl:baseColor="#66ff66"> <graphl:labelGenerator> *************** *** 106,147 **** </rdf:li> </rdf:Bag> ! </graphl:assignedNodePainters> ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> - <graphl:availableEdgePainters> - <rdf:Bag> - <rdf:li> - <graphl:EdgePainter - graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> - </graphl:EdgePainter> - </rdf:li> - <rdf:li> - <graphl:EdgePainter - graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> - </graphl:EdgePainter> - </rdf:li> - <rdf:li> - <graphl:EdgePainter - graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> - </graphl:EdgePainter> - </rdf:li> - </rdf:Bag> - </graphl:availableEdgePainters> - </graphl:Configuration> </rdf:RDF> \ No newline at end of file --- 179,227 ---- </rdf:li> </rdf:Bag> ! </graphl:assignedNodePainters> ! <graphl:assignedNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&rdfs;Class"/> ! </graphl:assignedToType> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodeLayouters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.painter.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineStyle="dotted"> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&rdf;type"/> ! </graphl:assignedToType> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&rdf;type"/> ! </graphl:assignedToType> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-21 22:31:15
|
Update of /cvsroot/graphl/graphl/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158/web/images Added Files: head.gif Log Message: * added martin klinke's contributions (File>New and mousewheel zooming) * implemented facet configuration from rdf config file * added configuration data to config.rdf * removed historic JGraphPane, merged with GraphlPane * factored out vocabulary registry mechanism from GraphlPane --- NEW FILE: head.gif --- (This appears to be a binary file; contents omitted.) |
From: Flo L. <fl...@us...> - 2004-08-21 22:31:14
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/vocabulary In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32158/src/org/mediavirus/graphl/vocabulary Added Files: SimpleVocabularyRegistry.java Log Message: * added martin klinke's contributions (File>New and mousewheel zooming) * implemented facet configuration from rdf config file * added configuration data to config.rdf * removed historic JGraphPane, merged with GraphlPane * factored out vocabulary registry mechanism from GraphlPane --- NEW FILE: SimpleVocabularyRegistry.java --- /* * Created on 21.08.2004 by flo */ package org.mediavirus.graphl.vocabulary; import java.util.Enumeration; import java.util.Vector; /** * @author flo * created: 21.08.2004 22:42:39 */ public class SimpleVocabularyRegistry implements VocabularyRegistry { Vector registeredVocabularies = new Vector(); /* * Overrides @see org.mediavirus.graphl.vocabulary.VocabularyRegistry#getRegisteredVocabularies() */ public Enumeration getRegisteredVocabularies() { return registeredVocabularies.elements(); } /* * Overrides @see org.mediavirus.graphl.vocabulary.VocabularyRegistry#registerVocabulary(org.mediavirus.graphl.vocabulary.Vocabulary) */ public void registerVocabulary(Vocabulary v) { registeredVocabularies.add(v); } } |
From: Flo L. <fl...@us...> - 2004-08-21 22:30:38
|
Update of /cvsroot/graphl/graphl/web/images In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32079/web/images Log Message: Directory /cvsroot/graphl/graphl/web/images added to the repository |
From: Flo L. <fl...@us...> - 2004-08-21 22:26:46
|
Update of /cvsroot/graphl/graphl/graphs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30930/graphs Modified Files: todo.rdf welt.rdf default.rdf test.rdf foaf.rdf Log Message: changed cvs mode for rdf files Index: default.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/default.rdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** default.rdf 19 Aug 2004 14:14:27 -0000 1.2 --- default.rdf 21 Aug 2004 22:26:36 -0000 1.3 *************** *** 3,10 **** --- 3,12 ---- <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> + <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ]> <rdf:RDF xml:base="" xmlns:graphl="&graphl;" + xmlns:foaf="&foaf;" xmlns:rdf="&rdf;"> *************** *** 13,15 **** --- 15,20 ---- </graphl:Configuration> + <foaf:Person + foaf:name="Flo Ledermann"/> + </rdf:RDF> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-20 12:41:45
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26072/config Modified Files: config.rdf vocabularies.rdf facets.rdf Log Message: changing mode on rdf files again... Index: facets.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/facets.rdf,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** facets.rdf 20 Aug 2004 12:39:30 -0000 1.4 --- facets.rdf 20 Aug 2004 12:41:34 -0000 1.5 *************** *** 1,159 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;" ! xmlns:rdfs="&rdfs;" ! > ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&foaf;Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineType="dotted"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! </graphl:Configuration> \ No newline at end of file --- 1,159 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;" ! xmlns:rdfs="&rdfs;" ! > ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&foaf;Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineType="dotted"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! </graphl:Configuration> \ No newline at end of file Index: config.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/config.rdf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** config.rdf 20 Aug 2004 12:39:30 -0000 1.3 --- config.rdf 20 Aug 2004 12:41:34 -0000 1.4 *************** *** 1,147 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;" ! xmlns:rdfs="&rdfs;" ! > ! ! <!--<graphl:Configuration> ! <rdf:seeAlso rdf:about="facets.rdf"/> ! <rdf:seeAlso rdf:about="vocabularies.rdf"/> ! </graphl:Configuration>--> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:baseColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:first> ! <rdf:rest> ! <rdf:nil/> ! </rdf:rest> ! </rdf:List> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&foaf;Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file --- 1,147 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;" ! xmlns:rdfs="&rdfs;" ! > ! ! <!--<graphl:Configuration> ! <rdf:seeAlso rdf:about="facets.rdf"/> ! <rdf:seeAlso rdf:about="vocabularies.rdf"/> ! </graphl:Configuration>--> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:baseColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:first> ! <rdf:rest> ! <rdf:nil/> ! </rdf:rest> ! </rdf:List> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&foaf;Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-20 12:40:03
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25778/config Modified Files: config.rdf facets.rdf Log Message: extended default config files Index: config.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/config.rdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** config.rdf 19 Aug 2004 14:13:54 -0000 1.2 --- config.rdf 20 Aug 2004 12:39:30 -0000 1.3 *************** *** 1,135 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <!--<graphl:Configuration> ! <rdf:seeAlso rdf:about="facets.rdf"/> ! <rdf:seeAlso rdf:about="vocabularies.rdf"/> ! </graphl:Configuration>--> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file --- 1,147 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;" ! xmlns:rdfs="&rdfs;" ! > ! ! <!--<graphl:Configuration> ! <rdf:seeAlso rdf:about="facets.rdf"/> ! <rdf:seeAlso rdf:about="vocabularies.rdf"/> ! </graphl:Configuration>--> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:baseColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:first> ! <rdf:rest> ! <rdf:nil/> ! </rdf:rest> ! </rdf:List> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&foaf;Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file Index: facets.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/facets.rdf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** facets.rdf 19 Aug 2004 14:14:28 -0000 1.3 --- facets.rdf 20 Aug 2004 12:39:30 -0000 1.4 *************** *** 1,156 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineType="dotted"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! </graphl:Configuration> \ No newline at end of file --- 1,159 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY rdfs 'http://www.w3.org/2000/01/rdf-schema#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;" ! xmlns:rdfs="&rdfs;" ! > ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="&foaf;Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineType="dotted"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! </graphl:Configuration> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-20 12:39:07
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/painter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25631/src/org/mediavirus/graphl/painter Modified Files: ImageNodePainter.java BoxNodePainter.java NodePainter.java Log Message: added basic infrastructure to configure Facets from an RDF graph. work in progress... Index: NodePainter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/painter/NodePainter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NodePainter.java 2 Aug 2004 12:36:49 -0000 1.1 --- NodePainter.java 20 Aug 2004 12:38:52 -0000 1.2 *************** *** 40,44 **** void getNodeScreenBounds(JGraphPane graphPane,Node node,Rectangle nodeScreenRectangle); /** ! * Retruns the tool-tip for given point. * * @param graphPane the graph pane --- 40,44 ---- void getNodeScreenBounds(JGraphPane graphPane,Node node,Rectangle nodeScreenRectangle); /** ! * Returns the tool-tip for given point. * * @param graphPane the graph pane *************** *** 51,56 **** public boolean isEdgeDragPoint(JGraphPane graphPane,Node node,Point p); - public double getRepulsion(Node node); - /** * Returns the coordinates of the location to connect the given edge. If null --- 51,54 ---- Index: ImageNodePainter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/painter/ImageNodePainter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ImageNodePainter.java 2 Aug 2004 12:36:49 -0000 1.1 --- ImageNodePainter.java 20 Aug 2004 12:38:52 -0000 1.2 *************** *** 17,20 **** --- 17,21 ---- import java.net.URL; import java.util.Hashtable; + import java.util.Iterator; import javax.swing.JComponent; *************** *** 37,41 **** public static final int DEFAULT_HEIGHT = 20; ! Image defaultImage = new BufferedImage(DEFAULT_WIDTH, DEFAULT_HEIGHT, BufferedImage.TYPE_3BYTE_BGR); Image notFoundImage = new BufferedImage(DEFAULT_WIDTH, DEFAULT_HEIGHT, BufferedImage.TYPE_3BYTE_BGR); --- 38,49 ---- public static final int DEFAULT_HEIGHT = 20; ! public static final int USE_STATIC = 0; ! public static final int USE_PROPERTY = 1; ! public static final int USE_RESOURCE = 2; ! ! private int urlSourceType = USE_STATIC; ! private String urlSource = "http://localhost/graphl/images/head.gif"; ! ! Image staticImage = null; Image notFoundImage = new BufferedImage(DEFAULT_WIDTH, DEFAULT_HEIGHT, BufferedImage.TYPE_3BYTE_BGR); *************** *** 43,50 **** public ImageNodePainter() { ! Graphics g = defaultImage.getGraphics(); ! g.setColor(Color.lightGray); ! g.fillRect(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT); ! g = notFoundImage.getGraphics(); g.setColor(Color.red); g.fillRect(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT); --- 51,55 ---- public ImageNodePainter() { ! Graphics g = notFoundImage.getGraphics(); g.setColor(Color.red); g.fillRect(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT); *************** *** 70,93 **** Image img = (Image)images.get(node); if (img == null) { ! // guess if this is an image URL ! if (node.getValue() != null && (node.getValue().endsWith(".gif") || node.getValue().endsWith(".jpg") || node.getValue().endsWith(".png"))){ ! // TODO (2): where to get a reference for relative urls? ! try { ! URL url = new URL(baseURL, node.getValue()); ! img = (Image)url.getContent(new Class[]{Image.class}); ! } ! catch (MalformedURLException muex) { ! img = notFoundImage; ! } ! catch (IOException ioex) { ! img = notFoundImage; ! } ! } ! if (img != null) { ! images.put(node, img); ! } ! else { ! images.put(node, defaultImage); ! } } return img; --- 75,111 ---- Image img = (Image)images.get(node); if (img == null) { ! switch (urlSourceType) { ! case USE_STATIC: ! if (urlSource != null){ ! if (staticImage == null){ ! staticImage = loadImage(baseURL, urlSource); ! } ! img = staticImage; ! } ! else { ! staticImage = notFoundImage; ! img = notFoundImage; ! } ! break; ! case USE_PROPERTY: ! String href = node.getProperty(urlSource); ! img = loadImage(baseURL, href); ! case USE_RESOURCE: ! Iterator edges = node.getEdgesFrom().iterator(); ! while (edges.hasNext()) { ! Edge edge = (Edge) edges.next(); ! if (urlSource.equals(edge.getType())) { ! img = loadImage(baseURL, edge.getTo().getValue()); ! break; ! } ! } ! if (img == null) { ! img = notFoundImage; ! } ! break; ! default: ! break; ! } ! images.put(node, img); } return img; *************** *** 95,99 **** } ! /* * Overrides @see org.mediavirus.graphl.view.NodePainter#isInNode(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Point) */ --- 113,142 ---- } ! /** ! * @param baseURL ! * @param img ! * @param href ! * @return ! */ ! private Image loadImage(URL baseURL, String href) { ! Image img = null; ! if (href != null) { ! try { ! URL url = new URL(baseURL, href); ! img = (Image)url.getContent(new Class[]{Image.class}); ! } ! catch (MalformedURLException muex) { ! img = notFoundImage; ! } ! catch (IOException ioex) { ! img = notFoundImage; ! } ! } ! if (img == null) { ! img = notFoundImage; ! } ! return img; ! } ! /* * Overrides @see org.mediavirus.graphl.view.NodePainter#isInNode(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Point) */ *************** *** 140,151 **** /* - * Overrides @see org.mediavirus.graphl.view.NodePainter#getRepulsion(org.mediavirus.graphl.graph.RDFNode) - */ - public double getRepulsion(Node node) { - return node.getRepulsion(); - } - - - /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getEdgePin(org.mediavirus.graphl.graph.RDFNode, org.mediavirus.graphl.graph.RDFEdge) */ --- 183,186 ---- Index: BoxNodePainter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/painter/BoxNodePainter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BoxNodePainter.java 2 Aug 2004 12:36:49 -0000 1.1 --- BoxNodePainter.java 20 Aug 2004 12:38:52 -0000 1.2 *************** *** 13,16 **** --- 13,17 ---- import java.awt.Rectangle; import java.awt.Stroke; + import java.util.Iterator; import javax.swing.JComponent; *************** *** 244,253 **** /* - * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#getRepulsion() - */ - public double getRepulsion(Node node) { - return node.getRepulsion(); - } - /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#getEdgePin(org.mediavirus.graphl.RDFNode, org.mediavirus.graphl.RDFEdge) */ --- 245,248 ---- *************** *** 290,292 **** --- 285,319 ---- } + + /* + * Overrides @see org.mediavirus.graphl.view.Facet#setConfigurationNode(org.mediavirus.graphl.graph.Node) + */ + public void setConfigurationNode(Node node) { + Color col = getColorFromString(node.getProperty("http://www.mediavirus.org/graphl#baseColor")); + if (col != null) baseColor = col; + + col = getColorFromString(node.getProperty("http://www.mediavirus.org/graphl#borderColor")); + if (col != null) borderColor = col; + + col = getColorFromString(node.getProperty("http://www.mediavirus.org/graphl#textColor")); + if (col != null) textColor = col; + + try { + Node labelGeneratorNode = (Node)node.getNeighbours("http://www.mediavirus.org/graphl#labelGenerator", true).get(0); + labelGenerator.setConfigurationNode(labelGeneratorNode); + } + catch (IndexOutOfBoundsException ioobex) { + // no such neighbour found + } + } + + private Color getColorFromString(String colstr) { + Color col = null; + if (colstr != null) { + colstr = colstr.substring(1); + int colval = Integer.parseInt(colstr, 16); + col = new Color(colval); + } + return col; + } } |
From: Flo L. <fl...@us...> - 2004-08-20 12:39:07
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25631/src/org/mediavirus/graphl/view Modified Files: LabelGenerator.java SimpleFacetRegistry.java AbstractFacet.java Facet.java Added Files: GraphFacetRegistry.java Log Message: added basic infrastructure to configure Facets from an RDF graph. work in progress... Index: SimpleFacetRegistry.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/SimpleFacetRegistry.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SimpleFacetRegistry.java 2 Aug 2004 12:36:31 -0000 1.1 --- SimpleFacetRegistry.java 20 Aug 2004 12:38:52 -0000 1.2 *************** *** 5,9 **** package org.mediavirus.graphl.view; - import java.util.Collections; import java.util.Hashtable; import java.util.Iterator; --- 5,8 ---- Index: Facet.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/Facet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Facet.java 2 Aug 2004 12:36:31 -0000 1.1 --- Facet.java 20 Aug 2004 12:38:52 -0000 1.2 *************** *** 11,14 **** --- 11,15 ---- import org.mediavirus.graphl.graph.GraphElement; + import org.mediavirus.graphl.graph.Node; *************** *** 19,36 **** public interface Facet extends Cloneable { ! public boolean hasVisualController(); public JComponent getVisualController(); public String getName(); public boolean isSameClass(Object o); public Object clone(); public Set getAssignedElements(); public void assignElement(GraphElement element); public void unassignElement(GraphElement element); } \ No newline at end of file --- 20,86 ---- public interface Facet extends Cloneable { ! /** ! * Indicated whether this Facet has a GUI component for end-user control of its properties. ! * @return true if a GUI component exists. In this case, getVisualController() returns the ! * Component. false is no such component has been defined. ! */ ! public boolean hasVisualController(); + /** + * Returns a JComponent to be used for end-user control of this facet's proprties, or null if + * no such component exists. + * @returna A JComponent to be used for end-user control of this facet's proprties, or null if + * no such component exists. + */ public JComponent getVisualController(); + /** + * Returns the human-readable name of this facet. This can be used to display a label for this facet. + * @return The human-readable name for this facet. + */ public String getName(); + /** + * Compares this instance to another facet, testing if the classes are identical. + * @param o The Object that this facet should be compared to. + * @return true if this facet's class matches the class of the Object. false otherwise. + */ public boolean isSameClass(Object o); + /** + * Creates an identical copy of this facet instance. + * @return A clone of this facet. + */ public Object clone(); + /** + * Retrieves the GraphElements (Nodes or Edges) this facet is currently assigned to. + * @return A Set of GraphElements that are assigned to this facet. + */ public Set getAssignedElements(); + /** + * Adds a GraphElement to the Set of assigned elements. This should only be used for caching, + * otherwise facets should be assigned through the FacetRegistry. + * @param element The GraphElement (Node or Edge) to add to the assigned elements cache. + */ public void assignElement(GraphElement element); + /** + * Removes a GraphElement from the Set of assigned elements. This should only be used for caching, + * otherwise facets should be assigned through the FacetRegistry. + * @param element The GraphElement (Node or Edge) to remove from the assigned elements cache. + */ public void unassignElement(GraphElement element); + + /** + * Set a Node that carries configuration information for this facet. Depending on the implementation, + * the facet will use the node and its properties to set up its own properties. This + * is used by the GraphFacetRegistry to dynamically instantiate Facets from a configuration + * graph. + * @param node The Node that carries the configuration information for this facet (Usually + * of type "http://www.mediavirus.org/graphl#Facet". + */ + public void setConfigurationNode(Node node); + } \ No newline at end of file --- NEW FILE: GraphFacetRegistry.java --- /* * Created on 07.08.2004 by flo */ package org.mediavirus.graphl.view; import java.util.Collection; import java.util.Iterator; import org.mediavirus.graphl.graph.Graph; import org.mediavirus.graphl.graph.GraphListener; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.layout.EdgeLayouter; import org.mediavirus.graphl.layout.NodeLayouter; import org.mediavirus.graphl.painter.EdgePainter; import org.mediavirus.graphl.painter.NodePainter; /** * @author flo * created: 07.08.2004 22:10:50 */ public class GraphFacetRegistry extends SimpleFacetRegistry implements GraphListener { Graph registryGraph = null; public GraphFacetRegistry(Graph graph) { setRegistryGraph(graph); } public void setRegistryGraph(Graph graph) { this.registryGraph = graph; registryGraph.addGraphListener(this); graphContentsChanged(registryGraph); } public void graphLayoutUpdated(Graph graph) { //empty } public void graphUpdated(Graph graph) { //empty } public void graphContentsChanged(Graph graph) { Iterator nodes = graph.getNodes().iterator(); while (nodes.hasNext()) { Node node = (Node) nodes.next(); if (node.getType().equals("http://www.mediavirus.org/graphl#NodePainter")) { NodePainter nodePainter = (NodePainter)getFacetInstance(node); } else if (node.getType().equals("http://www.mediavirus.org/graphl#NodeLayouter")) { NodeLayouter nodeLayouter = (NodeLayouter)getFacetInstance(node); } else if (node.getType().equals("http://www.mediavirus.org/graphl#EdgePainter")) { EdgePainter edgePainter = (EdgePainter)getFacetInstance(node); } else if (node.getType().equals("http://www.mediavirus.org/graphl#EdgeLayouter")) { EdgeLayouter edgeLayouter = (EdgeLayouter)getFacetInstance(node); } } } private Facet getFacetInstance(Node facetNode) { String type = facetNode.getProperty("http://www.mediavirus.org/graphl#javaClass"); try { if (type != null) { Class facetClass = Class.forName(type); if (facetClass != null) { Object o = facetClass.newInstance(); if (o instanceof Facet) { Facet facet = (Facet)o; facet.setConfigurationNode(facetNode); return facet; } } else { System.err.println("Class not found: " + type); } } } catch (Exception e) { System.err.println("Problem instantiating facet: " + e.getMessage()); } return null; } public void elementsAdded(Graph graph, Collection nodes, Collection edges) { // TODO Auto-generated method stub } public void elementsRemoved(Graph graph, Collection nodes, Collection edges) { // TODO Auto-generated method stub } } Index: LabelGenerator.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/LabelGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** LabelGenerator.java 12 Jul 2004 11:48:51 -0000 1.3 --- LabelGenerator.java 20 Aug 2004 12:38:52 -0000 1.4 *************** *** 269,271 **** --- 269,314 ---- } } + + /** + * @param to + */ + public void setConfigurationNode(Node node) { + Node listNode = null; + + listNode = node.getFirstNeighbour("http://www.mediavirus.org/graphl#labelFacets", true); + if (listNode != null) { + facets.clear(); + } + + while (listNode != null && !listNode.getValue().equals("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")) { + Node labelFacetNode = listNode.getFirstNeighbour("http://www.w3.org/1999/02/22-rdf-syntax-ns#first", true); + if (labelFacetNode != null) { + String data = labelFacetNode.getProperty("http://www.mediavirus.org/graphl#labelFacetValue"); + int type = STRING; + String str = labelFacetNode.getProperty("http://www.mediavirus.org/graphl#labelFacetType"); + if (str != null) { + if (str.equalsIgnoreCase("value")) { + type = VALUE; + } + else if (str.equalsIgnoreCase("type")) { + type = TYPE; + } + else if (str.equalsIgnoreCase("property")) { + type = PROPERTY; + } + else if (str.equalsIgnoreCase("neighbour")) { + type = NEIGHBOUR; + } + } + boolean guessName = false; + str = labelFacetNode.getProperty("http://www.mediavirus.org/graphl#guessName"); + if (str != null && str.equalsIgnoreCase("true")) guessName = true; + LabelFacet labelFacet = new LabelFacet(type,data,guessName); + facets.add(labelFacet); + } + + listNode = listNode.getFirstNeighbour("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest", true); + } + + } } Index: AbstractFacet.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/AbstractFacet.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbstractFacet.java 2 Aug 2004 12:36:31 -0000 1.2 --- AbstractFacet.java 20 Aug 2004 12:38:52 -0000 1.3 *************** *** 5,13 **** package org.mediavirus.graphl.view; - import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.mediavirus.graphl.graph.GraphElement; /** --- 5,13 ---- package org.mediavirus.graphl.view; import java.util.HashSet; import java.util.Set; import org.mediavirus.graphl.graph.GraphElement; + import org.mediavirus.graphl.graph.Node; /** *************** *** 47,50 **** return getName(); } ! } --- 47,59 ---- return getName(); } ! ! /* ! * Overrides @see org.mediavirus.graphl.view.Facet#setConfigurationNode(org.mediavirus.graphl.graph.Node) ! */ ! public void setConfigurationNode(Node node) { ! // do nothing per default. ! ! // TODO (2) either implement a generic property mechanism here, or implement his method in all subclasses ! // (it should then be removed here). ! } } |
From: Flo L. <fl...@us...> - 2004-08-20 12:39:05
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25631/src/org/mediavirus/graphl Modified Files: GraphlPanel.java Log Message: added basic infrastructure to configure Facets from an RDF graph. work in progress... Index: GraphlPanel.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPanel.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GraphlPanel.java 2 Aug 2004 12:36:49 -0000 1.10 --- GraphlPanel.java 20 Aug 2004 12:38:52 -0000 1.11 *************** *** 62,65 **** --- 62,66 ---- private JButton nodePainterConfigureButton = null; private JButton edgePainterConfigureButton = null; + private JButton jButton = null; public GraphlPanel(){ initialize(); *************** *** 87,90 **** --- 88,93 ---- protected JPanel getTopPanel() { if (topPanel == null) { + java.awt.GridBagConstraints gridBagConstraints11 = new GridBagConstraints(); + java.awt.GridBagConstraints gridBagConstraints2 = new GridBagConstraints(); *************** *** 101,108 **** javax.swing.JLabel defaultNPLabel = new JLabel(); - java.awt.GridBagConstraints gridBagConstraints3 = new GridBagConstraints(); - - javax.swing.JLabel zoomLabel = new JLabel(); - topPanel = new JPanel(); topPanel.setLayout(new GridBagLayout()); --- 104,107 ---- *************** *** 116,119 **** --- 115,119 ---- c2.gridy = 1; c2.gridheight = 1; + c2.gridwidth = 2; c3.gridx = 0; c3.gridy = 1; *************** *** 126,140 **** c4.fill = java.awt.GridBagConstraints.HORIZONTAL; c4.weightx = 0.1D; ! c1.gridx = 6; c1.gridy = 0; c1.anchor = java.awt.GridBagConstraints.CENTER; c1.gridheight = 2; c1.weightx = 0.0D; - gridBagConstraints3.gridx = 5; - gridBagConstraints3.gridy = 0; - gridBagConstraints3.gridheight = 1; - gridBagConstraints3.insets = new java.awt.Insets(2,0,0,0); - zoomLabel.setText("zoom"); - zoomLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 9)); gridBagConstraints4.gridx = 0; gridBagConstraints4.gridy = 0; --- 126,134 ---- c4.fill = java.awt.GridBagConstraints.HORIZONTAL; c4.weightx = 0.1D; ! c1.gridx = 7; c1.gridy = 0; c1.anchor = java.awt.GridBagConstraints.CENTER; c1.gridheight = 2; c1.weightx = 0.0D; gridBagConstraints4.gridx = 0; gridBagConstraints4.gridy = 0; *************** *** 163,171 **** gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints2.insets = new java.awt.Insets(0,0,0,2); topPanel.add(getLayoutBox(), c1); topPanel.add(getZoomSlider(), c2); topPanel.add(getNodePainterMenu(), c3); topPanel.add(getEdgePainterMenu(), c4); - topPanel.add(zoomLabel, gridBagConstraints3); topPanel.add(defaultNPLabel, gridBagConstraints4); topPanel.add(defaultEPLabel, gridBagConstraints5); --- 157,169 ---- gridBagConstraints2.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints2.insets = new java.awt.Insets(0,0,0,2); + gridBagConstraints11.gridx = 6; + gridBagConstraints11.gridy = 0; + gridBagConstraints11.anchor = java.awt.GridBagConstraints.CENTER; + gridBagConstraints11.insets = new java.awt.Insets(2,0,0,0); + gridBagConstraints11.weightx = 0.1D; topPanel.add(getLayoutBox(), c1); topPanel.add(getZoomSlider(), c2); topPanel.add(getNodePainterMenu(), c3); topPanel.add(getEdgePainterMenu(), c4); topPanel.add(defaultNPLabel, gridBagConstraints4); topPanel.add(defaultEPLabel, gridBagConstraints5); *************** *** 173,176 **** --- 171,175 ---- topPanel.add(getNodePainterConfigureButton(), gridBagConstraints1); topPanel.add(getEdgePainterConfigureButton(), gridBagConstraints2); + topPanel.add(getJButton(), gridBagConstraints11); } *************** *** 484,486 **** } ! } // @jve:decl-index=0:visual-constraint="10,10" --- 483,507 ---- } ! /** ! ! * This method initializes jButton ! ! * ! ! * @return javax.swing.JButton ! ! */ ! private JButton getJButton() { ! if (jButton == null) { ! jButton = new JButton(); ! jButton.setText("zoom"); ! jButton.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 9)); ! jButton.setPreferredSize(new java.awt.Dimension(32,12)); ! jButton.setMargin(new java.awt.Insets(0,0,0,0)); ! jButton.setMaximumSize(new java.awt.Dimension(22,12)); ! jButton.setBorder(javax.swing.BorderFactory.createEmptyBorder(0,0,0,0)); ! } ! return jButton; ! } ! ! } // @jve:decl-index=0:visual-constraint="10,10" |
From: Flo L. <fl...@us...> - 2004-08-20 12:39:03
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25631/src/org/mediavirus/graphl/layout Modified Files: RepulsionNodeLayouter.java Log Message: added basic infrastructure to configure Facets from an RDF graph. work in progress... Index: RepulsionNodeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/RepulsionNodeLayouter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RepulsionNodeLayouter.java 2 Aug 2004 12:36:31 -0000 1.2 --- RepulsionNodeLayouter.java 20 Aug 2004 12:38:51 -0000 1.3 *************** *** 20,23 **** --- 20,29 ---- public class RepulsionNodeLayouter extends AbstractFacet implements NodeLayouter { + public static final int CONSTANT = 0; + public static final int CALCULATED = 1; + + private int mode = CONSTANT; + private double constantRepulsion = 1.0; + /* * Overrides @see org.mediavirus.graphl.layout.NodeLayouter#performLayoutStep(org.mediavirus.graphl.graph.Node, org.mediavirus.graphl.layout.GraphlLayoutStrategy.GraphManager) *************** *** 48,52 **** // in the 'force field' } ! double factor=100.0*node.getRepulsion()*node2.getRepulsion(); //*rigidity; dx*=factor; dy*=factor; --- 54,59 ---- // in the 'force field' } ! //TODO (2) where do we get the repulsion of 2nd node? ! double factor=100.0*constantRepulsion*constantRepulsion; //*node2.getRepulsion(); //*rigidity; dx*=factor; dy*=factor; |
From: Flo L. <fl...@us...> - 2004-08-20 12:39:03
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25631/src/org/mediavirus/graphl/graph Modified Files: Edge.java Node.java DefaultNode.java Log Message: added basic infrastructure to configure Facets from an RDF graph. work in progress... Index: Edge.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/Edge.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Edge.java 2 Aug 2004 12:36:49 -0000 1.6 --- Edge.java 20 Aug 2004 12:38:52 -0000 1.7 *************** *** 34,40 **** /** * This must only be called by the painter registry, to set the current painter (be it ! * assigned to this edge, the type or per default) for performance reasons. This should ! * be reflected in the future by making this method package local and putting the ! * necessary classes into the same package. All other classes should use the method * @see org.mediavirus.graphl.view.FacetRegistry#setPainterForEdge() to set a specific * painter for this edge. --- 34,39 ---- /** * This must only be called by the painter registry, to set the current painter (be it ! * assigned to this edge, the type or per default) for performance reasons. All other ! * classes should use the method * @see org.mediavirus.graphl.view.FacetRegistry#setPainterForEdge() to set a specific * painter for this edge. *************** *** 42,46 **** * @param painter The EdgePainter that is currently rendering this edge. */ - // TODO (1, 1h) re-arrange classes so that this method can be package local public void setCurrentPainter(EdgePainter painter); --- 41,44 ---- Index: Node.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/Node.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Node.java 2 Aug 2004 12:36:49 -0000 1.6 --- Node.java 20 Aug 2004 12:38:52 -0000 1.7 *************** *** 16,19 **** --- 16,20 ---- */ List getEdgesFrom(); + List getEdgesFrom(String type); /** * Returns the list of edges to the node. *************** *** 22,33 **** */ List getEdgesTo(); ! ! /** ! * The repulstion factor (specifies how much does this node repulses other nodes). ! * ! * @return the repulsion factor of the node ! */ ! double getRepulsion(); //TODO (3) there should be a NodeView interface that covers the visual aspects of a node (4h) --- 23,31 ---- */ List getEdgesTo(); ! List getEdgesTo(String type); + List getNeighbours(String edgeType, boolean forwardOnly); + Node getFirstNeighbour(String edgeType, boolean forwardOnly); + //TODO (3) there should be a NodeView interface that covers the visual aspects of a node (4h) *************** *** 63,69 **** /** * This must only be called by the painter registry, to set the current painter (be it ! * assigned to this node, the type or per default) for performance reasons. This should ! * be reflected in the future by making this method package local and putting the ! * necessary classes into the same package. All other classes should use the method * @see org.mediavirus.graphl.view.FacetRegistry#setPainterForNode() to set a specific * painter for this node. --- 61,66 ---- /** * This must only be called by the painter registry, to set the current painter (be it ! * assigned to this node, the type or per default) for performance reasons. All other ! * classes should use the method * @see org.mediavirus.graphl.view.FacetRegistry#setPainterForNode() to set a specific * painter for this node. *************** *** 71,75 **** * @param painter The NodePainter that is currently rendering this node. */ - // TODO (1, 1h) re-arrange classes so that this method can be package local public void setCurrentPainter(NodePainter painter); --- 68,71 ---- Index: DefaultNode.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/DefaultNode.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** DefaultNode.java 2 Aug 2004 12:36:49 -0000 1.9 --- DefaultNode.java 20 Aug 2004 12:38:52 -0000 1.10 *************** *** 1,5 **** --- 1,7 ---- package org.mediavirus.graphl.graph; + import java.util.ArrayList; import java.util.HashMap; + import java.util.Iterator; import java.util.List; import java.util.LinkedList; *************** *** 91,102 **** return posY; } - /** - * The repulstion factor (specifies how much does this node repulses other nodes). - * - * @return the repulsion factor of the node - */ - public double getRepulsion() { - return 1.0; - } /** * Return the label of this node. --- 93,96 ---- *************** *** 186,189 **** --- 180,244 ---- } } + /* + * Overrides @see org.mediavirus.graphl.graph.Node#getEdgesFrom(java.lang.String) + */ + public List getEdgesFrom(String type) { + List edges = new ArrayList(2); + Iterator allEdges = edgesFrom.iterator(); + while (allEdges.hasNext()) { + Edge edge = (Edge) allEdges.next(); + if (type.equals(edge.getType())) edges.add(edge); + } + return edges; + } + /* + * Overrides @see org.mediavirus.graphl.graph.Node#getEdgesTo(java.lang.String) + */ + public List getEdgesTo(String type) { + List edges = new ArrayList(2); + Iterator allEdges = edgesTo.iterator(); + while (allEdges.hasNext()) { + Edge edge = (Edge) allEdges.next(); + if (type.equals(edge.getType())) edges.add(edge); + } + return edges; + } + /* + * Overrides @see org.mediavirus.graphl.graph.Node#getNeighbours(java.lang.String, boolean) + */ + public List getNeighbours(String edgeType, boolean forwardOnly) { + List nodes = new ArrayList(2); + Iterator allEdges = edgesFrom.iterator(); + while (allEdges.hasNext()) { + Edge edge = (Edge) allEdges.next(); + if (edgeType.equals(edge.getType())) nodes.add(edge.getTo()); + } + if (!forwardOnly) { + allEdges = edgesTo.iterator(); + while (allEdges.hasNext()) { + Edge edge = (Edge) allEdges.next(); + if (edgeType.equals(edge.getType())) nodes.add(edge.getFrom()); + } + } + return nodes; + } + /* + * Overrides @see org.mediavirus.graphl.graph.Node#getFirstNeighbour(java.lang.String, boolean) + */ + public Node getFirstNeighbour(String edgeType, boolean forwardOnly) { + Iterator allEdges = edgesFrom.iterator(); + while (allEdges.hasNext()) { + Edge edge = (Edge) allEdges.next(); + if (edgeType.equals(edge.getType())) return edge.getTo(); + } + if (!forwardOnly) { + allEdges = edgesTo.iterator(); + while (allEdges.hasNext()) { + Edge edge = (Edge) allEdges.next(); + if (edgeType.equals(edge.getType())) return edge.getFrom(); + } + } + return null; + } |
From: Flo L. <fl...@us...> - 2004-08-19 14:14:40
|
Update of /cvsroot/graphl/graphl/graphs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12443/graphs Modified Files: todo.rdf welt.rdf default.rdf test.rdf foaf.rdf Log Message: changed cvs mode for rdf files Index: welt.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/welt.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** welt.rdf 21 Jun 2004 18:48:08 -0000 1.1 --- welt.rdf 19 Aug 2004 14:14:27 -0000 1.2 *************** *** 1,131 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <rdf:Description rdf:about="bevölkerung" ! graphl:hasLabel="bevölkerung" ! graphl:canvasPosition="2.993984184685286:-68.60243076889135"> ! <graphl:connectedTo rdf:resource="produkte"/> ! <graphl:connectedTo rdf:resource="politik"/> ! <graphl:connectedTo rdf:resource="dienstleistungsjobs"/> ! </rdf:Description> ! <rdf:Description rdf:about="produkte" ! graphl:hasLabel="Produkte" ! graphl:canvasPosition="153.3937844122258:87.87583392340203"> ! <graphl:connectedTo rdf:resource="umwelt"/> ! <graphl:connectedTo rdf:resource="geld"/> ! <graphl:connectedTo rdf:resource="sättigung"/> ! </rdf:Description> ! <rdf:Description rdf:about="politik" ! graphl:hasLabel="Politik" ! graphl:canvasPosition="-162.1145938326896:73.8405669924043"> ! <graphl:connectedTo rdf:resource="subventionen"/> ! <graphl:connectedTo rdf:resource="gesetz"/> ! </rdf:Description> ! <rdf:Description rdf:about="dienstleistungsjobs" ! graphl:hasLabel="Dienstleistungsjobs" ! graphl:canvasPosition="-78.32927082990564:-278.1879245304497"> ! <graphl:connectedTo rdf:resource="werbung"/> ! </rdf:Description> ! <rdf:Description rdf:about="umwelt" ! graphl:hasLabel="Umwelt" ! graphl:canvasPosition="215.85849915969695:272.84510665635884"/> ! <rdf:Description rdf:about="geld" ! graphl:hasLabel="Geld" ! graphl:canvasPosition="115.35772175429953:232.31402152933404"> ! <graphl:connectedTo rdf:resource="zinsen"/> ! </rdf:Description> ! <rdf:Description rdf:about="sättigung" ! graphl:hasLabel="Sättigung" ! graphl:canvasPosition="314.1484246745383:-65.98612412435304"> ! <graphl:connectedTo rdf:resource="pleite"/> ! <graphl:connectedTo rdf:resource="sinkende_umsätze"/> ! </rdf:Description> ! <rdf:Description rdf:about="subventionen" ! graphl:hasLabel="Subventionen" ! graphl:canvasPosition="-281.93874881528865:-14.922640781752419"> ! <graphl:connectedTo rdf:resource="forschung"/> ! <graphl:connectedTo rdf:resource="kultur"/> ! </rdf:Description> ! <rdf:Description rdf:about="gesetz" ! graphl:hasLabel="gesetz" ! graphl:canvasPosition="-68.61970234208773:216.6476257973802"> ! <graphl:connectedTo rdf:resource="geld"/> ! <graphl:connectedTo rdf:resource="exekutive"/> ! </rdf:Description> ! <rdf:Description rdf:about="werbung" ! graphl:hasLabel="Werbung, PR" ! graphl:canvasPosition="114.78399130922072:-268.3633757952254"> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! <graphl:connectedTo rdf:resource="medien"/> ! <graphl:connectedTo rdf:resource="agenturen"/> ! </rdf:Description> ! <rdf:Description rdf:about="industrie" ! graphl:hasLabel="industrie" ! graphl:canvasPosition="29.92920932685907:24.570336049064093"> ! <graphl:connectedTo rdf:resource="produkte"/> ! <graphl:connectedTo rdf:resource="forschung"/> ! </rdf:Description> ! <rdf:Description rdf:about="forschung" ! graphl:hasLabel="Forschung" ! graphl:canvasPosition="-105.57262090170566:-69.09358654959529"> ! <graphl:connectedTo rdf:resource="fortschritt"/> ! </rdf:Description> ! <rdf:Description rdf:about="fortschritt" ! graphl:hasLabel="Fortschritt" ! graphl:canvasPosition="88.57178983123865:-128.43096751702174"> ! <graphl:connectedTo rdf:resource="arbeitslose"/> ! </rdf:Description> ! <rdf:Description rdf:about="manager" ! graphl:hasLabel="manager" ! graphl:canvasPosition="187.6783989513573:-34.675210363394285"> ! <graphl:connectedTo rdf:resource="industrie"/> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! <graphl:connectedTo rdf:resource="werbung"/> ! <graphl:connectedTo rdf:resource="politik"/> ! </rdf:Description> ! <rdf:Description rdf:about="medien" ! graphl:hasLabel="Medien" ! graphl:canvasPosition="281.2499393119175:-246.83665436370472"> ! <graphl:connectedTo rdf:resource="sättigung"/> ! </rdf:Description> ! <rdf:Description rdf:about="agenturen" ! graphl:hasLabel="Agenturen" ! graphl:canvasPosition="122.85133364581736:-441.69532405612404"/> ! <rdf:Description rdf:about="zinsen" ! graphl:hasLabel="Zinsen" ! graphl:canvasPosition="293.4595871101539:192.7443852184625"> ! <graphl:connectedTo rdf:resource="pleite"/> ! </rdf:Description> ! <rdf:Description rdf:about="pleite" ! graphl:hasLabel="Pleite" ! graphl:canvasPosition="337.81304230124516:24.365997079825352"> ! <graphl:connectedTo rdf:resource="arbeitslose"/> ! </rdf:Description> ! <rdf:Description rdf:about="sinkende_umsätze" ! graphl:hasLabel="Sinkende Umsätze" ! graphl:canvasPosition="429.58487030885647:-25.783583012966968"> ! <graphl:connectedTo rdf:resource="pleite"/> ! <graphl:connectedTo rdf:resource="manager"/> ! </rdf:Description> ! <rdf:Description rdf:about="exekutive" ! graphl:hasLabel="Exekutive" ! graphl:canvasPosition="-79.18450612475272:102.26611697631479"> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! </rdf:Description> ! <rdf:Description rdf:about="arbeitslose" ! graphl:hasLabel="Arbeitslose" ! graphl:canvasPosition="223.99279085897797:-96.26523002455545"> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! </rdf:Description> ! <rdf:Description rdf:about="kultur" ! graphl:hasLabel="Kultur" ! graphl:canvasPosition="-432.09845704188166:-21.554638182144057"/> ! ! </rdf:RDF> --- 1,131 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <rdf:Description rdf:about="bevölkerung" ! graphl:hasLabel="bevölkerung" ! graphl:canvasPosition="2.993984184685286:-68.60243076889135"> ! <graphl:connectedTo rdf:resource="produkte"/> ! <graphl:connectedTo rdf:resource="politik"/> ! <graphl:connectedTo rdf:resource="dienstleistungsjobs"/> ! </rdf:Description> ! <rdf:Description rdf:about="produkte" ! graphl:hasLabel="Produkte" ! graphl:canvasPosition="153.3937844122258:87.87583392340203"> ! <graphl:connectedTo rdf:resource="umwelt"/> ! <graphl:connectedTo rdf:resource="geld"/> ! <graphl:connectedTo rdf:resource="sättigung"/> ! </rdf:Description> ! <rdf:Description rdf:about="politik" ! graphl:hasLabel="Politik" ! graphl:canvasPosition="-162.1145938326896:73.8405669924043"> ! <graphl:connectedTo rdf:resource="subventionen"/> ! <graphl:connectedTo rdf:resource="gesetz"/> ! </rdf:Description> ! <rdf:Description rdf:about="dienstleistungsjobs" ! graphl:hasLabel="Dienstleistungsjobs" ! graphl:canvasPosition="-78.32927082990564:-278.1879245304497"> ! <graphl:connectedTo rdf:resource="werbung"/> ! </rdf:Description> ! <rdf:Description rdf:about="umwelt" ! graphl:hasLabel="Umwelt" ! graphl:canvasPosition="215.85849915969695:272.84510665635884"/> ! <rdf:Description rdf:about="geld" ! graphl:hasLabel="Geld" ! graphl:canvasPosition="115.35772175429953:232.31402152933404"> ! <graphl:connectedTo rdf:resource="zinsen"/> ! </rdf:Description> ! <rdf:Description rdf:about="sättigung" ! graphl:hasLabel="Sättigung" ! graphl:canvasPosition="314.1484246745383:-65.98612412435304"> ! <graphl:connectedTo rdf:resource="pleite"/> ! <graphl:connectedTo rdf:resource="sinkende_umsätze"/> ! </rdf:Description> ! <rdf:Description rdf:about="subventionen" ! graphl:hasLabel="Subventionen" ! graphl:canvasPosition="-281.93874881528865:-14.922640781752419"> ! <graphl:connectedTo rdf:resource="forschung"/> ! <graphl:connectedTo rdf:resource="kultur"/> ! </rdf:Description> ! <rdf:Description rdf:about="gesetz" ! graphl:hasLabel="gesetz" ! graphl:canvasPosition="-68.61970234208773:216.6476257973802"> ! <graphl:connectedTo rdf:resource="geld"/> ! <graphl:connectedTo rdf:resource="exekutive"/> ! </rdf:Description> ! <rdf:Description rdf:about="werbung" ! graphl:hasLabel="Werbung, PR" ! graphl:canvasPosition="114.78399130922072:-268.3633757952254"> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! <graphl:connectedTo rdf:resource="medien"/> ! <graphl:connectedTo rdf:resource="agenturen"/> ! </rdf:Description> ! <rdf:Description rdf:about="industrie" ! graphl:hasLabel="industrie" ! graphl:canvasPosition="29.92920932685907:24.570336049064093"> ! <graphl:connectedTo rdf:resource="produkte"/> ! <graphl:connectedTo rdf:resource="forschung"/> ! </rdf:Description> ! <rdf:Description rdf:about="forschung" ! graphl:hasLabel="Forschung" ! graphl:canvasPosition="-105.57262090170566:-69.09358654959529"> ! <graphl:connectedTo rdf:resource="fortschritt"/> ! </rdf:Description> ! <rdf:Description rdf:about="fortschritt" ! graphl:hasLabel="Fortschritt" ! graphl:canvasPosition="88.57178983123865:-128.43096751702174"> ! <graphl:connectedTo rdf:resource="arbeitslose"/> ! </rdf:Description> ! <rdf:Description rdf:about="manager" ! graphl:hasLabel="manager" ! graphl:canvasPosition="187.6783989513573:-34.675210363394285"> ! <graphl:connectedTo rdf:resource="industrie"/> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! <graphl:connectedTo rdf:resource="werbung"/> ! <graphl:connectedTo rdf:resource="politik"/> ! </rdf:Description> ! <rdf:Description rdf:about="medien" ! graphl:hasLabel="Medien" ! graphl:canvasPosition="281.2499393119175:-246.83665436370472"> ! <graphl:connectedTo rdf:resource="sättigung"/> ! </rdf:Description> ! <rdf:Description rdf:about="agenturen" ! graphl:hasLabel="Agenturen" ! graphl:canvasPosition="122.85133364581736:-441.69532405612404"/> ! <rdf:Description rdf:about="zinsen" ! graphl:hasLabel="Zinsen" ! graphl:canvasPosition="293.4595871101539:192.7443852184625"> ! <graphl:connectedTo rdf:resource="pleite"/> ! </rdf:Description> ! <rdf:Description rdf:about="pleite" ! graphl:hasLabel="Pleite" ! graphl:canvasPosition="337.81304230124516:24.365997079825352"> ! <graphl:connectedTo rdf:resource="arbeitslose"/> ! </rdf:Description> ! <rdf:Description rdf:about="sinkende_umsätze" ! graphl:hasLabel="Sinkende Umsätze" ! graphl:canvasPosition="429.58487030885647:-25.783583012966968"> ! <graphl:connectedTo rdf:resource="pleite"/> ! <graphl:connectedTo rdf:resource="manager"/> ! </rdf:Description> ! <rdf:Description rdf:about="exekutive" ! graphl:hasLabel="Exekutive" ! graphl:canvasPosition="-79.18450612475272:102.26611697631479"> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! </rdf:Description> ! <rdf:Description rdf:about="arbeitslose" ! graphl:hasLabel="Arbeitslose" ! graphl:canvasPosition="223.99279085897797:-96.26523002455545"> ! <graphl:connectedTo rdf:resource="bevölkerung"/> ! </rdf:Description> ! <rdf:Description rdf:about="kultur" ! graphl:hasLabel="Kultur" ! graphl:canvasPosition="-432.09845704188166:-21.554638182144057"/> ! ! </rdf:RDF> Index: foaf.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/foaf.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** foaf.rdf 21 Jun 2004 18:48:07 -0000 1.1 --- foaf.rdf 19 Aug 2004 14:14:27 -0000 1.2 *************** *** 1,159 **** ! <rdf:RDF ! xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ! xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ! xmlns:foaf="http://xmlns.com/foaf/0.1/"> ! ! <foaf:Person> ! ! <foaf:name>Flo Ledermann</foaf:name> ! <foaf:firstName>Florian</foaf:firstName> ! <foaf:surname>Ledermann</foaf:surname> ! <foaf:nick>f/0</foaf:nick> ! ! <foaf:mbox rdf:resource="mailto:fl...@su..."/> ! <foaf:mbox rdf:resource="mailto:led...@im..."/> ! <foaf:jabberID>fl...@wa...</foaf:jabberID> ! ! <foaf:depiction rdf:resource="http://www.ims.tuwien.ac.at/~flo/images/flo.jpg"/> ! ! <foaf:gender rdf:resource="http://xmlns.com/foaf/0.1/Male"/> ! ! <foaf:homepage rdf:resource="http://www.mediavirus.org/f/0"/> ! <foaf:workplaceHomepage rdf:resource="http://www.ims.tuwien.ac.at/"/> ! <foaf:workInfoHomepage rdf:resource="http://www.ims.tuwien.ac.at/~flo"/> ! ! <foaf:myersBriggs>INFJ</foaf:myersBriggs> ! ! <foaf:interest rdf:resource="http://www.mozilla.org"/> ! <foaf:interest rdf:resource="http://rdfweb.org"/> ! <foaf:interest rdf:resource="http://www.studierstube.org"/> ! <foaf:interest rdf:resource="http://www.greeleynet.com/~cmorrison/WindMachine.html"/> ! ! <foaf:currentProject rdf:resource="http://www.studierstube.org/APRIL"/> ! <foaf:currentProject rdf:resource="http://www.studierstube.org/virtualshowcase"/> ! <foaf:currentProject rdf:resource="http://www.mediavirus.org/BllshtKdo"/> ! ! <foaf:pastProject rdf:resource="http://mprox.subnet.at"/> ! <foaf:pastProject rdf:resource="http://www.mudfuzz.com"/> ! <foaf:pastProject rdf:resource="http://www.subnet.at"/> ! ! <!-- ! <worksAt> ! <University> ! <foaf:homepage rdf:resource="http:www.tuwien.ac.at"/> ! <locatedAt> ! <geo:Point> ! <geo:lat></geo:lat> ! <geo:long></geo:long> ! </geo:Point> ! </locatedAt> ! </University> ! </worksAt> ! ! <owns> ! <car:Car id="BllshtKdo"> ! <car:license>A-W-67939J</car:license> ! <car:name>Bllsht Kdo</car:name> ! <car:maxPassengers>8</car:maxPassengers> ! <car:type rdf:resource="http://../Car/types/Van"/> ! </car:Car> ! </owns> ! ! <recommends> ! <MP3Collection> ! < ! </MP3Collection> ! </recommends> ! ! --> ! ! ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Axel Goldmann</foaf:name> ! <foaf:mbox rdf:resource="mailto:axe...@ch..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Ruediger Suppin</foaf:name> ! <foaf:mbox rdf:resource="mailto:rs...@ya..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Bruno Randolf</foaf:name> ! <foaf:mbox rdf:resource="mailto:br...@su..."/> ! <foaf:pastProject rdf:resource="http://mprox.subnet.at"/> ! <foaf:pastProject rdf:resource="http://www.subnet.at"/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Nicole Oberrainer</foaf:name> ! <foaf:mbox rdf:resource="mailto:flo...@me..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Ruth Ettl</foaf:name> ! <foaf:mbox rdf:resource="mailto:ru...@su..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Josh Benda</foaf:name> ! <foaf:mbox rdf:resource="mailto:jos...@ho..."/> ! <foaf:pastProject rdf:resource="http://www.mudfuzz.com"/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Liz Turner</foaf:name> ! <foaf:nick>ephidrina</foaf:nick> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>David Baum</foaf:name> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Tamer Fahmy</foaf:name> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Michael Kalkusch</foaf:name> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Gerhard Reitmayr</foaf:name> ! <foaf:workplaceHomepage rdf:resource="http://www.ims.tuwien.ac.at/"/> ! </foaf:Person> ! </foaf:knows> ! ! </foaf:Person> ! ! </rdf:RDF> ! ! <!-- ! ! - mp3s ! - resources ! - organizations ! - trust ! ! (concepts, places, documents) ! ! ! usecases: ! - mitfahrgelegenheit ! - invitations ! - mp3 recommendation/sharing ! - brauche ! ! --> \ No newline at end of file --- 1,159 ---- ! <rdf:RDF ! xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" ! xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ! xmlns:foaf="http://xmlns.com/foaf/0.1/"> ! ! <foaf:Person> ! ! <foaf:name>Flo Ledermann</foaf:name> ! <foaf:firstName>Florian</foaf:firstName> ! <foaf:surname>Ledermann</foaf:surname> ! <foaf:nick>f/0</foaf:nick> ! ! <foaf:mbox rdf:resource="mailto:fl...@su..."/> ! <foaf:mbox rdf:resource="mailto:led...@im..."/> ! <foaf:jabberID>fl...@wa...</foaf:jabberID> ! ! <foaf:depiction rdf:resource="http://www.ims.tuwien.ac.at/~flo/images/flo.jpg"/> ! ! <foaf:gender rdf:resource="http://xmlns.com/foaf/0.1/Male"/> ! ! <foaf:homepage rdf:resource="http://www.mediavirus.org/f/0"/> ! <foaf:workplaceHomepage rdf:resource="http://www.ims.tuwien.ac.at/"/> ! <foaf:workInfoHomepage rdf:resource="http://www.ims.tuwien.ac.at/~flo"/> ! ! <foaf:myersBriggs>INFJ</foaf:myersBriggs> ! ! <foaf:interest rdf:resource="http://www.mozilla.org"/> ! <foaf:interest rdf:resource="http://rdfweb.org"/> ! <foaf:interest rdf:resource="http://www.studierstube.org"/> ! <foaf:interest rdf:resource="http://www.greeleynet.com/~cmorrison/WindMachine.html"/> ! ! <foaf:currentProject rdf:resource="http://www.studierstube.org/APRIL"/> ! <foaf:currentProject rdf:resource="http://www.studierstube.org/virtualshowcase"/> ! <foaf:currentProject rdf:resource="http://www.mediavirus.org/BllshtKdo"/> ! ! <foaf:pastProject rdf:resource="http://mprox.subnet.at"/> ! <foaf:pastProject rdf:resource="http://www.mudfuzz.com"/> ! <foaf:pastProject rdf:resource="http://www.subnet.at"/> ! ! <!-- ! <worksAt> ! <University> ! <foaf:homepage rdf:resource="http:www.tuwien.ac.at"/> ! <locatedAt> ! <geo:Point> ! <geo:lat></geo:lat> ! <geo:long></geo:long> ! </geo:Point> ! </locatedAt> ! </University> ! </worksAt> ! ! <owns> ! <car:Car id="BllshtKdo"> ! <car:license>A-W-67939J</car:license> ! <car:name>Bllsht Kdo</car:name> ! <car:maxPassengers>8</car:maxPassengers> ! <car:type rdf:resource="http://../Car/types/Van"/> ! </car:Car> ! </owns> ! ! <recommends> ! <MP3Collection> ! < ! </MP3Collection> ! </recommends> ! ! --> ! ! ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Axel Goldmann</foaf:name> ! <foaf:mbox rdf:resource="mailto:axe...@ch..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Ruediger Suppin</foaf:name> ! <foaf:mbox rdf:resource="mailto:rs...@ya..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Bruno Randolf</foaf:name> ! <foaf:mbox rdf:resource="mailto:br...@su..."/> ! <foaf:pastProject rdf:resource="http://mprox.subnet.at"/> ! <foaf:pastProject rdf:resource="http://www.subnet.at"/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Nicole Oberrainer</foaf:name> ! <foaf:mbox rdf:resource="mailto:flo...@me..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Ruth Ettl</foaf:name> ! <foaf:mbox rdf:resource="mailto:ru...@su..."/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Josh Benda</foaf:name> ! <foaf:mbox rdf:resource="mailto:jos...@ho..."/> ! <foaf:pastProject rdf:resource="http://www.mudfuzz.com"/> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Liz Turner</foaf:name> ! <foaf:nick>ephidrina</foaf:nick> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>David Baum</foaf:name> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Tamer Fahmy</foaf:name> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Michael Kalkusch</foaf:name> ! </foaf:Person> ! </foaf:knows> ! <foaf:knows> ! <foaf:Person> ! <foaf:name>Gerhard Reitmayr</foaf:name> ! <foaf:workplaceHomepage rdf:resource="http://www.ims.tuwien.ac.at/"/> ! </foaf:Person> ! </foaf:knows> ! ! </foaf:Person> ! ! </rdf:RDF> ! ! <!-- ! ! - mp3s ! - resources ! - organizations ! - trust ! ! (concepts, places, documents) ! ! ! usecases: ! - mitfahrgelegenheit ! - invitations ! - mp3 recommendation/sharing ! - brauche ! ! --> \ No newline at end of file Index: todo.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/todo.rdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** todo.rdf 23 Jul 2004 08:57:30 -0000 1.2 --- todo.rdf 19 Aug 2004 14:14:27 -0000 1.3 *************** *** 1,146 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <rdf:Description rdf:about="graphl" ! graphl:canvasPosition="180.46535260697928:-58.2113971473475"> ! <graphl:connectedTo rdf:resource="gui"/> ! <graphl:connectedTo rdf:resource="file_format"/> ! <graphl:connectedTo rdf:resource="filter"/> ! <graphl:connectedTo rdf:resource="register_vocabularies"/> ! <graphl:connectedTo rdf:resource="applet"/> ! <graphl:connectedTo rdf:resource="server"/> ! </rdf:Description> ! <rdf:Description rdf:about="gui" ! graphl:canvasPosition="-72.63142341415265:-76.51396931154423"> ! <graphl:connectedTo rdf:resource="node-gui"/> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="default_new_edge_type"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="file_format" ! graphl:canvasPosition="58.94008049045324:150.7737959813746"> ! <graphl:connectedTo rdf:resource="preserve_edge_length"/> ! </rdf:Description> ! <rdf:Description rdf:about="filter" ! graphl:canvasPosition="177.78722472411707:-258.3823721805617"/> ! <rdf:Description rdf:about="register_vocabularies" ! graphl:canvasPosition="299.8169623588565:68.26736483023576"> ! <graphl:connectedTo rdf:resource="working_set"/> ! </rdf:Description> ! <rdf:Description rdf:about="applet" ! graphl:canvasPosition="369.2571262730828:-115.82261504394246"> ! <graphl:connectedTo rdf:resource="save"/> ! </rdf:Description> ! <rdf:Description rdf:about="server" ! graphl:canvasPosition="356.0194287924907:-54.503413474555266"/> ! <rdf:Description rdf:about="node-gui" ! graphl:canvasPosition="73.59544196493582:32.228621381879364"> ! <graphl:connectedTo rdf:resource="wormholes"/> ! </rdf:Description> ! <rdf:Description rdf:about="node_styles" ! graphl:canvasPosition="-245.7668039537112:135.5464712153656"> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! <graphl:connectedTo rdf:resource="save_style_settings"/> ! <graphl:connectedTo rdf:resource="hubs"/> ! </rdf:Description> ! <rdf:Description rdf:about="default_new_edge_type" ! graphl:canvasPosition="-129.18783386539468:-239.0997872758084"/> ! <rdf:Description rdf:about="edge_styles" ! graphl:canvasPosition="-281.1011987924507:-62.2594838226987"> ! <graphl:connectedTo rdf:resource="save_style_settings"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! <graphl:connectedTo rdf:resource="refactor"/> ! </rdf:Description> ! <rdf:Description rdf:about="preserve_edge_length" ! graphl:canvasPosition="51.36574309367307:326.0866269132417"/> ! <rdf:Description rdf:about="working_set" ! graphl:canvasPosition="325.18130767860623:219.03008478035835"> ! <graphl:connectedTo rdf:resource="overlays"/> ! </rdf:Description> ! <rdf:Description rdf:about="save" ! graphl:canvasPosition="464.1633564155891:10.970428680472576"> ! <graphl:connectedTo rdf:resource="server"/> ! <graphl:connectedTo rdf:resource="overlays"/> ! </rdf:Description> ! <rdf:Description rdf:about="wormholes" ! graphl:canvasPosition="202.69273739319036:176.4777447734731"/> ! <rdf:Description rdf:about="expression_for_label/tooltip" ! graphl:canvasPosition="-240.67726954599823:267.22622722527274"> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! </rdf:Description> ! <rdf:Description rdf:about="save_style_settings" ! graphl:canvasPosition="-141.06235766400488:70.28869350700957"> ! <graphl:connectedTo rdf:resource="file_format"/> ! </rdf:Description> ! <rdf:Description rdf:about="hubs" ! graphl:canvasPosition="-392.1900808427072:248.85150043912432"/> ! <rdf:Description rdf:about="refactor" ! graphl:canvasPosition="-453.6107195165078:-20.618527540733666"> ! <graphl:connectedTo rdf:resource="layout"/> ! <graphl:connectedTo rdf:resource="label"/> ! </rdf:Description> ! <rdf:Description rdf:about="overlays" ! graphl:canvasPosition="441.14453942381033:189.13000512639925"/> ! <rdf:Description rdf:about="layout" ! graphl:canvasPosition="-536.5623669947698:-142.08020876907514"> ! <graphl:connectedTo rdf:resource="containership"/> ! </rdf:Description> ! <rdf:Description rdf:about="label" ! graphl:canvasPosition="-412.71708086422205:150.95870672019794"> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! </rdf:Description> ! <rdf:Description rdf:about="containership" ! graphl:canvasPosition="-421.8878872683254:-174.53912680316424"> ! <graphl:connectedTo rdf:resource="containership"/> ! <graphl:connectedTo rdf:resource="containership"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="properties" ! graphl:canvasPosition="-316.24949247707275:313.35055707206556"> ! <graphl:connectedTo rdf:resource="properties"/> ! <graphl:connectedTo rdf:resource="properties"/> ! <graphl:connectedTo rdf:resource="node_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="property_pages" ! graphl:canvasPosition="-333.5340562735571:34.01906118432125"> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="different_graphs_interlinked" ! graphl:canvasPosition="306.99503426846366:292.39581275810355"> ! <graphl:connectedTo rdf:resource="wormholes"/> ! <graphl:connectedTo rdf:resource="RDF"/> ! <graphl:connectedTo rdf:resource="overlays"/> ! </rdf:Description> ! <rdf:Description rdf:about="RDF" ! graphl:canvasPosition="156.3127540537625:298.9917056849947"> ! <graphl:connectedTo rdf:resource="RDFQL"/> ! <graphl:connectedTo rdf:resource="file_format"/> ! <graphl:connectedTo rdf:resource="working_set"/> ! </rdf:Description> ! <rdf:Description rdf:about="RDFQL" ! graphl:canvasPosition="-54.38586969762271:354.30878138520296"> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! </rdf:Description> ! <rdf:Description rdf:about="(time)_intervals" ! graphl:canvasPosition="97.50994757858429:-369.01470154688246"> ! <graphl:connectedTo rdf:resource="timeline"/> ! <graphl:connectedTo rdf:resource="filter"/> ! </rdf:Description> ! <rdf:Description rdf:about="timeline" ! graphl:canvasPosition="-5.394533124714548:-271.43045529260786"> ! <graphl:connectedTo rdf:resource="gui"/> ! </rdf:Description> ! ! </rdf:RDF> --- 1,146 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <rdf:Description rdf:about="graphl" ! graphl:canvasPosition="180.46535260697928:-58.2113971473475"> ! <graphl:connectedTo rdf:resource="gui"/> ! <graphl:connectedTo rdf:resource="file_format"/> ! <graphl:connectedTo rdf:resource="filter"/> ! <graphl:connectedTo rdf:resource="register_vocabularies"/> ! <graphl:connectedTo rdf:resource="applet"/> ! <graphl:connectedTo rdf:resource="server"/> ! </rdf:Description> ! <rdf:Description rdf:about="gui" ! graphl:canvasPosition="-72.63142341415265:-76.51396931154423"> ! <graphl:connectedTo rdf:resource="node-gui"/> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="default_new_edge_type"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="file_format" ! graphl:canvasPosition="58.94008049045324:150.7737959813746"> ! <graphl:connectedTo rdf:resource="preserve_edge_length"/> ! </rdf:Description> ! <rdf:Description rdf:about="filter" ! graphl:canvasPosition="177.78722472411707:-258.3823721805617"/> ! <rdf:Description rdf:about="register_vocabularies" ! graphl:canvasPosition="299.8169623588565:68.26736483023576"> ! <graphl:connectedTo rdf:resource="working_set"/> ! </rdf:Description> ! <rdf:Description rdf:about="applet" ! graphl:canvasPosition="369.2571262730828:-115.82261504394246"> ! <graphl:connectedTo rdf:resource="save"/> ! </rdf:Description> ! <rdf:Description rdf:about="server" ! graphl:canvasPosition="356.0194287924907:-54.503413474555266"/> ! <rdf:Description rdf:about="node-gui" ! graphl:canvasPosition="73.59544196493582:32.228621381879364"> ! <graphl:connectedTo rdf:resource="wormholes"/> ! </rdf:Description> ! <rdf:Description rdf:about="node_styles" ! graphl:canvasPosition="-245.7668039537112:135.5464712153656"> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! <graphl:connectedTo rdf:resource="save_style_settings"/> ! <graphl:connectedTo rdf:resource="hubs"/> ! </rdf:Description> ! <rdf:Description rdf:about="default_new_edge_type" ! graphl:canvasPosition="-129.18783386539468:-239.0997872758084"/> ! <rdf:Description rdf:about="edge_styles" ! graphl:canvasPosition="-281.1011987924507:-62.2594838226987"> ! <graphl:connectedTo rdf:resource="save_style_settings"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! <graphl:connectedTo rdf:resource="refactor"/> ! </rdf:Description> ! <rdf:Description rdf:about="preserve_edge_length" ! graphl:canvasPosition="51.36574309367307:326.0866269132417"/> ! <rdf:Description rdf:about="working_set" ! graphl:canvasPosition="325.18130767860623:219.03008478035835"> ! <graphl:connectedTo rdf:resource="overlays"/> ! </rdf:Description> ! <rdf:Description rdf:about="save" ! graphl:canvasPosition="464.1633564155891:10.970428680472576"> ! <graphl:connectedTo rdf:resource="server"/> ! <graphl:connectedTo rdf:resource="overlays"/> ! </rdf:Description> ! <rdf:Description rdf:about="wormholes" ! graphl:canvasPosition="202.69273739319036:176.4777447734731"/> ! <rdf:Description rdf:about="expression_for_label/tooltip" ! graphl:canvasPosition="-240.67726954599823:267.22622722527274"> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! </rdf:Description> ! <rdf:Description rdf:about="save_style_settings" ! graphl:canvasPosition="-141.06235766400488:70.28869350700957"> ! <graphl:connectedTo rdf:resource="file_format"/> ! </rdf:Description> ! <rdf:Description rdf:about="hubs" ! graphl:canvasPosition="-392.1900808427072:248.85150043912432"/> ! <rdf:Description rdf:about="refactor" ! graphl:canvasPosition="-453.6107195165078:-20.618527540733666"> ! <graphl:connectedTo rdf:resource="layout"/> ! <graphl:connectedTo rdf:resource="label"/> ! </rdf:Description> ! <rdf:Description rdf:about="overlays" ! graphl:canvasPosition="441.14453942381033:189.13000512639925"/> ! <rdf:Description rdf:about="layout" ! graphl:canvasPosition="-536.5623669947698:-142.08020876907514"> ! <graphl:connectedTo rdf:resource="containership"/> ! </rdf:Description> ! <rdf:Description rdf:about="label" ! graphl:canvasPosition="-412.71708086422205:150.95870672019794"> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! </rdf:Description> ! <rdf:Description rdf:about="containership" ! graphl:canvasPosition="-421.8878872683254:-174.53912680316424"> ! <graphl:connectedTo rdf:resource="containership"/> ! <graphl:connectedTo rdf:resource="containership"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="properties" ! graphl:canvasPosition="-316.24949247707275:313.35055707206556"> ! <graphl:connectedTo rdf:resource="properties"/> ! <graphl:connectedTo rdf:resource="properties"/> ! <graphl:connectedTo rdf:resource="node_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="property_pages" ! graphl:canvasPosition="-333.5340562735571:34.01906118432125"> ! <graphl:connectedTo rdf:resource="node_styles"/> ! <graphl:connectedTo rdf:resource="edge_styles"/> ! </rdf:Description> ! <rdf:Description rdf:about="different_graphs_interlinked" ! graphl:canvasPosition="306.99503426846366:292.39581275810355"> ! <graphl:connectedTo rdf:resource="wormholes"/> ! <graphl:connectedTo rdf:resource="RDF"/> ! <graphl:connectedTo rdf:resource="overlays"/> ! </rdf:Description> ! <rdf:Description rdf:about="RDF" ! graphl:canvasPosition="156.3127540537625:298.9917056849947"> ! <graphl:connectedTo rdf:resource="RDFQL"/> ! <graphl:connectedTo rdf:resource="file_format"/> ! <graphl:connectedTo rdf:resource="working_set"/> ! </rdf:Description> ! <rdf:Description rdf:about="RDFQL" ! graphl:canvasPosition="-54.38586969762271:354.30878138520296"> ! <graphl:connectedTo rdf:resource="expression_for_label/tooltip"/> ! </rdf:Description> ! <rdf:Description rdf:about="(time)_intervals" ! graphl:canvasPosition="97.50994757858429:-369.01470154688246"> ! <graphl:connectedTo rdf:resource="timeline"/> ! <graphl:connectedTo rdf:resource="filter"/> ! </rdf:Description> ! <rdf:Description rdf:about="timeline" ! graphl:canvasPosition="-5.394533124714548:-271.43045529260786"> ! <graphl:connectedTo rdf:resource="gui"/> ! </rdf:Description> ! ! </rdf:RDF> Index: test.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/test.rdf,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** test.rdf 27 Jul 2004 13:24:06 -0000 1.3 --- test.rdf 19 Aug 2004 14:14:27 -0000 1.4 *************** *** 1,21 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <rdf:Gaga rdf:about="node0" ! graphl:hasLabel="Node 0" ! graphl:canvasPosition="-74.26063988745234:-10.214864217370325"> ! <graphl:connectedTo rdf:resource="node1"/> ! </rdf:Gaga> ! <rdf:Gaga rdf:about="node1" ! graphl:hasLabel="Node 1" ! graphl:canvasPosition="-150.70440130568647:-62.88553683865669"> ! </rdf:Gaga> ! ! </rdf:RDF> --- 1,21 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <rdf:Gaga rdf:about="node0" ! graphl:hasLabel="Node 0" ! graphl:canvasPosition="-74.26063988745234:-10.214864217370325"> ! <graphl:connectedTo rdf:resource="node1"/> ! </rdf:Gaga> ! <rdf:Gaga rdf:about="node1" ! graphl:hasLabel="Node 1" ! graphl:canvasPosition="-150.70440130568647:-62.88553683865669"> ! </rdf:Gaga> ! ! </rdf:RDF> Index: default.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/graphs/default.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** default.rdf 27 Jul 2004 13:24:06 -0000 1.1 --- default.rdf 19 Aug 2004 14:14:27 -0000 1.2 *************** *** 1,15 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! <rdf:seeAlso rdf:about="../config/config.rdf"/> ! </graphl:Configuration> ! </rdf:RDF> \ No newline at end of file --- 1,15 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! <rdf:seeAlso rdf:about="../config/config.rdf"/> ! </graphl:Configuration> ! </rdf:RDF> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-19 14:14:40
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12443/config Modified Files: vocabularies.rdf facets.rdf Log Message: changed cvs mode for rdf files Index: vocabularies.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/vocabularies.rdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** vocabularies.rdf 5 Aug 2004 08:50:44 -0000 1.2 --- vocabularies.rdf 19 Aug 2004 14:14:28 -0000 1.3 *************** *** 1,319 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY dc 'http://purl.org/dc/elements/1.1/'> ! <!ENTITY rss 'http://purl.org/rss/1.0/'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! ! <graphl:registeredNamespaces> ! <rdf:Bag> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="graphl" ! graphl:uri="http://www.mediavirus.org/graphl#"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="foaf" ! graphl:uri="http://xmlns.com/foaf/0.1/"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="rdf" ! graphl:uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="dc" ! graphl:uri="http://purl.org/dc/elements/1.1/"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="rss" ! graphl:uri="http://purl.org/rss/1.0/"/> ! </rdf:li> ! </rdf:Bag> ! </graphl:registeredNamespaces> ! ! <graphl:registeredVocabularies> ! <rdf:Seq> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Document metadata" ! graphl:description=""> ! <graphl:resources> ! <rdf:Bag> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Content properties" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="title" ! graphl:description="The title of a document"> ! <graphl:property rdf:resource="&dc;title"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="description" ! graphl:description="Description (Abstract) of the document's content"> ! <graphl:property rdf:resource="&dc;description"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="subject" ! graphl:description="The subject of a document"> ! <graphl:property rdf:resource="&dc;subject"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Associated Persons" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="creator" ! graphl:description="The creator of a document"> ! <graphl:property rdf:resource="&dc;creator"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="contributor" ! graphl:description="An entity who contributed to the document"> ! <graphl:property rdf:resource="&dc;contributor"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="publisher" ! graphl:description="The publisher of a document"> ! <graphl:property rdf:resource="&dc;publisher"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Metadata" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="type" ! graphl:description="The type of the document"> ! <graphl:property rdf:resource="&dc;type"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="language" ! graphl:description="The language(s) the document is written in"> ! <graphl:property rdf:resource="&dc;language"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="format" ! graphl:description="The format of the document"> ! <graphl:property rdf:resource="&dc;format"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Intellectual property" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="rights" ! graphl:description="Generic description of copyrights"> ! <graphl:property rdf:resource="&dc;rights"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! </graphl:Vocabulary> ! </rdf:li> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Data Structures" ! graphl:description=""> ! <graphl:resources> ! <rdf:Bag> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Containers" ! graphl:description=""> ! <graphl:types> ! <rdf:Bag> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Bag" ! graphl:description="A Bag contains an unordered collection of resources, each connected with an rdf:li property"> ! <graphl:class rdf:resource="&rdf;Bag"/> ! </graphl:TypeDescription> ! </rdf:li> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Alternative" ! graphl:description="A collection of resources that can be used alternatively, each connected with an rdf:li property"> ! <graphl:class rdf:resource="&rdf;Alt"/> ! </graphl:TypeDescription> ! </rdf:li> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Sequence" ! graphl:description="A group of resources or literals, possibly including duplicate members, where the order of the members is significant. Each is connected with an rdf:li property."> ! <graphl:class rdf:resource="&rdf;Seq"/> ! </graphl:TypeDescription> ! </rdf:li> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="List" ! graphl:description="A linked list, ending with rdf:nil"> ! <graphl:class rdf:resource="&rdf;List"/> ! </graphl:TypeDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:types> ! <graphl:resources> ! <rdf:Bag> ! <rdf:li> ! <graphl:ResourceDescription ! graphl:name="NIL" ! graphl:description="End of a list"> ! <graphl:resource rdf:resource="&rdf;nil"/> ! </graphl:ResourceDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="Collection item" ! graphl:description="An item in a collection"> ! <graphl:property rdf:resource="&rdf;li"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="First list item" ! graphl:description="First item of a list"> ! <graphl:property rdf:resource="&rdf;first"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="Rest of list" ! graphl:description="The remainder of a list"> ! <graphl:property rdf:resource="&rdf;rest"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Complex Data Structures" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="value" ! graphl:description="The main value of a structured value"> ! <graphl:property rdf:resource="&rdf;value"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! </graphl:Vocabulary> ! </rdf:li> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Reification" ! graphl:description=""> ! <graphl:types> ! <rdf:Bag> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Statement" ! graphl:description="An RDF statement"> ! <graphl:class rdf:resource="&rdf;Statement"/> ! </graphl:TypeDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:types> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="subject" ! graphl:description="The subject of a statement"> ! <graphl:property rdf:resource="&rdf;subject"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="predicate" ! graphl:description="The predicate of a statement"> ! <graphl:property rdf:resource="&rdf;predicate"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="object" ! graphl:description="The object of a statement"> ! <graphl:property rdf:resource="&rdf;object"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:Vocabulary> ! ! </rdf:li> ! </rdf:Seq> ! </graphl:registeredVocabularies> ! ! ! </graphl:Configuration> ! </rdf:RDF> \ No newline at end of file --- 1,319 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! <!ENTITY dc 'http://purl.org/dc/elements/1.1/'> ! <!ENTITY rss 'http://purl.org/rss/1.0/'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! ! <graphl:registeredNamespaces> ! <rdf:Bag> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="graphl" ! graphl:uri="http://www.mediavirus.org/graphl#"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="foaf" ! graphl:uri="http://xmlns.com/foaf/0.1/"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="rdf" ! graphl:uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="dc" ! graphl:uri="http://purl.org/dc/elements/1.1/"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="rss" ! graphl:uri="http://purl.org/rss/1.0/"/> ! </rdf:li> ! </rdf:Bag> ! </graphl:registeredNamespaces> ! ! <graphl:registeredVocabularies> ! <rdf:Seq> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Document metadata" ! graphl:description=""> ! <graphl:resources> ! <rdf:Bag> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Content properties" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="title" ! graphl:description="The title of a document"> ! <graphl:property rdf:resource="&dc;title"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="description" ! graphl:description="Description (Abstract) of the document's content"> ! <graphl:property rdf:resource="&dc;description"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="subject" ! graphl:description="The subject of a document"> ! <graphl:property rdf:resource="&dc;subject"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Associated Persons" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="creator" ! graphl:description="The creator of a document"> ! <graphl:property rdf:resource="&dc;creator"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="contributor" ! graphl:description="An entity who contributed to the document"> ! <graphl:property rdf:resource="&dc;contributor"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="publisher" ! graphl:description="The publisher of a document"> ! <graphl:property rdf:resource="&dc;publisher"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Metadata" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="type" ! graphl:description="The type of the document"> ! <graphl:property rdf:resource="&dc;type"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="language" ! graphl:description="The language(s) the document is written in"> ! <graphl:property rdf:resource="&dc;language"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="format" ! graphl:description="The format of the document"> ! <graphl:property rdf:resource="&dc;format"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Intellectual property" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="rights" ! graphl:description="Generic description of copyrights"> ! <graphl:property rdf:resource="&dc;rights"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! </graphl:Vocabulary> ! </rdf:li> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Data Structures" ! graphl:description=""> ! <graphl:resources> ! <rdf:Bag> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Containers" ! graphl:description=""> ! <graphl:types> ! <rdf:Bag> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Bag" ! graphl:description="A Bag contains an unordered collection of resources, each connected with an rdf:li property"> ! <graphl:class rdf:resource="&rdf;Bag"/> ! </graphl:TypeDescription> ! </rdf:li> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Alternative" ! graphl:description="A collection of resources that can be used alternatively, each connected with an rdf:li property"> ! <graphl:class rdf:resource="&rdf;Alt"/> ! </graphl:TypeDescription> ! </rdf:li> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Sequence" ! graphl:description="A group of resources or literals, possibly including duplicate members, where the order of the members is significant. Each is connected with an rdf:li property."> ! <graphl:class rdf:resource="&rdf;Seq"/> ! </graphl:TypeDescription> ! </rdf:li> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="List" ! graphl:description="A linked list, ending with rdf:nil"> ! <graphl:class rdf:resource="&rdf;List"/> ! </graphl:TypeDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:types> ! <graphl:resources> ! <rdf:Bag> ! <rdf:li> ! <graphl:ResourceDescription ! graphl:name="NIL" ! graphl:description="End of a list"> ! <graphl:resource rdf:resource="&rdf;nil"/> ! </graphl:ResourceDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="Collection item" ! graphl:description="An item in a collection"> ! <graphl:property rdf:resource="&rdf;li"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="First list item" ! graphl:description="First item of a list"> ! <graphl:property rdf:resource="&rdf;first"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="Rest of list" ! graphl:description="The remainder of a list"> ! <graphl:property rdf:resource="&rdf;rest"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Complex Data Structures" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="value" ! graphl:description="The main value of a structured value"> ! <graphl:property rdf:resource="&rdf;value"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! </graphl:Vocabulary> ! </rdf:li> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Reification" ! graphl:description=""> ! <graphl:types> ! <rdf:Bag> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Statement" ! graphl:description="An RDF statement"> ! <graphl:class rdf:resource="&rdf;Statement"/> ! </graphl:TypeDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:types> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="subject" ! graphl:description="The subject of a statement"> ! <graphl:property rdf:resource="&rdf;subject"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="predicate" ! graphl:description="The predicate of a statement"> ! <graphl:property rdf:resource="&rdf;predicate"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="object" ! graphl:description="The object of a statement"> ! <graphl:property rdf:resource="&rdf;object"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:Vocabulary> ! ! </rdf:li> ! </rdf:Seq> ! </graphl:registeredVocabularies> ! ! ! </graphl:Configuration> ! </rdf:RDF> \ No newline at end of file Index: facets.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/facets.rdf,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** facets.rdf 5 Aug 2004 08:50:44 -0000 1.2 --- facets.rdf 19 Aug 2004 14:14:28 -0000 1.3 *************** *** 1,156 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineType="dotted"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! </graphl:Configuration> \ No newline at end of file --- 1,156 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:foaf="&foaf;" ! xmlns:rdf="&rdf;"> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:assignedEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! <graphl:assignedEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" ! graphl:paintArrow="false" ! graphl:paintLabel="false" ! graphl:lineType="dotted"> ! <graphl:assignedToType rdf:resource="&rdf;type"/> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedEdgePainters> ! </graphl:Configuration> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-19 14:14:06
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12274/config Modified Files: config.rdf Log Message: changed cvs mode for rdf files Index: config.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/config.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** config.rdf 27 Jul 2004 13:24:06 -0000 1.1 --- config.rdf 19 Aug 2004 14:13:54 -0000 1.2 *************** *** 1,135 **** ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <!--<graphl:Configuration> ! <rdf:seeAlso rdf:about="facets.rdf"/> ! <rdf:seeAlso rdf:about="vocabularies.rdf"/> ! </graphl:Configuration>--> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file --- 1,135 ---- ! <?xml version='1.0' encoding='UTF-8'?> ! <!DOCTYPE rdf:RDF [ ! <!ENTITY graphl 'http://www.mediavirus.org/graphl#'> ! <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> ! ]> ! ! <rdf:RDF xml:base="" ! xmlns:graphl="&graphl;" ! xmlns:rdf="&rdf;"> ! ! <!--<graphl:Configuration> ! <rdf:seeAlso rdf:about="facets.rdf"/> ! <rdf:seeAlso rdf:about="vocabularies.rdf"/> ! </graphl:Configuration>--> ! ! <graphl:Configuration> ! ! <graphl:availableNodeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.UnconstrainedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.RepulsionNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.AbsoluteNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:NodeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SortedNodeLayouter"> ! </graphl:NodeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodeLayouters> ! ! <graphl:availableNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.ImageNodePainter"> ! <graphl:defaultImage> ! <graphl:Image rdf:about="http://www.mediavirus.org/graphl/images/default.gif"/> ! </graphl:defaultImage> ! </graphl:NodePainter> ! </rdf:li> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleNodePainter"> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableNodePainters> ! ! <graphl:assignedNodePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:NodePainter ! graphl:javaClass="org.mediavirus.graphl.view.BoxNodePainter" ! graphl:backgoundColor="#66ff66"> ! <graphl:labelGenerator> ! <graphl:LabelGenerator> ! <graphl:labelFacets> ! <rdf:List> ! <rdf:first> ! <graphl:LabelFacet ! graphl:labelFacetType="String" ! graphl:labelFacetValue="Person: "/> ! </rdf:first> ! <rdf:rest> ! <graphl:LabelFacet ! graphl:labelFacetType="Property" ! graphl:labelFacetValue="&foaf;name"/> ! </rdf:rest> ! </rdf:List> ! </graphl:labelFacets> ! </graphl:LabelGenerator> ! </graphl:labelGenerator> ! <graphl:assignedToType> ! <rdfs:Class rdf:about="http://xmlns.com/foaf/0.1/Person"/> ! </graphl:assignedToType> ! </graphl:NodePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:assignedNodePainters> ! ! ! <graphl:availableEdgeLayouters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.SpringEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgeLayouter ! graphl:javaClass="org.mediavirus.graphl.layout.NeutralEdgeLayouter"> ! </graphl:EdgeLayouter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgeLayouters> ! ! <graphl:availableEdgePainters> ! <rdf:Bag> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.ManhattanEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! <rdf:li> ! <graphl:EdgePainter ! graphl:javaClass="org.mediavirus.graphl.view.InvisibleEdgePainter"> ! </graphl:EdgePainter> ! </rdf:li> ! </rdf:Bag> ! </graphl:availableEdgePainters> ! ! </graphl:Configuration> </rdf:RDF> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-05 08:50:54
|
Update of /cvsroot/graphl/graphl/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14721/config Modified Files: vocabularies.rdf facets.rdf Log Message: added content to config file mockups Index: vocabularies.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/vocabularies.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** vocabularies.rdf 27 Jul 2004 13:24:06 -0000 1.1 --- vocabularies.rdf 5 Aug 2004 08:50:44 -0000 1.2 *************** *** 4,7 **** --- 4,9 ---- <!ENTITY foaf 'http://xmlns.com/foaf/0.1/'> <!ENTITY rdf 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'> + <!ENTITY dc 'http://purl.org/dc/elements/1.1/'> + <!ENTITY rss 'http://purl.org/rss/1.0/'> ]> *************** *** 17,22 **** <rdf:li> <graphl:Namespace ! graphl:defaultPrefix="" ! graphl:uri=""/> </rdf:li> </rdf:Bag> --- 19,44 ---- <rdf:li> <graphl:Namespace ! graphl:defaultPrefix="graphl" ! graphl:uri="http://www.mediavirus.org/graphl#"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="foaf" ! graphl:uri="http://xmlns.com/foaf/0.1/"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="rdf" ! graphl:uri="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="dc" ! graphl:uri="http://purl.org/dc/elements/1.1/"/> ! </rdf:li> ! <rdf:li> ! <graphl:Namespace ! graphl:defaultPrefix="rss" ! graphl:uri="http://purl.org/rss/1.0/"/> </rdf:li> </rdf:Bag> *************** *** 24,164 **** <graphl:registeredVocabularies> ! <rdf:Bag> <rdf:li> <graphl:Vocabulary ! graphl:name="Annotation" graphl:description=""> <graphl:resources> - <graphl:ResourceGroup - graphl:name="" - graphl:description=""> - <graphl:classes> - <rdf:Bag> - <rdf:li> - <graphl:ClassDescription - graphl:name="" - graphl:description=""> - <graphl:class rdf:resource=""/> - </graphl:ClassDescription> - </rdf:li> - </rdf:Bag> - </graphl:classes> - </graphl:ResourceGroup> - </graphl:resources> - <graphl:resources> <rdf:Bag> <rdf:li> <graphl:ResourceGroup ! graphl:name="" graphl:description=""> ! <graphl:resources> <rdf:Bag> <rdf:li> ! <graphl:ResourceDescription ! graphl:name="" ! graphl:description=""> ! <graphl:resource rdf:resource=""/> ! </graphl:ResourceDescription> </rdf:li> </rdf:Bag> ! </graphl:resources> </graphl:ResourceGroup> </rdf:li> - </rdf:Bag> - </graphl:resources> - <graphl:properties> - <rdf:Bag> <rdf:li> ! <graphl:PropertyGroup ! graphl:name="" graphl:description=""> ! <graphl:resources> <rdf:Bag> <rdf:li> <graphl:PropertyDescription ! graphl:name="" ! graphl:description=""> ! <graphl:property rdf:resource=""/> </graphl:PropertyDescription> </rdf:li> </rdf:Bag> ! </graphl:resources> ! </graphl:PropertyGroup> </rdf:li> - </rdf:Bag> - </graphl:properties> - </graphl:Vocabulary> - - <graphl:Vocabulary - graphl:name="Data Structures" - graphl:description=""> - <graphl:classes> - <rdf:Bag> <rdf:li> ! <graphl:ClassGroup ! graphl:name="" graphl:description=""> ! <graphl:classes> <rdf:Bag> <rdf:li> ! <graphl:ClassDescription ! graphl:name="" ! graphl:description=""> ! <graphl:class rdf:resource=""/> ! </graphl:ClassDescription> </rdf:li> </rdf:Bag> ! </graphl:classes> ! </graphl:ClassGroup> </rdf:li> </rdf:Bag> ! </graphl:classes> <graphl:resources> <rdf:Bag> <rdf:li> <graphl:ResourceGroup ! graphl:name="" graphl:description=""> <graphl:resources> <rdf:Bag> <rdf:li> <graphl:ResourceDescription ! graphl:name="" ! graphl:description=""> ! <graphl:resource rdf:resource=""/> </graphl:ResourceDescription> </rdf:li> </rdf:Bag> </graphl:resources> </graphl:ResourceGroup> </rdf:li> - </rdf:Bag> - </graphl:resources> - <graphl:properties> - <rdf:Bag> <rdf:li> ! <graphl:PropertyGroup ! graphl:name="" graphl:description=""> ! <graphl:resources> <rdf:Bag> <rdf:li> <graphl:PropertyDescription ! graphl:name="" ! graphl:description=""> ! <graphl:property rdf:resource=""/> </graphl:PropertyDescription> </rdf:li> </rdf:Bag> ! </graphl:resources> ! </graphl:PropertyGroup> </rdf:li> </rdf:Bag> </graphl:properties> </graphl:Vocabulary> </rdf:li> ! </rdf:Bag> </graphl:registeredVocabularies> ! </graphl:Configuration> \ No newline at end of file --- 46,319 ---- <graphl:registeredVocabularies> ! <rdf:Seq> <rdf:li> <graphl:Vocabulary ! graphl:name="Document metadata" graphl:description=""> <graphl:resources> <rdf:Bag> <rdf:li> <graphl:ResourceGroup ! graphl:name="Content properties" graphl:description=""> ! <graphl:properties> <rdf:Bag> <rdf:li> ! <graphl:PropertyDescription ! graphl:name="title" ! graphl:description="The title of a document"> ! <graphl:property rdf:resource="&dc;title"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="description" ! graphl:description="Description (Abstract) of the document's content"> ! <graphl:property rdf:resource="&dc;description"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="subject" ! graphl:description="The subject of a document"> ! <graphl:property rdf:resource="&dc;subject"/> ! </graphl:PropertyDescription> </rdf:li> </rdf:Bag> ! </graphl:properties> </graphl:ResourceGroup> </rdf:li> <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Associated Persons" graphl:description=""> ! <graphl:properties> <rdf:Bag> <rdf:li> <graphl:PropertyDescription ! graphl:name="creator" ! graphl:description="The creator of a document"> ! <graphl:property rdf:resource="&dc;creator"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="contributor" ! graphl:description="An entity who contributed to the document"> ! <graphl:property rdf:resource="&dc;contributor"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="publisher" ! graphl:description="The publisher of a document"> ! <graphl:property rdf:resource="&dc;publisher"/> </graphl:PropertyDescription> </rdf:li> </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> </rdf:li> <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Metadata" graphl:description=""> ! <graphl:properties> <rdf:Bag> <rdf:li> ! <graphl:PropertyDescription ! graphl:name="type" ! graphl:description="The type of the document"> ! <graphl:property rdf:resource="&dc;type"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="language" ! graphl:description="The language(s) the document is written in"> ! <graphl:property rdf:resource="&dc;language"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="format" ! graphl:description="The format of the document"> ! <graphl:property rdf:resource="&dc;format"/> ! </graphl:PropertyDescription> </rdf:li> </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Intellectual property" ! graphl:description=""> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="rights" ! graphl:description="Generic description of copyrights"> ! <graphl:property rdf:resource="&dc;rights"/> ! </graphl:PropertyDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> </rdf:li> </rdf:Bag> ! </graphl:resources> ! </graphl:Vocabulary> ! </rdf:li> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Data Structures" ! graphl:description=""> <graphl:resources> <rdf:Bag> <rdf:li> <graphl:ResourceGroup ! graphl:name="Containers" graphl:description=""> + <graphl:types> + <rdf:Bag> + <rdf:li> + <graphl:TypeDescription + graphl:name="Bag" + graphl:description="A Bag contains an unordered collection of resources, each connected with an rdf:li property"> + <graphl:class rdf:resource="&rdf;Bag"/> + </graphl:TypeDescription> + </rdf:li> + <rdf:li> + <graphl:TypeDescription + graphl:name="Alternative" + graphl:description="A collection of resources that can be used alternatively, each connected with an rdf:li property"> + <graphl:class rdf:resource="&rdf;Alt"/> + </graphl:TypeDescription> + </rdf:li> + <rdf:li> + <graphl:TypeDescription + graphl:name="Sequence" + graphl:description="A group of resources or literals, possibly including duplicate members, where the order of the members is significant. Each is connected with an rdf:li property."> + <graphl:class rdf:resource="&rdf;Seq"/> + </graphl:TypeDescription> + </rdf:li> + <rdf:li> + <graphl:TypeDescription + graphl:name="List" + graphl:description="A linked list, ending with rdf:nil"> + <graphl:class rdf:resource="&rdf;List"/> + </graphl:TypeDescription> + </rdf:li> + </rdf:Bag> + </graphl:types> <graphl:resources> <rdf:Bag> <rdf:li> <graphl:ResourceDescription ! graphl:name="NIL" ! graphl:description="End of a list"> ! <graphl:resource rdf:resource="&rdf;nil"/> </graphl:ResourceDescription> </rdf:li> </rdf:Bag> </graphl:resources> + <graphl:properties> + <rdf:Bag> + <rdf:li> + <graphl:PropertyDescription + graphl:name="Collection item" + graphl:description="An item in a collection"> + <graphl:property rdf:resource="&rdf;li"/> + </graphl:PropertyDescription> + </rdf:li> + <rdf:li> + <graphl:PropertyDescription + graphl:name="First list item" + graphl:description="First item of a list"> + <graphl:property rdf:resource="&rdf;first"/> + </graphl:PropertyDescription> + </rdf:li> + <rdf:li> + <graphl:PropertyDescription + graphl:name="Rest of list" + graphl:description="The remainder of a list"> + <graphl:property rdf:resource="&rdf;rest"/> + </graphl:PropertyDescription> + </rdf:li> + </rdf:Bag> + </graphl:properties> </graphl:ResourceGroup> </rdf:li> <rdf:li> ! <graphl:ResourceGroup ! graphl:name="Complex Data Structures" graphl:description=""> ! <graphl:properties> <rdf:Bag> <rdf:li> <graphl:PropertyDescription ! graphl:name="value" ! graphl:description="The main value of a structured value"> ! <graphl:property rdf:resource="&rdf;value"/> </graphl:PropertyDescription> </rdf:li> </rdf:Bag> ! </graphl:properties> ! </graphl:ResourceGroup> ! </rdf:li> ! </rdf:Bag> ! </graphl:resources> ! </graphl:Vocabulary> ! </rdf:li> ! <rdf:li> ! <graphl:Vocabulary ! graphl:name="Reification" ! graphl:description=""> ! <graphl:types> ! <rdf:Bag> ! <rdf:li> ! <graphl:TypeDescription ! graphl:name="Statement" ! graphl:description="An RDF statement"> ! <graphl:class rdf:resource="&rdf;Statement"/> ! </graphl:TypeDescription> ! </rdf:li> ! </rdf:Bag> ! </graphl:types> ! <graphl:properties> ! <rdf:Bag> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="subject" ! graphl:description="The subject of a statement"> ! <graphl:property rdf:resource="&rdf;subject"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="predicate" ! graphl:description="The predicate of a statement"> ! <graphl:property rdf:resource="&rdf;predicate"/> ! </graphl:PropertyDescription> ! </rdf:li> ! <rdf:li> ! <graphl:PropertyDescription ! graphl:name="object" ! graphl:description="The object of a statement"> ! <graphl:property rdf:resource="&rdf;object"/> ! </graphl:PropertyDescription> </rdf:li> </rdf:Bag> </graphl:properties> </graphl:Vocabulary> + </rdf:li> ! </rdf:Seq> </graphl:registeredVocabularies> ! </graphl:Configuration> ! ! </rdf:RDF> \ No newline at end of file Index: facets.rdf =================================================================== RCS file: /cvsroot/graphl/graphl/config/facets.rdf,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** facets.rdf 27 Jul 2004 13:24:06 -0000 1.1 --- facets.rdf 5 Aug 2004 08:50:44 -0000 1.2 *************** *** 108,111 **** --- 108,122 ---- </rdf:Bag> </graphl:availableEdgeLayouters> + + <graphl:assignedEdgeLayouters> + <rdf:Bag> + <rdf:li> + <graphl:EdgeLayouter + graphl:javaClass="org.mediavirus.graphl.view.NeutralEdgeLayouter"> + <graphl:assignedToType rdf:resource="&rdf;type"/> + </graphl:EdgeLayouter> + </rdf:li> + </rdf:Bag> + </graphl:assignedEdgeLayouters> <graphl:availableEdgePainters> *************** *** 128,131 **** --- 139,156 ---- </rdf:Bag> </graphl:availableEdgePainters> + + <graphl:assignedEdgePainters> + <rdf:Bag> + <rdf:li> + <graphl:EdgePainter + graphl:javaClass="org.mediavirus.graphl.view.StraightLineEdgePainter" + graphl:paintArrow="false" + graphl:paintLabel="false" + graphl:lineType="dotted"> + <graphl:assignedToType rdf:resource="&rdf;type"/> + </graphl:EdgePainter> + </rdf:li> + </rdf:Bag> + </graphl:assignedEdgePainters> </graphl:Configuration> \ No newline at end of file |
From: Flo L. <fl...@us...> - 2004-08-02 12:37:12
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl/layout Modified Files: RepulsionNodeLayouter.java NeutralEdgeLayouter.java SortedNodeLayouter.java AbsoluteNodeLayouter.java NodeLayouter.java UnconstrainedNodeLayouter.java EdgeLayouter.java SpringEdgeLayouter.java GraphlLayoutStrategy.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure Index: AbsoluteNodeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/AbsoluteNodeLayouter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AbsoluteNodeLayouter.java 23 Jul 2004 08:57:30 -0000 1.2 --- AbsoluteNodeLayouter.java 2 Aug 2004 12:36:31 -0000 1.3 *************** *** 48,52 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#hasVisualController() */ public boolean hasVisualController() { --- 48,52 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#hasVisualController() */ public boolean hasVisualController() { *************** *** 55,59 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#getVisualController() */ public JComponent getVisualController() { --- 55,59 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#getVisualController() */ public JComponent getVisualController() { *************** *** 62,66 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { --- 62,66 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { *************** *** 124,128 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#getName() */ public String getName() { --- 124,128 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#getName() */ public String getName() { Index: NodeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/NodeLayouter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NodeLayouter.java 7 Jul 2004 17:53:20 -0000 1.1 --- NodeLayouter.java 2 Aug 2004 12:36:31 -0000 1.2 *************** *** 6,10 **** import org.mediavirus.graphl.graph.Node; ! import org.mediavirus.graphl.view.AssignableGraphController; /** --- 6,10 ---- import org.mediavirus.graphl.graph.Node; ! import org.mediavirus.graphl.view.Facet; /** *************** *** 12,16 **** * created: 06.07.2004 16:14:41 */ ! public interface NodeLayouter extends AssignableGraphController { public void performLayoutStep(Node node, GraphlLayoutStrategy.GraphManager manager); --- 12,16 ---- * created: 06.07.2004 16:14:41 */ ! public interface NodeLayouter extends Facet { public void performLayoutStep(Node node, GraphlLayoutStrategy.GraphManager manager); Index: EdgeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/EdgeLayouter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EdgeLayouter.java 12 Jul 2004 11:48:51 -0000 1.2 --- EdgeLayouter.java 2 Aug 2004 12:36:31 -0000 1.3 *************** *** 6,10 **** import org.mediavirus.graphl.graph.rdf.RDFEdge; ! import org.mediavirus.graphl.view.AssignableGraphController; --- 6,10 ---- import org.mediavirus.graphl.graph.rdf.RDFEdge; ! import org.mediavirus.graphl.view.Facet; *************** *** 13,17 **** * created: 09.06.2004 11:37:37 */ ! public interface EdgeLayouter extends AssignableGraphController { public void performLayoutStep(RDFEdge edge, GraphlLayoutStrategy.GraphManager manager); --- 13,17 ---- * created: 09.06.2004 11:37:37 */ ! public interface EdgeLayouter extends Facet { public void performLayoutStep(RDFEdge edge, GraphlLayoutStrategy.GraphManager manager); Index: UnconstrainedNodeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/UnconstrainedNodeLayouter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** UnconstrainedNodeLayouter.java 23 Jul 2004 08:57:30 -0000 1.3 --- UnconstrainedNodeLayouter.java 2 Aug 2004 12:36:31 -0000 1.4 *************** *** 51,55 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#hasVisualController() */ public boolean hasVisualController() { --- 51,55 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#hasVisualController() */ public boolean hasVisualController() { *************** *** 58,62 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#getVisualController() */ public JComponent getVisualController() { --- 58,62 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#getVisualController() */ public JComponent getVisualController() { *************** *** 65,69 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { --- 65,69 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { Index: SortedNodeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/SortedNodeLayouter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SortedNodeLayouter.java 27 Jul 2004 13:24:05 -0000 1.2 --- SortedNodeLayouter.java 2 Aug 2004 12:36:31 -0000 1.3 *************** *** 117,121 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#hasVisualController() */ public boolean hasVisualController() { --- 117,121 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#hasVisualController() */ public boolean hasVisualController() { *************** *** 124,128 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#getVisualController() */ public JComponent getVisualController() { --- 124,128 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#getVisualController() */ public JComponent getVisualController() { *************** *** 131,135 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { --- 131,135 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { Index: GraphlLayoutStrategy.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/GraphlLayoutStrategy.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GraphlLayoutStrategy.java 27 Jul 2004 13:24:05 -0000 1.5 --- GraphlLayoutStrategy.java 2 Aug 2004 12:36:32 -0000 1.6 *************** *** 6,14 **** import java.util.Iterator; - import org.mediavirus.graphl.PainterRegistry; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Graph; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.graph.rdf.RDFEdge; /** --- 6,14 ---- import java.util.Iterator; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Graph; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.graph.rdf.RDFEdge; + import org.mediavirus.graphl.view.FacetRegistry; /** *************** *** 25,29 **** protected GraphManager graphManager; ! protected PainterRegistry painterRegistry; /** The damper value. A low damper value causes the graph to move slowly. A value of 1 means no damping. */ --- 25,29 ---- protected GraphManager graphManager; ! protected FacetRegistry painterRegistry; /** The damper value. A low damper value causes the graph to move slowly. A value of 1 means no damping. */ *************** *** 41,45 **** * @param graph the graph that is active */ ! public GraphlLayoutStrategy(Graph graph, PainterRegistry reg) { this.graph=graph; graphManager=new GraphManager(); --- 41,45 ---- * @param graph the graph that is active */ ! public GraphlLayoutStrategy(Graph graph, FacetRegistry reg) { this.graph=graph; graphManager=new GraphManager(); Index: RepulsionNodeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/RepulsionNodeLayouter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RepulsionNodeLayouter.java 27 Jul 2004 13:24:05 -0000 1.1 --- RepulsionNodeLayouter.java 2 Aug 2004 12:36:31 -0000 1.2 *************** *** 84,88 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#hasVisualController() */ public boolean hasVisualController() { --- 84,88 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#hasVisualController() */ public boolean hasVisualController() { *************** *** 91,95 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#getVisualController() */ public JComponent getVisualController() { --- 91,95 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#getVisualController() */ public JComponent getVisualController() { *************** *** 98,102 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { --- 98,102 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { Index: SpringEdgeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/SpringEdgeLayouter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** SpringEdgeLayouter.java 23 Jul 2004 08:57:30 -0000 1.4 --- SpringEdgeLayouter.java 2 Aug 2004 12:36:31 -0000 1.5 *************** *** 49,53 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#getStyleName() */ public String getStyleName() { --- 49,53 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#getStyleName() */ public String getStyleName() { *************** *** 60,64 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#hasVisualController() */ public boolean hasVisualController() { --- 60,64 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#hasVisualController() */ public boolean hasVisualController() { *************** *** 67,71 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#getVisualController() */ public JComponent getVisualController() { --- 67,71 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#getVisualController() */ public JComponent getVisualController() { *************** *** 74,78 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { --- 74,78 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { *************** *** 81,85 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#clone() */ public Object clone() { --- 81,85 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#clone() */ public Object clone() { Index: NeutralEdgeLayouter.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/layout/NeutralEdgeLayouter.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** NeutralEdgeLayouter.java 23 Jul 2004 08:57:30 -0000 1.4 --- NeutralEdgeLayouter.java 2 Aug 2004 12:36:31 -0000 1.5 *************** *** 26,30 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#getStyleName() */ public String getStyleName() { --- 26,30 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#getStyleName() */ public String getStyleName() { *************** *** 37,41 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#hasVisualController() */ public boolean hasVisualController() { --- 37,41 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#hasVisualController() */ public boolean hasVisualController() { *************** *** 44,48 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#getVisualController() */ public JComponent getVisualController() { --- 44,48 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#getVisualController() */ public JComponent getVisualController() { *************** *** 51,55 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { --- 51,55 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { *************** *** 58,62 **** /* ! * Overrides @see org.mediavirus.graphl.AssignableGraphController#clone() */ public Object clone() { --- 58,62 ---- /* ! * Overrides @see org.mediavirus.graphl.Facet#clone() */ public Object clone() { |
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl/view Modified Files: AbstractFacet.java AbstractManipulator.java JGraphPane.java Added Files: SimpleFacetRegistry.java FacetRegistry.java Facet.java Removed Files: AssignableGraphController.java AbstractNodePainter.java LineEdgePainter.java BoxNodePainter.java LineEdgePainterController.java StraightLineEdgePainter.java ArrowEdgePainter.java InvisibleEdgePainter.java BoxNodePainterController.java Manipulator.java NodePainter.java InvisibleNodePainter.java ReificationNodePainter.java ManhattanEdgePainter.java ImageNodePainter.java AbstractEdgePainter.java EdgePainter.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure --- ArrowEdgePainter.java DELETED --- Index: JGraphPane.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/JGraphPane.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JGraphPane.java 1 Jul 2004 18:18:41 -0000 1.3 --- JGraphPane.java 2 Aug 2004 12:36:31 -0000 1.4 *************** *** 28,31 **** --- 28,36 ---- import org.mediavirus.graphl.graph.GraphListener; import org.mediavirus.graphl.graph.Node; + import org.mediavirus.graphl.interaction.Manipulator; + import org.mediavirus.graphl.painter.ArrowEdgePainter; + import org.mediavirus.graphl.painter.BoxNodePainter; + import org.mediavirus.graphl.painter.EdgePainter; + import org.mediavirus.graphl.painter.NodePainter; import org.mediavirus.graphl.selection.DefaultSelectionModel; import org.mediavirus.graphl.selection.SelectionModel; --- StraightLineEdgePainter.java DELETED --- --- InvisibleNodePainter.java DELETED --- --- AbstractNodePainter.java DELETED --- --- AbstractEdgePainter.java DELETED --- --- AssignableGraphController.java DELETED --- --- NEW FILE: FacetRegistry.java --- /* * Created on 30.05.2004 by flo */ package org.mediavirus.graphl.view; import java.util.Vector; import org.mediavirus.graphl.graph.*; import org.mediavirus.graphl.layout.EdgeLayouter; import org.mediavirus.graphl.layout.NodeLayouter; import org.mediavirus.graphl.painter.EdgePainter; import org.mediavirus.graphl.painter.NodePainter; /** * @author flo * created: 30.05.2004 21:01:45 */ public interface FacetRegistry { public void registerEdgePainter(EdgePainter painter); public void unregisterEdgePainter(EdgePainter painter); public Vector getAvailableEdgePainters(); public void setDefaultEdgePainter(EdgePainter painter); public void setPainterForEdgeType(String type, EdgePainter p); public void setPainterForEdge(Edge edge, EdgePainter p); // public EdgePainter getEdgePainter(Edge edge); public EdgePainter getEdgePainterForType(String type); public EdgePainter getDefaultEdgePainter(); public void registerNodePainter(NodePainter descriptor); public void unregisterNodePainter(NodePainter descriptor); public Vector getAvailableNodePainters(); public void setDefaultNodePainter(NodePainter painter); public void setPainterForNodeType(String type, NodePainter p); public void setPainterForNode(Node node, NodePainter p); // public NodePainter getNodePainter(Node node); public NodePainter getNodePainterForType(String type); public NodePainter getDefaultNodePainter(); public void registerEdgeLayouter(EdgeLayouter layouter); public void unregisterEdgeLayouter(EdgeLayouter layouter); public Vector getAvailableEdgeLayouters(); public void setDefaultEdgeLayouter(EdgeLayouter layouter); public EdgeLayouter getDefaultEdgeLayouter(); public void setLayouterForEdgeType(String type, EdgeLayouter layouter); public void setLayouterForEdge(Edge edge, EdgeLayouter layouter); public EdgeLayouter getEdgeLayouterForType(String type); // public EdgeLayouter getEdgeLayouter(Edge edge); public void registerNodeLayouter(NodeLayouter layouter); public void unregisterNodeLayouter(NodeLayouter layouter); public Vector getAvailableNodeLayouters(); public void setDefaultNodeLayouter(NodeLayouter layouter); public NodeLayouter getDefaultNodeLayouter(); public void setLayouterForNodeType(String type, NodeLayouter layouter); public void setLayouterForNode(Node node, NodeLayouter layouter); public NodeLayouter getNodeLayouterForType(String type); // public NodeLayouter getNodeLayouter(Node node); } --- ManhattanEdgePainter.java DELETED --- --- LineEdgePainter.java DELETED --- --- ReificationNodePainter.java DELETED --- --- Manipulator.java DELETED --- --- BoxNodePainterController.java DELETED --- --- NEW FILE: SimpleFacetRegistry.java --- /* * Created on 09.06.2004 by flo */ package org.mediavirus.graphl.view; import java.util.Collections; import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; import org.mediavirus.graphl.graph.*; import org.mediavirus.graphl.layout.EdgeLayouter; import org.mediavirus.graphl.layout.NodeLayouter; import org.mediavirus.graphl.painter.EdgePainter; import org.mediavirus.graphl.painter.NodePainter; /** * @author flo * created: 09.06.2004 12:01:36 */ public class SimpleFacetRegistry implements FacetRegistry { private NodePainter defaultNodePainter; private EdgePainter defaultEdgePainter; private EdgeLayouter defaultEdgeLayouter; private NodeLayouter defaultNodeLayouter; Hashtable nodePaintersForType = new Hashtable(); Hashtable edgePaintersForType = new Hashtable(); Hashtable edgeLayoutersForType = new Hashtable(); Hashtable nodeLayoutersForType = new Hashtable(); Vector registeredEdgePainters = new Vector(); Vector registeredNodePainters = new Vector(); Vector registeredEdgeLayouters = new Vector(); Vector registeredNodeLayouters = new Vector(); public SimpleFacetRegistry() { } public EdgePainter getEdgePainterForType(String type){ if (type != null) { return (EdgePainter)edgePaintersForType.get(type); } return null; } public EdgePainter getDefaultEdgePainter() { return defaultEdgePainter; } public void setPainterForEdgeType(String type, EdgePainter painter){ EdgePainter oldPainter = getEdgePainterForType(type); if (oldPainter == null) { // no Painter assigned, no new one to set -> return if (painter == null) return; oldPainter = getDefaultEdgePainter(); } if (painter != null) { edgePaintersForType.put(type, painter); } else { edgePaintersForType.remove(type); painter = getDefaultEdgePainter(); } Iterator assignedEdges = oldPainter.getAssignedElements().iterator(); while (assignedEdges.hasNext()) { Edge edge = (Edge) assignedEdges.next(); if (type.equals(edge.getType())) { edge.setCurrentPainter(painter); } } } public NodePainter getNodePainterForType(String type){ if (type != null) { NodePainter p = ((NodePainter)nodePaintersForType.get(type)); return p; } return null; } public NodePainter getDefaultNodePainter() { return defaultNodePainter; } public void setPainterForNodeType(String type, NodePainter painter){ NodePainter oldPainter = getNodePainterForType(type); if (oldPainter == null) { // no Painter assigned, no new one to set -> return if (painter == null) return; oldPainter = getDefaultNodePainter(); } if (painter != null) { nodePaintersForType.put(type, painter); } else { nodePaintersForType.remove(type); painter = getDefaultNodePainter(); } Iterator assignedNodes = oldPainter.getAssignedElements().iterator(); while (assignedNodes.hasNext()) { Node node = (Node) assignedNodes.next(); if (type.equals(node.getType())) { node.setCurrentPainter(painter); } } } // public void registerNodePainterWithResource(String subject, String predicate, String object, NodePainter p) { // Statement stmt = new StatementImpl(new ResourceImpl(subject), new ResourceImpl(predicate), new ResourceImpl(object)); // // // } /** * @param painter */ public void setDefaultEdgePainter(EdgePainter painter) { if (defaultEdgePainter != null) { Iterator assignedEdges = defaultEdgePainter.getAssignedElements().iterator(); while (assignedEdges.hasNext()) { Edge edge = (Edge)assignedEdges.next(); edge.setCurrentPainter(painter); } } defaultEdgePainter = painter; } /** * @param painter */ public void setDefaultNodePainter(NodePainter painter) { if (defaultNodePainter != null) { Iterator assignedNodes = defaultNodePainter.getAssignedElements().iterator(); while (assignedNodes.hasNext()) { Node node = (Node)assignedNodes.next(); node.setCurrentPainter(painter); } } defaultNodePainter = painter; } public void registerEdgePainter(EdgePainter painter){ registeredEdgePainters.add(painter); } public void unregisterEdgePainter(EdgePainter painter){ registeredEdgePainters.remove(painter); } /** * @return Returns the registered EdgePainterDescriptors */ public Vector getAvailableEdgePainters() { return registeredEdgePainters; } public void registerNodePainter(NodePainter descriptor){ registeredNodePainters.add(descriptor); } public void unregisterNodePainter(NodePainter descriptor){ registeredNodePainters.remove(descriptor); } /** * @return Returns the registered NodePainterDescriptors. */ public Vector getAvailableNodePainters() { return registeredNodePainters; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#registerEdgeLayouter(org.mediavirus.graphl.view.EdgeLayouter) */ public void registerEdgeLayouter(EdgeLayouter layouter) { registeredEdgeLayouters.add(layouter); } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#unregisterEdgeLayouter(org.mediavirus.graphl.view.EdgeLayouter) */ public void unregisterEdgeLayouter(EdgeLayouter layouter) { registeredEdgeLayouters.remove(layouter); } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#getAvailableEdgeLayouters() */ public Vector getAvailableEdgeLayouters() { return registeredEdgeLayouters; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setDefaultEdgeLayouter(org.mediavirus.graphl.view.EdgeLayouter) */ public void setDefaultEdgeLayouter(EdgeLayouter layouter) { if (defaultEdgeLayouter != null) { Iterator assignedEdges = defaultEdgeLayouter.getAssignedElements().iterator(); while (assignedEdges.hasNext()) { Edge edge = (Edge)assignedEdges.next(); edge.setCurrentLayouter(layouter); } } defaultEdgeLayouter = layouter; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setEdgeLayouterForType(org.mediavirus.graphl.view.EdgeLayouter, java.lang.String) */ public void setLayouterForEdgeType(String type, EdgeLayouter layouter) { EdgeLayouter oldLayouter = getEdgeLayouterForType(type); if (oldLayouter == null) { // no layouter assigned, no new one to set -> return if (layouter == null) return; oldLayouter = getDefaultEdgeLayouter(); } if (layouter != null) { edgeLayoutersForType.put(type, layouter); } else { edgeLayoutersForType.remove(type); layouter = getDefaultEdgeLayouter(); } Iterator assignedEdges = oldLayouter.getAssignedElements().iterator(); while (assignedEdges.hasNext()) { Edge edge = (Edge) assignedEdges.next(); if (type.equals(edge.getType())) { edge.setCurrentLayouter(layouter); } } } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#getEdgeLayouterForType(java.lang.String) */ public EdgeLayouter getEdgeLayouterForType(String type) { if (type != null) { return (EdgeLayouter)edgeLayoutersForType.get(type); } return null; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#getDefaultEdgeLayouter() */ public EdgeLayouter getDefaultEdgeLayouter() { return defaultEdgeLayouter; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#registerEdgeLayouter(org.mediavirus.graphl.view.EdgeLayouter) */ public void registerNodeLayouter(NodeLayouter layouter) { registeredNodeLayouters.add(layouter); } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#unregisterNodeLayouter(org.mediavirus.graphl.view.NodeLayouter) */ public void unregisterNodeLayouter(NodeLayouter layouter) { registeredNodeLayouters.remove(layouter); } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#getAvailableNodeLayouters() */ public Vector getAvailableNodeLayouters() { return registeredNodeLayouters; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setDefaultNodeLayouter(org.mediavirus.graphl.view.NodeLayouter) */ public void setDefaultNodeLayouter(NodeLayouter layouter) { if (defaultNodeLayouter != null) { Iterator assignedNodes = defaultNodeLayouter.getAssignedElements().iterator(); while (assignedNodes.hasNext()) { Node node = (Node)assignedNodes.next(); node.setCurrentLayouter(layouter); } } defaultNodeLayouter = layouter; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setNodeLayouterForType(org.mediavirus.graphl.view.NodeLayouter, java.lang.String) */ public void setLayouterForNodeType(String type, NodeLayouter layouter) { NodeLayouter oldLayouter = getNodeLayouterForType(type); if (oldLayouter == null) { // no layouter assigned, no new one to set -> return if (layouter == null) return; oldLayouter = getDefaultNodeLayouter(); } if (layouter != null) { nodeLayoutersForType.put(type, layouter); } else { nodeLayoutersForType.remove(type); layouter = getDefaultNodeLayouter(); } Iterator assignedNodes = oldLayouter.getAssignedElements().iterator(); while (assignedNodes.hasNext()) { Node node = (Node) assignedNodes.next(); if (type.equals(node.getType())) { node.setCurrentLayouter(layouter); } } } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#getNodeLayouterForType(java.lang.String) */ public NodeLayouter getNodeLayouterForType(String type) { if (type != null) { return (NodeLayouter)nodeLayoutersForType.get(type); } return null; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#getDefaultNodeLayouter() */ public NodeLayouter getDefaultNodeLayouter() { return defaultNodeLayouter; } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setPainterForEdge(org.mediavirus.graphl.graph.Edge, org.mediavirus.graphl.view.EdgePainter) */ public void setPainterForEdge(Edge edge, EdgePainter p) { if (p != null) { edge.setCurrentPainter(p); } else if ((edge.getType() != null) && ((p = getEdgePainterForType(edge.getType())) != null)) { edge.setCurrentPainter(p); } else { edge.setCurrentPainter(getDefaultEdgePainter()); } } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setPainterForNode(org.mediavirus.graphl.graph.Node, org.mediavirus.graphl.view.NodePainter) */ public void setPainterForNode(Node node, NodePainter p) { if (p != null) { node.setCurrentPainter(p); } else if ((node.getType() != null) && ((p = getNodePainterForType(node.getType())) != null)) { node.setCurrentPainter(p); } else { node.setCurrentPainter(getDefaultNodePainter()); } } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setLayouterForEdge(org.mediavirus.graphl.graph.Edge, org.mediavirus.graphl.layout.EdgeLayouter) */ public void setLayouterForEdge(Edge edge, EdgeLayouter layouter) { if (layouter != null) { edge.setCurrentLayouter(layouter); } else if ((edge.getType() != null) && ((layouter = getEdgeLayouterForType(edge.getType())) != null)) { edge.setCurrentLayouter(layouter); } else { edge.setCurrentLayouter(getDefaultEdgeLayouter()); } } /* * Overrides @see org.mediavirus.graphl.FacetRegistry#setLayouterForNode(org.mediavirus.graphl.graph.Node, org.mediavirus.graphl.layout.NodeLayouter) */ public void setLayouterForNode(Node node, NodeLayouter layouter) { if (layouter != null) { node.setCurrentLayouter(layouter); } else if ((node.getType() != null) && ((layouter = getNodeLayouterForType(node.getType())) != null)) { node.setCurrentLayouter(layouter); } else { node.setCurrentLayouter(getDefaultNodeLayouter()); } } } --- ImageNodePainter.java DELETED --- Index: AbstractFacet.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/AbstractFacet.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AbstractFacet.java 23 Jul 2004 08:57:29 -0000 1.1 --- AbstractFacet.java 2 Aug 2004 12:36:31 -0000 1.2 *************** *** 15,24 **** * created: 23.07.2004 00:04:34 */ ! public abstract class AbstractFacet implements AssignableGraphController { private Set assignedElements = new HashSet(); /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#getAssignedElements() */ public Set getAssignedElements() { --- 15,24 ---- * created: 23.07.2004 00:04:34 */ ! public abstract class AbstractFacet implements Facet { private Set assignedElements = new HashSet(); /* ! * Overrides @see org.mediavirus.graphl.view.Facet#getAssignedElements() */ public Set getAssignedElements() { *************** *** 29,33 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#assignElement(org.mediavirus.graphl.graph.GraphElement) */ public void assignElement(GraphElement element) { --- 29,33 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#assignElement(org.mediavirus.graphl.graph.GraphElement) */ public void assignElement(GraphElement element) { *************** *** 36,40 **** /* ! * Overrides @see org.mediavirus.graphl.view.AssignableGraphController#unassignElement(org.mediavirus.graphl.graph.GraphElement) */ public void unassignElement(GraphElement element) { --- 36,40 ---- /* ! * Overrides @see org.mediavirus.graphl.view.Facet#unassignElement(org.mediavirus.graphl.graph.GraphElement) */ public void unassignElement(GraphElement element) { --- NodePainter.java DELETED --- --- LineEdgePainterController.java DELETED --- --- NEW FILE: Facet.java --- /* * Created on 09.06.2004 by flo */ package org.mediavirus.graphl.view; import java.util.Set; import javax.swing.JComponent; import org.mediavirus.graphl.graph.GraphElement; /** * @author flo * created: 09.06.2004 17:49:34 */ public interface Facet extends Cloneable { public boolean hasVisualController(); public JComponent getVisualController(); public String getName(); public boolean isSameClass(Object o); public Object clone(); public Set getAssignedElements(); public void assignElement(GraphElement element); public void unassignElement(GraphElement element); } Index: AbstractManipulator.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/view/AbstractManipulator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AbstractManipulator.java 1 Jul 2004 18:18:41 -0000 1.3 --- AbstractManipulator.java 2 Aug 2004 12:36:31 -0000 1.4 *************** *** 9,12 **** --- 9,13 ---- import org.mediavirus.graphl.GraphlPane; + import org.mediavirus.graphl.interaction.Manipulator; /** --- BoxNodePainter.java DELETED --- --- InvisibleEdgePainter.java DELETED --- --- EdgePainter.java DELETED --- |
From: Flo L. <fl...@us...> - 2004-08-02 12:37:01
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl Modified Files: GraphlPane.java GraphlPanel.java Removed Files: SimplePainterRegistry.java PainterRegistry.java GraphlManipulator.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure Index: GraphlPanel.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GraphlPanel.java 23 Jul 2004 08:57:30 -0000 1.9 --- GraphlPanel.java 2 Aug 2004 12:36:49 -0000 1.10 *************** *** 25,34 **** import org.mediavirus.graphl.graph.rdf.RDFGraph; import org.mediavirus.graphl.gui.GenericDialog; import org.mediavirus.graphl.layout.GraphlLayoutStrategy; import org.mediavirus.graphl.layout.Layouter; import org.mediavirus.graphl.selection.SelectionListener; import org.mediavirus.graphl.selection.SelectionModel; - import org.mediavirus.graphl.view.EdgePainter; - import org.mediavirus.graphl.view.NodePainter; import org.mediavirus.graphl.vocabulary.Vocabulary; --- 25,35 ---- import org.mediavirus.graphl.graph.rdf.RDFGraph; import org.mediavirus.graphl.gui.GenericDialog; + import org.mediavirus.graphl.interaction.GraphlManipulator; import org.mediavirus.graphl.layout.GraphlLayoutStrategy; import org.mediavirus.graphl.layout.Layouter; + import org.mediavirus.graphl.painter.EdgePainter; + import org.mediavirus.graphl.painter.NodePainter; import org.mediavirus.graphl.selection.SelectionListener; import org.mediavirus.graphl.selection.SelectionModel; import org.mediavirus.graphl.vocabulary.Vocabulary; --- GraphlManipulator.java DELETED --- --- PainterRegistry.java DELETED --- --- SimplePainterRegistry.java DELETED --- Index: GraphlPane.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/GraphlPane.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GraphlPane.java 27 Jul 2004 13:24:05 -0000 1.9 --- GraphlPane.java 2 Aug 2004 12:36:49 -0000 1.10 *************** *** 23,26 **** --- 23,27 ---- import org.mediavirus.graphl.graph.*; import org.mediavirus.graphl.graph.rdf.RDFGraph; + import org.mediavirus.graphl.interaction.Manipulator; import org.mediavirus.graphl.layout.AbsoluteNodeLayouter; import org.mediavirus.graphl.layout.RepulsionNodeLayouter; *************** *** 29,42 **** import org.mediavirus.graphl.layout.NeutralEdgeLayouter; import org.mediavirus.graphl.layout.SpringEdgeLayouter; ! import org.mediavirus.graphl.view.BoxNodePainter; ! import org.mediavirus.graphl.view.EdgePainter; ! import org.mediavirus.graphl.view.ImageNodePainter; ! import org.mediavirus.graphl.view.InvisibleEdgePainter; ! import org.mediavirus.graphl.view.InvisibleNodePainter; import org.mediavirus.graphl.view.JGraphPane; ! import org.mediavirus.graphl.view.ManhattanEdgePainter; ! import org.mediavirus.graphl.view.Manipulator; ! import org.mediavirus.graphl.view.NodePainter; ! import org.mediavirus.graphl.view.StraightLineEdgePainter; import org.mediavirus.graphl.vocabulary.*; import org.mediavirus.graphl.vocabulary.Vocabulary; --- 30,44 ---- import org.mediavirus.graphl.layout.NeutralEdgeLayouter; import org.mediavirus.graphl.layout.SpringEdgeLayouter; ! import org.mediavirus.graphl.painter.BoxNodePainter; ! import org.mediavirus.graphl.painter.EdgePainter; ! import org.mediavirus.graphl.painter.ImageNodePainter; ! import org.mediavirus.graphl.painter.InvisibleEdgePainter; ! import org.mediavirus.graphl.painter.InvisibleNodePainter; ! import org.mediavirus.graphl.painter.ManhattanEdgePainter; ! import org.mediavirus.graphl.painter.NodePainter; ! import org.mediavirus.graphl.painter.StraightLineEdgePainter; ! import org.mediavirus.graphl.view.FacetRegistry; import org.mediavirus.graphl.view.JGraphPane; ! import org.mediavirus.graphl.view.SimpleFacetRegistry; import org.mediavirus.graphl.vocabulary.*; import org.mediavirus.graphl.vocabulary.Vocabulary; *************** *** 59,63 **** private Point2D.Double translationPoint; ! PainterRegistry painterRegistry = new SimplePainterRegistry(); public GraphlPane() { --- 61,65 ---- private Point2D.Double translationPoint; ! FacetRegistry painterRegistry = new SimpleFacetRegistry(); public GraphlPane() { *************** *** 65,69 **** } ! public PainterRegistry getPainterRegistry() { return painterRegistry; } --- 67,71 ---- } ! public FacetRegistry getPainterRegistry() { return painterRegistry; } |
From: Flo L. <fl...@us...> - 2004-08-02 12:36:59
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/painter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl/painter Added Files: ImageNodePainter.java AbstractNodePainter.java StraightLineEdgePainter.java BoxNodePainter.java InvisibleNodePainter.java EdgePainter.java LineEdgePainter.java ManhattanEdgePainter.java AbstractEdgePainter.java LineEdgePainterController.java InvisibleEdgePainter.java ReificationNodePainter.java BoxNodePainterController.java NodePainter.java ArrowEdgePainter.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure --- NEW FILE: LineEdgePainter.java --- /* * Created on 14.03.2004 * */ package org.mediavirus.graphl.painter; import java.awt.BasicStroke; import java.awt.Font; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.awt.Stroke; import javax.swing.JComponent; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.view.JGraphPane; import org.mediavirus.graphl.view.LabelGenerator; /** * * @author flo */ public abstract class LineEdgePainter extends AbstractEdgePainter { public static final int SOLID = 0, DASHED = 1, DOTTED = 2; protected int lineStyle = 0; protected float lineWidth = 0.7f; protected float segmentLength = 1.0f; protected boolean paintingArrow = true; protected boolean paintingLabel = true; Stroke stroke; Font font; LabelGenerator labelGenerator; /** * */ public LineEdgePainter() { this(0.7f, SOLID, true, true, 9); } public LineEdgePainter(float lineWidth, int lineStyle, boolean paintingArrow, boolean paintingLabel, int fontSize) { this.lineWidth = lineWidth; this.lineStyle = lineStyle; this.paintingArrow = paintingArrow; this.paintingLabel = paintingLabel; labelGenerator = new LabelGenerator(LabelGenerator.TYPE,"",true); updateStroke(); font = new Font(null, Font.PLAIN, fontSize); } /** * */ private void updateStroke() { if (lineStyle == SOLID) { stroke = new BasicStroke(lineWidth); return; } float pattern[] = {1, 5 * segmentLength}; if (lineStyle == DASHED) { pattern[0] = 5 * segmentLength; } stroke = new BasicStroke(lineWidth, BasicStroke.CAP_BUTT, BasicStroke.JOIN_BEVEL, 1.0f, pattern, 0.0f); } /** * @see de.fzi.wim.guibase.graphview.view.EdgePainter#paintEdge(de.fzi.wim.guibase.graphview.view.JGraphPane, java.awt.Graphics2D, de.fzi.wim.guibase.graphview.graph.Edge) */ public void paintEdge(JGraphPane graphPane, Graphics2D g, Edge edge, boolean selected, boolean highlighted) { //DraggingManipulator draggingManipulator = (DraggingManipulator)graphPane.getManipulator(DraggingManipulator.NAME); //boolean isDragging = draggingManipulator!=null && draggingManipulator.getDraggedEdge()==edge; boolean isDragging = false; doPaintEdge(graphPane, g, edge, selected, highlighted); } /** * @param graphPane * @param g * @param edge * @param isHighlighted * @param isDragging */ abstract void doPaintEdge(JGraphPane graphPane, Graphics2D g, Edge edge, boolean selected, boolean highlighted); /** * @see de.fzi.wim.guibase.graphview.view.EdgePainter#getEdgeScreenBounds(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Edge, java.awt.Rectangle) */ public void getEdgeScreenBounds( JGraphPane graphPane, Edge edge, Rectangle edgeScreenRectangle) { Point from=graphPane.getScreenPointForNode(edge.getFrom()); Point to=graphPane.getScreenPointForNode(edge.getTo()); edgeScreenRectangle.setBounds(Math.min(from.x,to.x),Math.min(from.y,to.y),Math.abs(to.x-from.x)+1,Math.abs(to.y-from.y)+1); } /** * @return */ public float getLineWidth() { return lineWidth; } /** * @param f */ public void setLineWidth(float f) { lineWidth = f; updateStroke(); } /** * @param i */ public void setLineStyle(int i) { lineStyle = i; updateStroke(); } /** * @param f */ public void setSegmentLength(float f) { segmentLength = f; updateStroke(); } /** * @return */ public boolean isPaintingArrow() { return paintingArrow; } /** * @param b */ public void setPaintingArrow(boolean b) { paintingArrow = b; } /** * @return */ public Stroke getStroke(boolean selected, boolean highlighted) { if (highlighted) { // TODO (2): clone original stroke (0.5h) return new BasicStroke(lineWidth * 2); } if (selected) { // TODO (2): clone original stroke (0.5h) return new BasicStroke(lineWidth * 3); } return stroke; } /** * @return */ public boolean isPaintingLabel() { return paintingLabel; } /** * @param b */ public void setPaintingLabel(boolean b) { paintingLabel = b; } /** * @return */ public Font getFont() { return font; } /** * @param font */ public void setFont(Font font) { this.font = font; } public abstract Object clone(); /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#getVisualController() */ public JComponent getVisualController() { LineEdgePainterController c = new LineEdgePainterController(this); return c; } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#hasVisualController() */ public boolean hasVisualController() { return true; } /* * Overrides @see de.fzi.wim.guibase.graphview.view.EdgePainter#screenDistanceFromEdge(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Edge, java.awt.Point) */ public abstract double screenDistanceFromEdge(JGraphPane graphPane, Edge edge, Point point); /** * @return Returns the stroke. */ public Stroke getStroke() { return stroke; } /** * @return Returns the lineStyle. */ public int getLineStyle() { return lineStyle; } /** * @return Returns the segmentLength. */ public float getSegmentLength() { return segmentLength; } } --- NEW FILE: ArrowEdgePainter.java --- package org.mediavirus.graphl.painter; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import javax.swing.JComponent; import org.mediavirus.graphl.GraphlPane; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.rdf.RDFEdge; import org.mediavirus.graphl.view.JGraphPane; /** * The painter that paints the edge as the arrow. */ public class ArrowEdgePainter extends AbstractEdgePainter { /** The length of the arrow base. */ protected static final double ARROW_BASE_LENGTH=3.0; /** An instance. */ public static final EdgePainter INSTANCE=new ArrowEdgePainter(); /** * Paints the supplied edge. * * @param graphPane the graph pane * @param g the graphics * @param edge the edge to paint */ public void paintEdge(JGraphPane graphPane, Graphics2D g, Edge edge, boolean selected, boolean highlighted) { Point from=graphPane.getScreenPointForNode(edge.getFrom()); Point to=graphPane.getScreenPointForNode(edge.getTo()); Color color=g.getColor(); g.setColor(getEdgeColor(edge, highlighted, selected)); paintArrow(g,from.x,from.y,to.x,to.y); g.setColor(color); } /** * Returns the color for the edge. * * @param edge the edge to be painted * @param isHighlighted <code>true</code> if the edge is highlighted * @param isDragging <code>true</code> if the edge is being dragged * @return the color for the edge */ protected Color getEdgeColor(Edge edge,boolean isHighlighted,boolean isDragging) { if (isHighlighted || isDragging) return Color.red; else return Color.gray; } /** * Paints the arrow. * * @param g the graphics * @param x1 the source x coordinate * @param y1 the source y coordinate * @param x2 the target x coordinate * @param y2 the target y coordinate */ public static void paintArrow(Graphics2D g,int x1,int y1,int x2,int y2) { double dx; double dy; double deltaX=x1-x2; double deltaY=y1-y2; if (Math.abs(deltaY)>Math.abs(deltaX)) { double slope=Math.abs(deltaX/deltaY); dx=ARROW_BASE_LENGTH/Math.sqrt(1+slope*slope); dy=dx*slope; } else { double slope=Math.abs(deltaY/deltaX); dy=ARROW_BASE_LENGTH/Math.sqrt(1+slope*slope); dx=dy*slope; } if (deltaY>0) dx*=-1; if (deltaX<0) dy*=-1; int[] pointsX=new int[] { x2,(int)(x1-dx),(int)(x1+dx) }; int[] pointsY=new int[] { y2,(int)(y1-dy),(int)(y1+dy) }; g.fillPolygon(pointsX,pointsY,3); } /** * Returns the distance of the point to the edge. * * @param graphPane the graph pane * @param g the graphics object * @param edge the edge * @param point the point * @return the distance of the point from the edge */ public double screenDistanceFromEdge(JGraphPane graphPane,Graphics2D g,Edge edge,Point point) { double px=point.x; double py=point.y; Point from=graphPane.getScreenPointForNode(edge.getFrom()); Point to=graphPane.getScreenPointForNode(edge.getTo()); double x1=from.x; double y1=from.y; double x2=to.x; double y2=to.y; if (px<Math.min(x1,x2)-8 || px>Math.max(x1,x2)+8 || py<Math.min(y1,y2)-8 || py>Math.max(y1,y2)+8) return 1000; double dist=1000; if (x1-x2!=0) dist=Math.abs((y2-y1)/(x2-x1)*(px-x1)+(y1-py)); if (y1-y2!=0) dist=Math.min(dist,Math.abs((x2-x1)/(y2-y1)*(py-y1)+(x1-px))); return dist; } /** * Returns the outer rectangle of the edge on screen. * * @param graphPane the graph pane * @param edge the edge * @param edgeScreenRectangle the rectangle receiving the edge's coordinates */ public void getEdgeScreenBounds(JGraphPane graphPane,Edge edge,Rectangle edgeScreenRectangle) { Point from=graphPane.getScreenPointForNode(edge.getFrom()); Point to=graphPane.getScreenPointForNode(edge.getTo()); edgeScreenRectangle.setBounds(Math.min(from.x,to.x),Math.min(from.y,to.y),Math.abs(to.x-from.x)+1,Math.abs(to.y-from.y)+1); } /* * Overrides @see org.mediavirus.graphl.view.AbstractEdgePainter#clone() */ public Object clone() { return new ArrowEdgePainter(); } public String getName() { return "Arrow"; } public String toString() { return getName(); } /* * Overrides @see org.mediavirus.graphl.view.Facet#hasVisualController() */ public boolean hasVisualController() { return false; } /* * Overrides @see org.mediavirus.graphl.view.Facet#getVisualController() */ public JComponent getVisualController() { return null; } /* * Overrides @see org.mediavirus.graphl.view.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { return (o instanceof ArrowEdgePainter); } /* * Overrides @see org.mediavirus.graphl.view.EdgePainter#isPointInLabel(org.mediavirus.graphl.GraphlPane, org.mediavirus.graphl.graph.RDFEdge, java.awt.Point) */ public boolean isPointInLabel(GraphlPane graphPane, RDFEdge edge, Point point) { return false; } } --- NEW FILE: ReificationNodePainter.java --- /* * Created on 17.03.2004 * */ package org.mediavirus.graphl.painter; import java.awt.Color; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import javax.swing.JComponent; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.view.JGraphPane; /** * * @author flo */ public class ReificationNodePainter extends AbstractNodePainter { public static final NodePainter INSTANCE = new ReificationNodePainter(); /** * @see de.fzi.wim.guibase.graphview.view.NodePainter#paintNode(de.fzi.wim.guibase.graphview.view.JGraphPane, java.awt.Graphics2D, de.fzi.wim.guibase.graphview.graph.Node) */ public void paintNode(JGraphPane graphPane, Graphics2D g, Node node, boolean selected, boolean highlighted) { Point nodePoint = graphPane.getScreenPointForNode(node); g.setColor(new Color(255,250,168)); g.fillOval((int)nodePoint.getX()-4,(int)nodePoint.getY()-4,8,8); g.setColor(Color.black); g.drawOval((int)nodePoint.getX()-4,(int)nodePoint.getY()-4,8,8); } /** * @see de.fzi.wim.guibase.graphview.view.NodePainter#isInNode(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Point) */ public boolean isInNode(JGraphPane graphPane, Node node, Point point) { Point nodePoint = graphPane.getScreenPointForNode(node); return Math.sqrt((nodePoint.getX()-point.getX())*(nodePoint.getX()-point.getX())+(nodePoint.getY()-point.getY())*(nodePoint.getY()-point.getY())) < 5; } /** * @see de.fzi.wim.guibase.graphview.view.NodePainter#getNodeScreenBounds(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Rectangle) */ public void getNodeScreenBounds(JGraphPane graphPane, Node node, Rectangle nodeScreenRectangle) { Point nodePoint = graphPane.getScreenPointForNode(node); nodeScreenRectangle.setRect(nodePoint.x-4, nodePoint.y-4, 8, 8); } /** * @see de.fzi.wim.guibase.graphview.view.NodePainter#getToolTipText(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Point) */ public String getToolTipText( JGraphPane graphPane, Node node, Point point) { return "A reification node allows to use a statement as the subject of another statement."; } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#isEdgeDragPoint(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Point) */ public boolean isEdgeDragPoint(JGraphPane graphPane, Node node, Point p) { return false; } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getRepulsion(org.mediavirus.graphl.graph.RDFNode) */ public double getRepulsion(Node node) { return 0; } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getEdgePin(org.mediavirus.graphl.graph.RDFNode, org.mediavirus.graphl.graph.RDFEdge) */ public Point getEdgePin(Node node, Edge edge) { return new Point((int)node.getX(), (int)node.getY()); } /* * Overrides @see org.mediavirus.graphl.Facet#getStyleName() */ public String getName() { return "Reified Statement"; } /* * Overrides @see org.mediavirus.graphl.Facet#hasVisualController() */ public boolean hasVisualController() { return false; } /* * Overrides @see org.mediavirus.graphl.Facet#getVisualController() */ public JComponent getVisualController() { return null; } /* * Overrides @see org.mediavirus.graphl.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { return (o instanceof ReificationNodePainter); } /* * Overrides @see org.mediavirus.graphl.Facet#clone() */ public Object clone() { return new ReificationNodePainter(); } } --- NEW FILE: StraightLineEdgePainter.java --- /* * Created on 14.03.2004 * */ package org.mediavirus.graphl.painter; import java.awt.Color; import java.awt.Font; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.awt.Stroke; import java.awt.geom.AffineTransform; import javax.swing.JComponent; import org.mediavirus.graphl.GraphlPane; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.graph.rdf.RDFEdge; import org.mediavirus.graphl.view.JGraphPane; /** * * @author flo */ public class StraightLineEdgePainter extends LineEdgePainter { public static final float ARROW_BASE_LENGTH = 3.0f; //TODO (2, 2h) add settings and controller to choose arrow position (begin, middle, end) public StraightLineEdgePainter() { super(); } public StraightLineEdgePainter(float lineWidth, int lineStyle, boolean paintingArrow, boolean paintingLabel, int fontSize) { super(lineWidth, lineStyle, paintingArrow, paintingLabel, fontSize); } /** * @see de.fzi.wim.guibase.graphview.view.EdgePainter#screenDistanceFromEdge(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Edge, java.awt.Point) */ public double screenDistanceFromEdge( JGraphPane graphPane, Edge edge, Point point) { double px = point.x; double py = point.y; Point from = graphPane.getScreenPointForNode(edge.getFrom()); Point to = graphPane.getScreenPointForNode(edge.getTo()); double x1=from.getX(); double y1=from.getY(); double x2=to.getX(); double y2=to.getY(); if (px<Math.min(x1,x2)-8 || px>Math.max(x1,x2)+8 || py<Math.min(y1,y2)-8 || py>Math.max(y1,y2)+8) return 1000; double dist=1000; if (x1-x2!=0) dist=Math.abs((y2-y1)/(x2-x1)*(px-x1)+(y1-py)); if (y1-y2!=0) dist=Math.min(dist,Math.abs((x2-x1)/(y2-y1)*(py-y1)+(x1-px))); return dist; } /** * @see org.mediavirus.graphl.painter.LineEdgePainter#doPaintEdge(de.fzi.wim.guibase.graphview.view.JGraphPane, java.awt.Graphics2D, de.fzi.wim.guibase.graphview.graph.Edge, boolean, boolean) */ void doPaintEdge(JGraphPane graphPane, Graphics2D g, Edge edge, boolean selected, boolean highlighted) { Point from = graphPane.getScreenPointForNode(edge.getFrom()); Point to = graphPane.getScreenPointForNode(edge.getTo()); //g.fillOval((int) ((from.getX()+to.getX())/2-1),(int) ((from.getY()+to.getY())/2-1),2,2); Node targetNode = edge.getTo(); NodePainter targetNodePainter = graphPane.getPainterForNode(targetNode); Rectangle targetNodeRectangle = new Rectangle(); targetNodePainter.getNodeScreenBounds(graphPane, targetNode, targetNodeRectangle); Node sourceNode = edge.getFrom(); NodePainter sourceNodePainter = graphPane.getPainterForNode(sourceNode); Rectangle sourceNodeRectangle = new Rectangle(); sourceNodePainter.getNodeScreenBounds(graphPane, sourceNode, sourceNodeRectangle); if (isPaintingArrow()) { targetNodeRectangle.grow(2,2); //sourceNodeRectangle.grow(-3,-3); } to = clipLine(from.x,from.y,to.x,to.y,targetNodeRectangle); if (to != null) { from = clipLine(to.x,to.y,from.x,from.y,sourceNodeRectangle); if (from != null) { Stroke oldStroke = g.getStroke(); Color oldColor = g.getColor(); g.setStroke(getStroke(selected, highlighted)); if (selected) { g.setColor(Color.lightGray); } g.drawLine(from.x,from.y, to.x,to.y); g.setStroke(oldStroke); g.setColor(oldColor); if (isPaintingArrow() || isPaintingLabel()) { int x = (from.x+to.x)/2; int y = (from.y+to.y)/2; AffineTransform oldxf = g.getTransform(); double angle; boolean flipped = false; if (to.x>from.x) { angle = Math.atan2(to.y-from.y,to.x-from.x); } else { angle = Math.atan2(from.y-to.y,from.x-to.x); flipped = true; } g.rotate(angle,x,y); if (isPaintingArrow()) { if (flipped) { paintArrow(g,x+5,y,x-5,y); } else { paintArrow(g,x-5,y,x+5,y); } } if (isPaintingLabel()){ String label = labelGenerator.getLabel(edge); if (label != null){ Font oldfont = g.getFont(); g.setFont(getFont()); g.translate(-g.getFontMetrics().stringWidth(label)/2,-2); g.drawString(label,x,y); g.setFont(oldfont); } } g.setTransform(oldxf); } } } } /** * Paints the arrow. * * @param g the graphics * @param x1 the source x coordinate * @param y1 the source y coordinate * @param x2 the target x coordinate * @param y2 the target y coordinate */ public static void paintArrow(Graphics2D g, int x1, int y1, int x2, int y2) { double dx; double dy; double deltaX=x1-x2; double deltaY=y1-y2; if (Math.abs(deltaY)>Math.abs(deltaX)) { double slope=Math.abs(deltaX/deltaY); dx=ARROW_BASE_LENGTH/Math.sqrt(1+slope*slope); dy=dx*slope; } else { double slope=Math.abs(deltaY/deltaX); dy=ARROW_BASE_LENGTH/Math.sqrt(1+slope*slope); dx=dy*slope; } if (deltaY>0) dx*=-1; if (deltaX<0) dy*=-1; int[] pointsX=new int[] { x2,(int)(x1-dx),(int)(x1+dx) }; int[] pointsY=new int[] { y2,(int)(y1-dy),(int)(y1+dy) }; g.fillPolygon(pointsX,pointsY,3); } /** * @param x1 * @param y1 * @param x2 * @param y2 * @param r * @return */ private Point clipLine(int x1, int y1, int x2, int y2, Rectangle r) { if (r.contains(x1,y1) == r.contains(x2,y2)) return null; if (r.contains(x2,y2)) return clipLine(x2,y2,x1,y1,r); //x1,y1 is inside int xi = (x1>x2) ? r.x : r.x+r.width; int yi = (y1>y2) ? r.y : r.y+r.height; int outcode = r.outcode(x2,y2); if (outcode == Rectangle.OUT_BOTTOM) return new Point(x1-(x1-x2)*r.height/2/(y2-y1),yi); if (outcode == Rectangle.OUT_TOP) return new Point(x1-(x1-x2)*r.height/2/(y1-y2),yi); if (outcode == Rectangle.OUT_LEFT) return new Point(xi,y1-(y1-y2)*r.width/2/(x1-x2)); if (outcode == Rectangle.OUT_RIGHT) return new Point(xi,y1-(y1-y2)*r.width/2/(x2-x1)); float propRect = (float)r.width / r.height; float propLine = (float)(x1-x2) / (y1-y2); if (outcode == (Rectangle.OUT_BOTTOM | Rectangle.OUT_LEFT)){ if (propRect>-propLine) { return new Point(x1-(x1-x2)*r.height/2/(y2-y1),yi); } else { return new Point(xi,y1-(y1-y2)*r.width/2/(x1-x2)); } } if (outcode == (Rectangle.OUT_BOTTOM | Rectangle.OUT_RIGHT)){ if (propRect>propLine) { return new Point(x1-(x1-x2)*r.height/2/(y2-y1),yi); } else { return new Point(xi,y1-(y1-y2)*r.width/2/(x2-x1)); } } if (outcode == (Rectangle.OUT_TOP | Rectangle.OUT_LEFT)){ if (propRect>propLine) { return new Point(x1-(x1-x2)*r.height/2/(y1-y2),yi); } else { return new Point(xi,y1-(y1-y2)*r.width/2/(x1-x2)); } } if (outcode == (Rectangle.OUT_TOP | Rectangle.OUT_RIGHT)){ if (propRect>-propLine) { return new Point(x1-(x1-x2)*r.height/2/(y1-y2),yi); } else { return new Point(xi,y1-(y1-y2)*r.width/2/(x2-x1)); } } return null; } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#isPointInLabel(org.mediavirus.graphl.GraphlPane, org.mediavirus.graphl.RDFEdge, java.awt.Point) */ public boolean isPointInLabel(GraphlPane graphPane, RDFEdge edge, Point point) { if (isPaintingLabel()) { String label = edge.getValue(); if (label != null){ Point from = graphPane.getScreenPointForNode(edge.getFrom()); Point to = graphPane.getScreenPointForNode(edge.getTo()); int x1 = from.x; int y1 = from.y; int x2 = to.x; int y2 = to.y; // TODO (2): properly calculate label clicking (0.5h) if ((point.x > (from.getX()+to.getX())/2-5) && (point.x < (from.getX()+to.getX())/2+5) && (point.y > (from.getY()+to.getY())/2-5) && (point.y < (from.getY()+to.getY())/2+5) ) { return true; } } } return false; } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#getStyleName() */ public String getName() { return "Straight Line"; } public String toString() { return getName(); } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#getVisualController() */ public JComponent getVisualController() { return super.getVisualController(); } public Object clone() { StraightLineEdgePainter p = new StraightLineEdgePainter(lineWidth, lineStyle, paintingArrow, paintingLabel, font.getSize()); return p; } public boolean isSameClass(Object p) { return (p instanceof StraightLineEdgePainter); } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#getLength(org.mediavirus.graphl.RDFEdge) */ public double getLength(RDFEdge edge) { return edge.getLength(); } } --- NEW FILE: BoxNodePainterController.java --- /* * Created on 11.07.2004 by flo */ package org.mediavirus.graphl.painter; import javax.swing.JPanel; import java.awt.Color; import java.awt.GridBagLayout; import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JColorChooser; import javax.swing.JLabel; import org.mediavirus.graphl.view.LabelGeneratorController; import java.awt.GridBagConstraints; public class BoxNodePainterController extends JPanel { BoxNodePainter painter = null; private boolean isUpdating = false; private JButton baseColorButton = null; private JCheckBox borderColorCheckBox = null; private JButton borderColorButton = null; private JLabel textColorLabel = null; private JButton textColorButton = null; private JLabel baseColorLabel = null; private LabelGeneratorController labelGeneratorController = null; public BoxNodePainterController() { initialize(); } public BoxNodePainterController(BoxNodePainter painter) { initialize(); setPainter(painter); } private void initialize() { java.awt.GridBagConstraints gridBagConstraints6 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints19 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints18 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints17 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints16 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints15 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints14 = new GridBagConstraints(); this.setLayout(new GridBagLayout()); gridBagConstraints14.gridx = 0; gridBagConstraints14.gridy = 1; gridBagConstraints14.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints14.insets = new java.awt.Insets(4,4,0,0); gridBagConstraints15.gridx = 1; gridBagConstraints15.gridy = 1; gridBagConstraints15.insets = new java.awt.Insets(4,4,0,4); gridBagConstraints15.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints15.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints16.gridx = 0; gridBagConstraints16.gridy = 2; gridBagConstraints16.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints17.gridx = 1; gridBagConstraints17.gridy = 2; gridBagConstraints17.insets = new java.awt.Insets(0,4,0,4); gridBagConstraints17.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints17.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints18.gridx = 0; gridBagConstraints18.gridy = 3; gridBagConstraints18.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints18.insets = new java.awt.Insets(0,4,4,0); gridBagConstraints19.gridx = 1; gridBagConstraints19.gridy = 3; gridBagConstraints19.insets = new java.awt.Insets(0,4,4,4); gridBagConstraints19.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints19.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints6.gridx = 0; gridBagConstraints6.gridy = 4; gridBagConstraints6.gridwidth = 2; gridBagConstraints6.weightx = 1.0D; gridBagConstraints6.weighty = 1.0D; this.add(getBaseColorLabel(), gridBagConstraints14); this.add(getBaseColorButton(), gridBagConstraints15); this.add(getBorderColorCheckBox(), gridBagConstraints16); this.add(getBorderColorButton(), gridBagConstraints17); this.add(getTextColorLabel(), gridBagConstraints18); this.add(getTextColorButton(), gridBagConstraints19); this.add(getLabelGeneratorController(), gridBagConstraints6); } /** * @return Returns the painter. */ public BoxNodePainter getPainter() { return painter; } /** * @param painter The painter to set. */ public void setPainter(BoxNodePainter painter) { this.painter = painter; getLabelGeneratorController().setGenerator(painter.labelGenerator); updateController(); } public void updateController() { if (painter != null) { isUpdating = true; getBaseColorButton().setBackground(painter.getBaseColor()); Color bc = painter.getBorderColor(); if (bc == null) { getBorderColorCheckBox().setSelected(false); getBorderColorButton().setEnabled(false); getBorderColorButton().setBackground(painter.getBorderColor(false,false,false)); } else { getBorderColorCheckBox().setSelected(true); getBorderColorButton().setEnabled(true); getBorderColorButton().setBackground(bc); } getTextColorButton().setBackground(painter.getTextColor()); isUpdating = false; } } public void updatePainter() { if (!isUpdating && painter != null) { painter.setBaseColor(getBaseColorButton().getBackground()); if (getBorderColorCheckBox().isSelected()) { painter.setBorderColor(getBorderColorButton().getBackground()); } else { painter.setBorderColor(null); } painter.setTextColor(getTextColorButton().getBackground()); } } /** * This method initializes baseColorButton * * @return javax.swing.JButton */ private JButton getBaseColorButton() { if (baseColorButton == null) { baseColorButton = new JButton(); baseColorButton.setPreferredSize(new java.awt.Dimension(40,20)); baseColorButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Color newColor = JColorChooser.showDialog( null, "Choose Base Color", baseColorButton.getBackground()); if (newColor != null) { baseColorButton.setBackground(newColor); if (!getBorderColorCheckBox().isSelected()) { borderColorButton.setBackground(newColor.darker()); } updatePainter(); } } }); } return baseColorButton; } /** * This method initializes borderColorCheckBox * * @return javax.swing.JCheckBox */ private JCheckBox getBorderColorCheckBox() { if (borderColorCheckBox == null) { borderColorCheckBox = new JCheckBox(); borderColorCheckBox.setText("border color"); borderColorCheckBox.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); borderColorCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { getBorderColorButton().setEnabled(borderColorCheckBox.isSelected()); } }); } return borderColorCheckBox; } /** * This method initializes borderColorButton * * @return javax.swing.JButton */ private JButton getBorderColorButton() { if (borderColorButton == null) { borderColorButton = new JButton(); borderColorButton.setPreferredSize(new java.awt.Dimension(40,20)); borderColorButton.setEnabled(false); borderColorButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Color newColor = JColorChooser.showDialog( null, "Choose Border Color", borderColorButton.getBackground()); if (newColor != null) { borderColorButton.setBackground(newColor); updatePainter(); } } }); } return borderColorButton; } /** * This method initializes textColorLabel * * @return javax.swing.JLabel */ private JLabel getTextColorLabel() { if (textColorLabel == null) { textColorLabel = new JLabel(); textColorLabel.setText("text color"); textColorLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); } return textColorLabel; } /** * This method initializes textColorButton * * @return javax.swing.JButton */ private JButton getTextColorButton() { if (textColorButton == null) { textColorButton = new JButton(); textColorButton.setPreferredSize(new java.awt.Dimension(40,20)); textColorButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { Color newColor = JColorChooser.showDialog( null, "Choose Text Color", textColorButton.getBackground()); if (newColor != null) { textColorButton.setBackground(newColor); updatePainter(); } } }); } return textColorButton; } /** * This method initializes baseColorLabel * * @return javax.swing.JLabel */ private JLabel getBaseColorLabel() { if (baseColorLabel == null) { baseColorLabel = new JLabel(); baseColorLabel.setText("base color"); baseColorLabel.setFont(new java.awt.Font("Dialog", java.awt.Font.PLAIN, 10)); } return baseColorLabel; } /** * This method initializes labelGeneratorController * * @return org.mediavirus.graphl.view.LabelGeneratorController */ private LabelGeneratorController getLabelGeneratorController() { if (labelGeneratorController == null) { labelGeneratorController = new LabelGeneratorController(); } return labelGeneratorController; } } --- NEW FILE: ImageNodePainter.java --- /* * Created on 12.06.2004 by flo */ package org.mediavirus.graphl.painter; import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import java.awt.Point; import java.awt.Rectangle; import java.awt.image.BufferedImage; import java.awt.image.ImageObserver; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.Hashtable; import javax.swing.JComponent; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.view.JGraphPane; /** * @author flo * created: 12.06.2004 02:50:17 */ public class ImageNodePainter extends AbstractNodePainter implements ImageObserver { boolean drawBorder = true; Color borderColor = Color.gray; public static final int DEFAULT_WIDTH = 20; public static final int DEFAULT_HEIGHT = 20; Image defaultImage = new BufferedImage(DEFAULT_WIDTH, DEFAULT_HEIGHT, BufferedImage.TYPE_3BYTE_BGR); Image notFoundImage = new BufferedImage(DEFAULT_WIDTH, DEFAULT_HEIGHT, BufferedImage.TYPE_3BYTE_BGR); static Hashtable images = new Hashtable(); public ImageNodePainter() { Graphics g = defaultImage.getGraphics(); g.setColor(Color.lightGray); g.fillRect(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT); g = notFoundImage.getGraphics(); g.setColor(Color.red); g.fillRect(0,0,DEFAULT_WIDTH,DEFAULT_HEIGHT); } // TODO (1): add default image if img cannot be loaded, or fallback node painter, or nothing (prefs) /* * Overrides @see org.mediavirus.graphl.view.NodePainter#paintNode(org.mediavirus.graphl.view.JGraphPane, java.awt.Graphics2D, org.mediavirus.graphl.graph.Node) */ public void paintNode(JGraphPane graphPane, Graphics2D g, Node node, boolean selected, boolean highlighted) { Image img = getImage(node, graphPane.getGraph().getBaseURL()); if (img != null) { int iw = img.getWidth(this); int ih = img.getHeight(this); g.drawImage(img, (int)node.getX()-iw/2, (int)node.getY()-ih/2, this); if (drawBorder) { g.setColor(borderColor); g.drawRect((int)node.getX()-iw/2,(int)node.getY()-ih/2,iw, ih); } } } Image getImage(Node node, URL baseURL){ Image img = (Image)images.get(node); if (img == null) { // guess if this is an image URL if (node.getValue() != null && (node.getValue().endsWith(".gif") || node.getValue().endsWith(".jpg") || node.getValue().endsWith(".png"))){ // TODO (2): where to get a reference for relative urls? try { URL url = new URL(baseURL, node.getValue()); img = (Image)url.getContent(new Class[]{Image.class}); } catch (MalformedURLException muex) { img = notFoundImage; } catch (IOException ioex) { img = notFoundImage; } } if (img != null) { images.put(node, img); } else { images.put(node, defaultImage); } } return img; } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#isInNode(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Point) */ public boolean isInNode(JGraphPane graphPane, Node node, Point point) { Rectangle nodeScreenRectangle=new Rectangle(); getNodeScreenBounds(graphPane,node,nodeScreenRectangle); return nodeScreenRectangle.contains(point); } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getNodeScreenBounds(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Rectangle) */ public void getNodeScreenBounds(JGraphPane graphPane, Node node, Rectangle nodeScreenRectangle) { Point nodePoint=graphPane.getScreenPointForNode(node); int width=1; int height=1; Image img = getImage(node, graphPane.getGraph().getBaseURL()); if (img != null) { width = img.getWidth(this); height = img.getHeight(this); } nodeScreenRectangle.setBounds(nodePoint.x-width/2, nodePoint.y-height/2, width, height); } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getToolTipText(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Point) */ public String getToolTipText(JGraphPane graphPane, Node node, Point point) { return node.getValue(); } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#isEdgeDragPoint(org.mediavirus.graphl.view.JGraphPane, org.mediavirus.graphl.graph.Node, java.awt.Point) */ public boolean isEdgeDragPoint(JGraphPane graphPane, Node node, Point p) { // TODO (2) implement this return false; } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getRepulsion(org.mediavirus.graphl.graph.RDFNode) */ public double getRepulsion(Node node) { return node.getRepulsion(); } /* * Overrides @see org.mediavirus.graphl.view.NodePainter#getEdgePin(org.mediavirus.graphl.graph.RDFNode, org.mediavirus.graphl.graph.RDFEdge) */ public Point getEdgePin(Node node, Edge edge) { return new Point((int)node.getX(), (int)node.getY()); } /* * Overrides @see org.mediavirus.graphl.view.Facet#getStyleName() */ public String getName() { return "Image"; } public String toString() { return getName(); } /* * Overrides @see org.mediavirus.graphl.view.Facet#hasVisualController() */ public boolean hasVisualController() { return false; } /* * Overrides @see org.mediavirus.graphl.view.Facet#getVisualController() */ public JComponent getVisualController() { return null; } /* * Overrides @see org.mediavirus.graphl.view.Facet#isSameClass(java.lang.Object) */ public boolean isSameClass(Object o) { return (o instanceof ImageNodePainter); } /* * Overrides @see java.lang.Object#clone() */ public Object clone() { return new ImageNodePainter(); } /* * Overrides @see java.awt.image.ImageObserver#imageUpdate(java.awt.Image, int, int, int, int, int) */ public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) { return true; } } --- NEW FILE: InvisibleNodePainter.java --- /* * Created on 30.05.2004 by flo */ package org.mediavirus.graphl.painter; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import javax.swing.JComponent; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.view.JGraphPane; /** * @author flo * created: 30.05.2004 22:11:49 */ public class InvisibleNodePainter extends AbstractNodePainter { public static final int FOCUS_SIZE = 10; /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#isEdgeDragPoint(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Point) */ public boolean isEdgeDragPoint(JGraphPane graphPane, Node node, Point p) { return false; } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#getRepulsion(org.mediavirus.graphl.RDFNode) */ public double getRepulsion(Node node) { return 0; } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#getEdgePin(org.mediavirus.graphl.RDFNode, org.mediavirus.graphl.RDFEdge) */ public Point getEdgePin(Node node, Edge edge) { return null; } /* * Overrides @see de.fzi.wim.guibase.graphview.view.NodePainter#paintNode(de.fzi.wim.guibase.graphview.view.JGraphPane, java.awt.Graphics2D, de.fzi.wim.guibase.graphview.graph.Node) */ public void paintNode(JGraphPane graphPane, Graphics2D g, Node node, boolean selected, boolean highlighted) { } /* * Overrides @see de.fzi.wim.guibase.graphview.view.NodePainter#isInNode(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Point) */ public boolean isInNode(JGraphPane graphPane, Node node, Point point) { Rectangle nodeScreenRectangle=new Rectangle(); Point nodePoint=graphPane.getScreenPointForNode(node); nodeScreenRectangle.setBounds(nodePoint.x-5,nodePoint.y-5,FOCUS_SIZE,FOCUS_SIZE); return nodeScreenRectangle.contains(point); } /* * Overrides @see de.fzi.wim.guibase.graphview.view.NodePainter#getNodeScreenBounds(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Rectangle) */ public void getNodeScreenBounds(JGraphPane graphPane, Node node, Rectangle nodeScreenRectangle) { Point p=graphPane.getScreenPointForNode(node); nodeScreenRectangle.setFrame(p.x,p.y,1,1); } /* * Overrides @see de.fzi.wim.guibase.graphview.view.NodePainter#getToolTipText(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Node, java.awt.Point) */ public String getToolTipText(JGraphPane graphPane, Node node, Point point) { return null; } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#getStyleName() */ public String getName() { return "Invisible"; } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#hasVisualController() */ public boolean hasVisualController() { return false; } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#getVisualController() */ public JComponent getVisualController() { return null; } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#isSameClass(de.fzi.wim.guibase.graphview.view.NodePainter) */ public boolean isSameClass(Object p) { return (p instanceof InvisibleNodePainter); } /* * Overrides @see org.mediavirus.graphl.view.GraphlNodePainter#clone() */ public Object clone() { return new InvisibleNodePainter(); } } --- NEW FILE: AbstractNodePainter.java --- /* * Created on 23.07.2004 by flo */ package org.mediavirus.graphl.painter; import org.mediavirus.graphl.view.AbstractFacet; /** * @author flo * created: 23.07.2004 00:09:27 */ public abstract class AbstractNodePainter extends AbstractFacet implements NodePainter{ } --- NEW FILE: NodePainter.java --- package org.mediavirus.graphl.painter; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.view.Facet; import org.mediavirus.graphl.view.JGraphPane; /** * The painter for the node. */ public interface NodePainter extends Facet{ /** * Paints the supplied node. * * @param graphPane the graph pane * @param g the graphics * @param node the node to paint */ void paintNode(JGraphPane graphPane, Graphics2D g, Node node, boolean selected, boolean highlighted); /** * Checks whether given point is inside the node. * * @param graphPane the graph pane * @param node the node * @param point the point * @return <code>true</code> if the point is in the node */ boolean isInNode(JGraphPane graphPane,Node node,Point point); /** * Returns the outer rectangle of the node on screen. * * @param graphPane the graph pane * @param node the node * @param nodeScreenRectangle the rectangle receiving the node's coordinates */ void getNodeScreenBounds(JGraphPane graphPane,Node node,Rectangle nodeScreenRectangle); /** * Retruns the tool-tip for given point. * * @param graphPane the graph pane * @param node the node * @param point the point * @return the tool-tip at given point (or <code>null</code>) */ String getToolTipText(JGraphPane graphPane,Node node,Point point); public boolean isEdgeDragPoint(JGraphPane graphPane,Node node,Point p); public double getRepulsion(Node node); /** * Returns the coordinates of the location to connect the given edge. If null * is returned, this indicated that the given edge should not be drawn (e.g. * if this node is invisible). * @param node The node that the edge is connected to. * @param edge The edge that is connected to the given node. * @return The location of the connection point, or null if the edge should not be drawn. */ public Point getEdgePin(Node node, Edge edge); } --- NEW FILE: LineEdgePainterController.java --- /* * Created on 20.06.2004 by flo */ package org.mediavirus.graphl.painter; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.DefaultComboBoxModel; import javax.swing.JCheckBox; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JSlider; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.mediavirus.graphl.view.LabelGeneratorController; class LineEdgePainterController extends JPanel implements ChangeListener, ActionListener { protected LineEdgePainter painter; JSlider widthSlider; JComboBox lineTypeComboBox; private JCheckBox paintArrowCheckBox; private JCheckBox paintLabelCheckBox; private JLabel styleLabel; private JLabel widthLabel; private boolean isUpdating = false; private LabelGeneratorController labelGeneratorController = null; LineEdgePainterController() { initialize(); } LineEdgePainterController(LineEdgePainter p) { initialize(); setPainter(p); } /** * @return Returns the painter. */ public LineEdgePainter getPainter() { return painter; } /** * @param painter The painter to set. */ public void setPainter(LineEdgePainter painter) { this.painter = painter; getLabelGeneratorController().setGenerator(painter.labelGenerator); updateController(); } protected void initialize() { java.awt.GridBagConstraints gridBagConstraints12 = new GridBagConstraints(); java.awt.GridBagConstraints gridBagConstraints1 = new GridBagConstraints(); this.setLayout(new GridBagLayout()); GridBagConstraints c1 = new GridBagConstraints(); GridBagConstraints c2 = new GridBagConstraints(); GridBagConstraints c3 = new GridBagConstraints(); GridBagConstraints c4 = new GridBagConstraints(); GridBagConstraints c6 = new GridBagConstraints(); c1.anchor = java.awt.GridBagConstraints.EAST; c1.gridy = 0; c1.gridx = 0; c1.insets = new java.awt.Insets(0,4,0,0); c2.gridx = 1; c2.gridy = 0; c2.insets = new java.awt.Insets(0,0,0,0); c3.gridy = 1; c3.gridx = 0; c3.anchor = java.awt.GridBagConstraints.EAST; c4.gridx = 1; c4.gridy = 1; c4.fill = java.awt.GridBagConstraints.NONE; c4.anchor = java.awt.GridBagConstraints.WEST; c4.insets = new java.awt.Insets(0,4,0,0); c6.gridwidth = 1; c6.gridx = 1; c6.gridy = 3; c6.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints1.gridx = 1; gridBagConstraints1.gridy = 4; gridBagConstraints1.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints12.gridx = 0; gridBagConstraints12.gridy = 5; gridBagConstraints12.gridwidth = 2; this.add(getWidthLabel(), c1); this.add(getWidthSlider(), c2); this.add(getStyleLabel(), c3); this.add(getLineTypeComboBox(), c4); this.add(getPaintArrowCheckBox(), c6); this.add(getPaintLabelCheckBox(), gridBagConstraints1); this.add(getLabelGeneratorController(), gridBagConstraints12); } /** * @return */ protected JLabel getStyleLabel() { if (styleLabel == null) { styleLabel = new JLabel(); styleLabel.setText("Line Style"); } return styleLabel; } /** * @return */ protected JLabel getWidthLabel() { if (widthLabel == null) { widthLabel = new JLabel(); widthLabel.setText("Line Width"); } return widthLabel; } /** * @return */ private JCheckBox getPaintArrowCheckBox() { if (paintArrowCheckBox == null) { paintArrowCheckBox = new JCheckBox(); paintArrowCheckBox.setText("Paint Arrow"); paintArrowCheckBox.addActionListener(this); } return paintArrowCheckBox; } /** * @return */ private JCheckBox getPaintLabelCheckBox() { if (paintLabelCheckBox == null) { paintLabelCheckBox = new JCheckBox(); paintLabelCheckBox.setText("Paint Label"); paintLabelCheckBox.addActionListener(this); } return paintLabelCheckBox; } /** * @return */ private JComboBox getLineTypeComboBox() { if (lineTypeComboBox == null) { lineTypeComboBox = new JComboBox(); DefaultComboBoxModel model = new DefaultComboBoxModel(); model.addElement("Solid"); model.addElement("Dashed"); model.addElement("Dotted"); lineTypeComboBox.setModel(model); lineTypeComboBox.addActionListener(this); } return lineTypeComboBox; } public void updateController() { isUpdating = true; getPaintLabelCheckBox().setSelected(painter.isPaintingLabel()); boolean temp = painter.isPaintingArrow(); JCheckBox box = getPaintArrowCheckBox(); box.setSelected(temp); getWidthSlider().setValue((int)(painter.getLineWidth() * 10)); getLineTypeComboBox().setSelectedIndex(painter.getLineStyle()); isUpdating = false; } public void updatePainter() { if (painter != null) { painter.setLineWidth(getWidthSlider().getValue()/10.0f); painter.setLineStyle(getLineTypeComboBox().getSelectedIndex()); painter.setPaintingArrow(getPaintArrowCheckBox().isSelected()); painter.setPaintingLabel(getPaintLabelCheckBox().isSelected()); } } public void stateChanged(ChangeEvent e) { if (!isUpdating) { updatePainter(); } } public void actionPerformed(ActionEvent e) { updatePainter(); } protected JSlider getWidthSlider() { if (widthSlider == null) { widthSlider = new JSlider(); widthSlider.setMinimum(1); widthSlider.setMaximum(30); widthSlider.setPaintLabels(true); widthSlider.setPaintTicks(true); widthSlider.setPreferredSize(new java.awt.Dimension(150,27)); widthSlider.addChangeListener(this); } return widthSlider; } /** * This method initializes labelGeneratorController * * @return org.mediavirus.graphl.view.LabelGeneratorController */ private LabelGeneratorController getLabelGeneratorController() { if (labelGeneratorController == null) { labelGeneratorController = new LabelGeneratorController(); } return labelGeneratorController; } } --- NEW FILE: ManhattanEdgePainter.java --- /* * Created on 14.03.2004 * */ package org.mediavirus.graphl.painter; import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import org.mediavirus.graphl.GraphlPane; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.graph.rdf.RDFEdge; import org.mediavirus.graphl.view.JGraphPane; /** * * @author flo */ public class ManhattanEdgePainter extends LineEdgePainter { /** * @see org.mediavirus.graphl.painter.LineEdgePainter#doPaintEdge(de.fzi.wim.guibase.graphview.view.JGraphPane, java.awt.Graphics2D, de.fzi.wim.guibase.graphview.graph.Edge, boolean, boolean) */ void doPaintEdge(JGraphPane graphPane, Graphics2D g, Edge edge, boolean selected, boolean highlighted) { g.setStroke(getStroke(selected, highlighted)); Point points[] = getVertices(graphPane, edge); if (points != null) { for (int i=0; i<points.length-1; i++){ g.drawLine(points[i].x,points[i].y,points[i+1].x,points[i+1].y); } } // TODO (2): draw arrow (0.5h) } /** * @see de.fzi.wim.guibase.graphview.view.EdgePainter#screenDistanceFromEdge(de.fzi.wim.guibase.graphview.view.JGraphPane, de.fzi.wim.guibase.graphview.graph.Edge, java.awt.Point) */ public double screenDistanceFromEdge( JGraphPane graphPane, Edge edge, Point point) { int dist = 1000; int d = 1000; int px = point.x; int py = point.y; Point points[] = getVertices(graphPane, edge); if (points != null) { for (int i=0; i<points.length-1; i++){ if (points[i].x == points[i+1].x) { // vertical line d = Math.abs(px - points[i].x); if (py > Math.max(points[i].y, points[i+1].y)) { d = Math.max(d, py - Math.max(points[i].y, points[i+1].y)); } else if (py < Math.min(points[i].y, points[i+1].y)) { d = Math.max(d, Math.min(points[i].y, points[i+1].y) - py); } } else if (points[i].y == points[i+1].y) { // horizontal line d = Math.abs(py - points[i].y); if (px > Math.max(points[i].x, points[i+1].x)) { d = Math.max(d, px - Math.max(points[i].x, points[i+1].x)); } else if (px < Math.min(points[i].x, points[i+1].x)) { d = Math.max(d, Math.min(points[i].x, points[i+1].x) - px); } } if (d < dist) dist = d; } } return dist; } protected Point[] getVertices(JGraphPane graphPane, Edge edge){ //TODO (2): distribute incoming & outgoing connections across side of node (3h) Node src = edge.getFrom(); Node dst = edge.getTo(); Point from = graphPane.getScreenPointForNode(src); Point to = graphPane.getScreenPointForNode(dst); int x1 = from.x; int y1 = from.y; int x2 = to.x; int y2 = to.y; NodePainter p = graphPane.getPainterForNode(src); Rectangle r = new Rectangle(); p.getNodeScreenBounds(graphPane, src, r); int outcode = r.outcode(x2,y2); if (outcode == Rectangle.OUT_BOTTOM || outcode == Rectangle.OUT_TOP) { Point points[] = {new Point(x1,y1),new Point(x1,(y1+y2)/2),new Point(x2,(y1+y2)/2),new Point(x2,y2)}; return points; } if (outcode == Rectangle.OUT_LEFT || outcode == Rectangle.OUT_RIGHT) { Point points[] = {new Point(x1,y1),new Point((x1+x2)/2,y1),new Point((x1+x2)/2,y2),new Point(x2,y2)}; return points; } Point points[] = {new Point(x1,y1),new Point(x2,y1),new Point(x2,y2)}; return points; } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#isPointInLabel(org.mediavirus.graphl.GraphlPane, org.mediavirus.graphl.RDFEdge, java.awt.Point) */ public boolean isPointInLabel(GraphlPane graphPane, RDFEdge edge, Point point) { return false; } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#getStyleName() */ public String getName() { return "Manhattan Line"; } public String toString() { return getName(); } public Object clone() { ManhattanEdgePainter p = new ManhattanEdgePainter(); return p; } public boolean isSameClass(Object p) { return (p instanceof ManhattanEdgePainter); } /* * Overrides @see org.mediavirus.graphl.view.GraphlEdgePainter#getLength(org.mediavirus.graphl.RDFEdge) */ public double getLength(RDFEdge edge) { return edge.getLength(); } } --- NEW FILE: AbstractEdgePainter.java --- package org.mediavirus.graphl.painter; import java.awt.Point; import java.awt.Rectangle; import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.view.AbstractFacet; import org.mediavirus.graphl.view.JGraphPane; /** * The abstract painter for edges. */ public abstract class AbstractEdgePainter extends AbstractFacet implements EdgePainter { /** * Returns the distance of the point to the edge. * * @param graphPane the graph pane * @param edge the edge * @param point the point * @return the distance of the point from the edge */ public double screenDistanceFromEdge(JGraphPane graphPane,Edge edge,Point point) { double px=point.x; double py=point.y; Point from=graphPane.getScreenPointForNode(edge.getFrom()); Point to=graphPane.getScreenPointForNode(edge.getTo()); double x1=from.x; double y1=from.y; double x2=to.x; double y2=to.y; if (px<Math.min(x1,x2)-8 || px>Math.max(x1,x2)+8 || py<Math.min(y1,y2)-8 || py>Math.max(y1,y2)+8) return 1000; double dist=1000; if (x1-x2!=0) dist=Math.abs((y2-y1)/(x2-x1)*(px-x1)+(y1-py)); if (y1-y2!=0) dist=Math.min(dist,Math.abs((x2-x1)/(y2-y1)*(py-y1)+(x1-px))); return dist; } /** * Returns the outer rectangle of the edge on screen. * * @param graphPane the graph pane * @param edge the edge * @param edgeScreenRectangle the rectangle receiving the edge's coordinates */ public void getE... [truncated message content] |
From: Flo L. <fl...@us...> - 2004-08-02 12:36:59
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl/graph Modified Files: Node.java ReificationNode.java DefaultNode.java Edge.java DefaultEdge.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure Index: Edge.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/Edge.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Edge.java 23 Jul 2004 08:57:29 -0000 1.5 --- Edge.java 2 Aug 2004 12:36:49 -0000 1.6 *************** *** 2,6 **** import org.mediavirus.graphl.layout.EdgeLayouter; ! import org.mediavirus.graphl.view.EdgePainter; /** --- 2,6 ---- import org.mediavirus.graphl.layout.EdgeLayouter; ! import org.mediavirus.graphl.painter.EdgePainter; /** *************** *** 37,41 **** * be reflected in the future by making this method package local and putting the * necessary classes into the same package. All other classes should use the method ! * @see org.mediavirus.graphl.PainterRegistry#setPainterForEdge() to set a specific * painter for this edge. * --- 37,41 ---- * be reflected in the future by making this method package local and putting the * necessary classes into the same package. All other classes should use the method ! * @see org.mediavirus.graphl.view.FacetRegistry#setPainterForEdge() to set a specific * painter for this edge. * Index: Node.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/Node.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Node.java 23 Jul 2004 08:57:29 -0000 1.5 --- Node.java 2 Aug 2004 12:36:49 -0000 1.6 *************** *** 4,8 **** import org.mediavirus.graphl.layout.NodeLayouter; ! import org.mediavirus.graphl.view.NodePainter; /** --- 4,8 ---- import org.mediavirus.graphl.layout.NodeLayouter; ! import org.mediavirus.graphl.painter.NodePainter; /** *************** *** 66,70 **** * be reflected in the future by making this method package local and putting the * necessary classes into the same package. All other classes should use the method ! * @see org.mediavirus.graphl.PainterRegistry#setPainterForNode() to set a specific * painter for this node. * --- 66,70 ---- * be reflected in the future by making this method package local and putting the * necessary classes into the same package. All other classes should use the method ! * @see org.mediavirus.graphl.view.FacetRegistry#setPainterForNode() to set a specific * painter for this node. * Index: DefaultNode.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/DefaultNode.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** DefaultNode.java 23 Jul 2004 08:57:29 -0000 1.8 --- DefaultNode.java 2 Aug 2004 12:36:49 -0000 1.9 *************** *** 6,10 **** import org.mediavirus.graphl.layout.NodeLayouter; ! import org.mediavirus.graphl.view.NodePainter; /** --- 6,10 ---- import org.mediavirus.graphl.layout.NodeLayouter; ! import org.mediavirus.graphl.painter.NodePainter; /** Index: ReificationNode.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/ReificationNode.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReificationNode.java 23 Jul 2004 08:57:29 -0000 1.3 --- ReificationNode.java 2 Aug 2004 12:36:49 -0000 1.4 *************** *** 5,10 **** package org.mediavirus.graphl.graph; ! import org.mediavirus.graphl.view.NodePainter; ! import org.mediavirus.graphl.view.ReificationNodePainter; /** --- 5,10 ---- package org.mediavirus.graphl.graph; ! import org.mediavirus.graphl.painter.NodePainter; ! import org.mediavirus.graphl.painter.ReificationNodePainter; /** Index: DefaultEdge.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/graph/DefaultEdge.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** DefaultEdge.java 23 Jul 2004 08:57:29 -0000 1.7 --- DefaultEdge.java 2 Aug 2004 12:36:49 -0000 1.8 *************** *** 4,8 **** import org.mediavirus.graphl.layout.EdgeLayouter; ! import org.mediavirus.graphl.view.EdgePainter; /** --- 4,8 ---- import org.mediavirus.graphl.layout.EdgeLayouter; ! import org.mediavirus.graphl.painter.EdgePainter; /** |
From: Flo L. <fl...@us...> - 2004-08-02 12:36:59
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/interaction In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl/interaction Added Files: Manipulator.java GraphlManipulator.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure --- NEW FILE: GraphlManipulator.java --- /* * Created on 31.10.2003 * */ package org.mediavirus.graphl.interaction; import java.awt.Cursor; import java.awt.Graphics2D; import java.awt.Point; import java.awt.event.MouseEvent; import java.awt.geom.Point2D; import java.util.Collections; import org.mediavirus.graphl.GraphlPane; import org.mediavirus.graphl.graph.*; import org.mediavirus.graphl.graph.rdf.RDFEdge; import org.mediavirus.graphl.graph.rdf.RDFNode; import org.mediavirus.graphl.gui.EdgeContextMenu; import org.mediavirus.graphl.gui.NodeContextMenu; import org.mediavirus.graphl.gui.NodeEditingController; import org.mediavirus.graphl.gui.TextFieldInPlaceNodeEditor; import org.mediavirus.graphl.painter.ArrowEdgePainter; import org.mediavirus.graphl.painter.NodePainter; import org.mediavirus.graphl.view.AbstractManipulator; /** * @author flo * */ public class GraphlManipulator extends AbstractManipulator implements NodeEditingController{ private boolean moved = false; /** The position of the last mouse event. */ protected Point lastPosition; /** The edge that is being dragged. */ protected Point grabPoint; protected boolean oldFixedState; protected Cursor graphCursor; private long lastClick; private Point mousePos; private Node edgeNode; private Edge dragEdge = null; private Node dragNode = null; private double oldLength = 2; Point dragStart = null; private NodeContextMenu nodeMenu = null; private EdgeContextMenu edgeMenu = null; int sequence = 0; private Point2D oldTranslation; boolean doDragNode = true; public GraphlManipulator(){ } public void mousePressed(MouseEvent e) { Point p = new Point(); graphPane.screenToGraphPoint(e.getPoint(),p); Node overNode = graphPane.getNodeAtPoint(p); Edge overEdge = graphPane.getNearestEdge(p); if (e.getModifiers() == MouseEvent.BUTTON1_MASK) { dragStart = e.getPoint(); if (overNode != null) { NodePainter painter = overNode.getCurrentPainter(); if (painter.isEdgeDragPoint(graphPane, overNode, p)) { edgeNode = overNode; e.consume(); } else { doDragNode = true; if (overNode.getCurrentLayouter().isDraggable()) { dragNode = overNode; moved = false; dragNode.setDragging(true); lastPosition=e.getPoint(); Point nodeScreenPoint=graphPane.getScreenPointForNode(dragNode); grabPoint=new Point(p.x-nodeScreenPoint.x,p.y-nodeScreenPoint.y); graphCursor=graphPane.getCursor(); graphPane.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR)); } } } else if (overEdge != null) { dragEdge = (RDFEdge)overEdge; oldLength = dragEdge.getLength(); e.consume(); } else { oldTranslation = ((GraphlPane)graphPane).getTranslation(); } } else if (e.getModifiers() == MouseEvent.BUTTON3_MASK) { if (overNode != null) { nodeMenu.show(e.getX(), e.getY(), overNode); } else if(overEdge != null) { // TODO (2): stop layout and resume later. (move layouter to graphlpane) (0.5h) edgeMenu.show(e.getX(), e.getY(), overEdge); } } } public void mouseClicked(MouseEvent e) { Point p = new Point(); graphPane.screenToGraphPoint(e.getPoint(),p); Node clickNode = graphPane.getNodeAtPoint(p); RDFEdge clickEdge = (RDFEdge)graphPane.getNearestEdge(p); if ((e.getWhen() - lastClick) < 300) { if ((clickNode == null) && (clickEdge == null)) { clickNode = graphPane.getGraph().createNode(); clickNode.setLocation(p.getX(), p.getY()); ((DefaultGraph)graphPane.getGraph()).addElements(Collections.singleton(clickNode), null); graphPane.getGraph().notifyLayoutUpdated(); } else if (clickNode != null) { TextFieldInPlaceNodeEditor editor = new TextFieldInPlaceNodeEditor(graphPane, clickNode, this); editor.startEditing(); } else if (clickEdge != null) { if ( clickEdge.getCurrentPainter().isPointInLabel(graphPane, clickEdge, p)){ //TODO (2): show in-place editor for edge } else { clickEdge.invert(); graphPane.getGraph().notifyLayoutUpdated(); } } } else { if ((e.getModifiers() & MouseEvent.CTRL_MASK) == 0) { graphPane.getSelection().clear(); graphPane.getGraph().notifyLayoutUpdated(); } if (clickNode != null) { if (graphPane.getSelection().isNodeSelected(clickNode)) { graphPane.getSelection().removeNode(clickNode); } else { graphPane.getSelection().addNode(clickNode); } graphPane.getGraph().notifyLayoutUpdated(); } else if (clickEdge != null) { if (graphPane.getSelection().isEdgeSelected(clickEdge)) { graphPane.getSelection().removeEdge(clickEdge); } else { graphPane.getSelection().addEdge(clickEdge); } graphPane.getGraph().notifyLayoutUpdated(); } } lastClick = e.getWhen(); } public void mouseReleased(MouseEvent e) { if (dragNode!=null) { moveDraggedNode(e.getPoint()); dragNode.setDragging(false); graphPane.setCursor(graphCursor); graphCursor=null; grabPoint=null; lastPosition=null; if (moved) e.consume(); } else if (edgeNode != null) { Point p = new Point(); graphPane.screenToGraphPoint(e.getPoint(),p); Node overNode = graphPane.getNodeAtPoint(p); if (overNode!=null && overNode!=edgeNode) { // we also allow multiple edges between two nodes! RDFEdge edge = new RDFEdge(edgeNode, overNode); ((DefaultGraph)graphPane.getGraph()).addElements(null, Collections.singleton(edge)); } else if ( overNode!=edgeNode ) { Node newNode = graphPane.getGraph().createNode(); newNode.setLocation(p.getX(), p.getY()); Edge edge = graphPane.getGraph().createEdge(edgeNode, newNode); Point d = new Point(); graphPane.screenToGraphPoint(dragStart,d); ((DefaultEdge)edge).setLength(dragStart.distance(d)); ((DefaultGraph)graphPane.getGraph()).addElements(Collections.singleton(newNode), Collections.singleton(edge)); TextFieldInPlaceNodeEditor editor = new TextFieldInPlaceNodeEditor(graphPane, newNode, this); editor.startEditing(); } } dragEdge = null; dragNode = null; edgeNode = null; doDragNode = false; } public void mouseDragged(MouseEvent e) { mousePos = e.getPoint(); Point p = new Point(); graphPane.screenToGraphPoint(mousePos, p); if (doDragNode && dragNode!=null) { autoscroll(e); moveDraggedNode(e.getPoint()); e.consume(); moved = true; } else if (dragEdge != null) { int delta = (int)(mousePos.getY() - dragStart.getY()); // TODO (2) setLength is not in Node interface! -> Edge Manipulators if (oldLength-delta > 2) ((DefaultEdge)dragEdge).setLength(oldLength-delta); else ((DefaultEdge)dragEdge).setLength(2); graphPane.repaint(); e.consume(); } else if (edgeNode != null) { graphPane.repaint(); e.consume(); } else if (!doDragNode && oldTranslation != null){ GraphlPane pane = (GraphlPane)graphPane; Point2D diff = new Point2D.Double(mousePos.getX() - dragStart.getX(),mousePos.getY() - dragStart.getY()); pane.setTranslation(diff.getX()+oldTranslation.getX(), diff.getY()+oldTranslation.getY()); } graphPane.getGraph().notifyLayoutUpdated(); } public void mouseMoved(MouseEvent e) { mousePos = e.getPoint(); } protected void moveDraggedNode(Point point) { if (!point.equals(lastPosition)) { lastPosition.setLocation(point.x,point.y); point.x-=grabPoint.x; point.y-=grabPoint.y; Point2D graphPoint=new Point2D.Double(); graphPane.screenToGraphPoint(point,graphPoint); dragNode.setLocation(graphPoint.getX(),graphPoint.getY()); graphPane.getGraph().notifyLayoutUpdated(); } } public String getName() { return "GraphlManipulator"; } public void paint(Graphics2D g2) { if (edgeNode != null) { if(mousePos==null) return; Point p = new Point((int)edgeNode.getX(), (int)edgeNode.getY()); Point sp = new Point(); graphPane.screenToGraphPoint(mousePos,sp); //TODO (3): use default edge painter (0.5h) //((GraphlPane)m_graphPane).getDefaultEdgePainter().paintEdge() ArrowEdgePainter.paintArrow(g2, (int)p.getX(), (int)p.getY(), (int)sp.getX(), (int)sp.getY()); } } /** * @see de.fzi.wim.guibase.graphview.inplaceedit.NodeEditingController#editingStarted(de.fzi.wim.guibase.graphview.graph.Node) */ public Object editingStarted(Node node) { return ((RDFNode)node).getValue(); } /** * @see de.fzi.wim.guibase.graphview.inplaceedit.NodeEditingController#editingFinished(de.fzi.wim.guibase.graphview.graph.Node, java.lang.Object) */ public boolean editingFinished(Node node, Object value) { if (!((String)value).equals("")) { ((RDFNode)node).setValue((String)value); } return true; } /** * @see de.fzi.wim.guibase.graphview.inplaceedit.NodeEditingController#editingAborted(de.fzi.wim.guibase.graphview.graph.Node) */ public void editingAborted(Node node) { } /* * Overrides @see de.fzi.wim.guibase.graphview.view.Manipulator#setGraphPane(de.fzi.wim.guibase.graphview.view.JGraphPane) */ public void setGraphPane(GraphlPane graphPane) { super.setGraphPane(graphPane); GraphlPane parent = (GraphlPane)graphPane; nodeMenu = new NodeContextMenu(parent); edgeMenu = new EdgeContextMenu(parent); } } --- NEW FILE: Manipulator.java --- package org.mediavirus.graphl.interaction; import java.awt.Graphics2D; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import java.awt.event.KeyListener; import java.awt.event.FocusListener; import org.mediavirus.graphl.GraphlPane; /** * A manipulator gets to process UI events in the graph pane. */ public interface Manipulator extends MouseListener,MouseMotionListener,KeyListener,FocusListener { /** * Sets the graph pane to the manipulator. * * @param graphPane the graph pane */ void setGraphPane(GraphlPane graphPane); /** * Returns the manipulator name. This is used to better search manipulators. * * @return the name of the manipulator */ String getName(); /** * Gives the manipulator an opportunity to update the screen. * * @param g the graphics where drawing should be performed */ void paint(Graphics2D g); /** * Notifies the manipulator that the graph pane has been scrolled. */ void notifyGraphPaneScrolled(); } |
From: Flo L. <fl...@us...> - 2004-08-02 12:36:59
|
Update of /cvsroot/graphl/graphl/src/org/mediavirus/graphl/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31344/src/org/mediavirus/graphl/gui Modified Files: NodeContextMenu.java EdgeContextMenu.java Log Message: big refactoring: * AssignableNodeController has been renamed to Facet * many methods renamed accordingly * new package for painters * moved around some classes to match new package structure Index: EdgeContextMenu.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/gui/EdgeContextMenu.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** EdgeContextMenu.java 23 Jul 2004 08:57:30 -0000 1.7 --- EdgeContextMenu.java 2 Aug 2004 12:36:48 -0000 1.8 *************** *** 19,24 **** import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.layout.EdgeLayouter; ! import org.mediavirus.graphl.view.AssignableGraphController; ! import org.mediavirus.graphl.view.EdgePainter; import org.mediavirus.graphl.vocabulary.ResourceActionListener; import org.mediavirus.graphl.vocabulary.ResourceMenu; --- 19,24 ---- import org.mediavirus.graphl.graph.Edge; import org.mediavirus.graphl.layout.EdgeLayouter; ! import org.mediavirus.graphl.painter.EdgePainter; ! import org.mediavirus.graphl.view.Facet; import org.mediavirus.graphl.vocabulary.ResourceActionListener; import org.mediavirus.graphl.vocabulary.ResourceMenu; *************** *** 71,79 **** private final class AssignControllerListener implements ActionListener { ! private AssignableGraphController controller; private boolean applyToEdge; private boolean clone = false; ! public AssignControllerListener(AssignableGraphController controller, boolean applyToEdge, boolean clone) { this.controller = controller; this.applyToEdge = applyToEdge; --- 71,79 ---- private final class AssignControllerListener implements ActionListener { ! private Facet controller; private boolean applyToEdge; private boolean clone = false; ! public AssignControllerListener(Facet controller, boolean applyToEdge, boolean clone) { this.controller = controller; this.applyToEdge = applyToEdge; *************** *** 82,88 **** public void actionPerformed(ActionEvent e) { ! AssignableGraphController newController; if (clone) { ! newController = (AssignableGraphController)controller.clone(); } else { --- 82,88 ---- public void actionPerformed(ActionEvent e) { ! Facet newController; if (clone) { ! newController = (Facet)controller.clone(); } else { *************** *** 193,198 **** private JMenu buildEdgeControllerSubMenu(Edge edge, int controllerType) { ! AssignableGraphController defaultController = null; ! AssignableGraphController currentController = null; Iterator availableControllers = null; --- 193,198 ---- private JMenu buildEdgeControllerSubMenu(Edge edge, int controllerType) { ! Facet defaultController = null; ! Facet currentController = null; Iterator availableControllers = null; *************** *** 223,228 **** private JMenu buildTypeControllerSubMenu(Edge edge, int controllerType) { ! AssignableGraphController defaultController = null; ! AssignableGraphController currentController = null; Iterator availableControllers = null; --- 223,228 ---- private JMenu buildTypeControllerSubMenu(Edge edge, int controllerType) { ! Facet defaultController = null; ! Facet currentController = null; Iterator availableControllers = null; *************** *** 255,259 **** * @return */ ! protected JMenu buildControllerSubMenu(AssignableGraphController defaultController, AssignableGraphController currentController, Iterator availableControllers, boolean applyToEdge) { JMenu menu = new JMenu(); JMenuItem defaultItem = new JRadioButtonMenuItem(); --- 255,259 ---- * @return */ ! protected JMenu buildControllerSubMenu(Facet defaultController, Facet currentController, Iterator availableControllers, boolean applyToEdge) { JMenu menu = new JMenu(); JMenuItem defaultItem = new JRadioButtonMenuItem(); *************** *** 284,288 **** while (availableControllers.hasNext()) { ! AssignableGraphController controller = (AssignableGraphController) availableControllers.next(); menu.add(createEdgeControllerMenuItem(controller, applyToEdge)); } --- 284,288 ---- while (availableControllers.hasNext()) { ! Facet controller = (Facet) availableControllers.next(); menu.add(createEdgeControllerMenuItem(controller, applyToEdge)); } *************** *** 295,299 **** * @return */ ! private JMenuItem createEdgeControllerMenuItem(AssignableGraphController controller, boolean applyToEdge) { String name = controller.getName(); --- 295,299 ---- * @return */ ! private JMenuItem createEdgeControllerMenuItem(Facet controller, boolean applyToEdge) { String name = controller.getName(); Index: NodeContextMenu.java =================================================================== RCS file: /cvsroot/graphl/graphl/src/org/mediavirus/graphl/gui/NodeContextMenu.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NodeContextMenu.java 27 Jul 2004 13:24:06 -0000 1.8 --- NodeContextMenu.java 2 Aug 2004 12:36:32 -0000 1.9 *************** *** 19,24 **** import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.layout.NodeLayouter; ! import org.mediavirus.graphl.view.AssignableGraphController; ! import org.mediavirus.graphl.view.NodePainter; import org.mediavirus.graphl.vocabulary.ResourceActionListener; import org.mediavirus.graphl.vocabulary.ResourceMenu; --- 19,24 ---- import org.mediavirus.graphl.graph.Node; import org.mediavirus.graphl.layout.NodeLayouter; ! import org.mediavirus.graphl.painter.NodePainter; ! import org.mediavirus.graphl.view.Facet; import org.mediavirus.graphl.vocabulary.ResourceActionListener; import org.mediavirus.graphl.vocabulary.ResourceMenu; *************** *** 71,79 **** private final class AssignControllerListener implements ActionListener { ! private AssignableGraphController controller; private boolean applyToNode; private boolean clone = false; ! public AssignControllerListener(AssignableGraphController controller, boolean applyToNode, boolean clone) { this.controller = controller; this.applyToNode = applyToNode; --- 71,79 ---- private final class AssignControllerListener implements ActionListener { ! private Facet controller; private boolean applyToNode; private boolean clone = false; ! public AssignControllerListener(Facet controller, boolean applyToNode, boolean clone) { this.controller = controller; this.applyToNode = applyToNode; *************** *** 82,88 **** public void actionPerformed(ActionEvent e) { ! AssignableGraphController newController; if (clone) { ! newController = (AssignableGraphController)controller.clone(); } else { --- 82,88 ---- public void actionPerformed(ActionEvent e) { ! Facet newController; if (clone) { ! newController = (Facet)controller.clone(); } else { *************** *** 193,198 **** private JMenu buildNodeControllerSubMenu(Node node, int controllerType) { ! AssignableGraphController defaultController = null; ! AssignableGraphController currentController = null; Iterator availableControllers = null; --- 193,198 ---- private JMenu buildNodeControllerSubMenu(Node node, int controllerType) { ! Facet defaultController = null; ! Facet currentController = null; Iterator availableControllers = null; *************** *** 223,228 **** private JMenu buildTypeControllerSubMenu(Node node, int controllerType) { ! AssignableGraphController defaultController = null; ! AssignableGraphController currentController = null; Iterator availableControllers = null; --- 223,228 ---- private JMenu buildTypeControllerSubMenu(Node node, int controllerType) { ! Facet defaultController = null; ! Facet currentController = null; Iterator availableControllers = null; *************** *** 257,261 **** * @return */ ! protected JMenu buildControllerSubMenu(AssignableGraphController defaultController, AssignableGraphController currentController, Iterator availableControllers, boolean applyToNode) { JMenu menu = new JMenu(); JMenuItem defaultItem = new JRadioButtonMenuItem(); --- 257,261 ---- * @return */ ! protected JMenu buildControllerSubMenu(Facet defaultController, Facet currentController, Iterator availableControllers, boolean applyToNode) { JMenu menu = new JMenu(); JMenuItem defaultItem = new JRadioButtonMenuItem(); *************** *** 286,290 **** while (availableControllers.hasNext()) { ! AssignableGraphController controller = (AssignableGraphController) availableControllers.next(); menu.add(createNodeControllerMenuItem(controller, applyToNode)); } --- 286,290 ---- while (availableControllers.hasNext()) { ! Facet controller = (Facet) availableControllers.next(); menu.add(createNodeControllerMenuItem(controller, applyToNode)); } *************** *** 297,301 **** * @return */ ! private JMenuItem createNodeControllerMenuItem(AssignableGraphController controller, boolean applyToNode) { String name = controller.getName(); --- 297,301 ---- * @return */ ! private JMenuItem createNodeControllerMenuItem(Facet controller, boolean applyToNode) { String name = controller.getName(); |