├── lib ├── ant.jar ├── lucene-1.4.3.jar ├── drivers │ └── mysql-connector-java-3.1.12-bin.jar ├── license-jakarta-lucene.txt └── license-colt.txt ├── data ├── chi-ontology.xml.gz ├── images │ ├── 0060929871.01.MZZZZZZZ.jpg │ ├── 0060936649.01.MZZZZZZZ.jpg │ ├── 0060938455.01.MZZZZZZZ.jpg │ ├── 0142001449.01.MZZZZZZZ.jpg │ ├── 0156006391.01.MZZZZZZZ.jpg │ ├── 0312282990.01.MZZZZZZZ.jpg │ ├── 0345368754.01.MZZZZZZZ.jpg │ ├── 0374528497.01.MZZZZZZZ.jpg │ ├── 0380789019.01.MZZZZZZZ.jpg │ ├── 0380789035.01.MZZZZZZZ.jpg │ ├── 0380977427.01.MZZZZZZZ.jpg │ ├── 038097827X.01.MZZZZZZZ.jpg │ ├── 0385333471.01.MZZZZZZZ.jpg │ ├── 038533348X.01.MZZZZZZZ.jpg │ ├── 0393320278.01.MZZZZZZZ.jpg │ ├── 0399143904.01.MZZZZZZZ.jpg │ ├── 0399149864.01.MZZZZZZZ.jpg │ ├── 0425164152.01.MZZZZZZZ.jpg │ ├── 0425164527.01.MZZZZZZZ.jpg │ ├── 0425165000.01.MZZZZZZZ.jpg │ ├── 043935806X.01.MZZZZZZZ.jpg │ ├── 0440414806.01.MZZZZZZZ.jpg │ ├── 0441003257.01.MZZZZZZZ.jpg │ ├── 0441172717.01.MZZZZZZZ.jpg │ ├── 044661162X.01.MZZZZZZZ.jpg │ ├── 0451524934.01.MZZZZZZZ.jpg │ ├── 0451526341.01.MZZZZZZZ.jpg │ ├── 0553380958.01.MZZZZZZZ.jpg │ ├── 0684833395.01.MZZZZZZZ.jpg │ ├── 0742525252.01.MZZZZZZZ.jpg │ ├── 0743249992.01.MZZZZZZZ.jpg │ ├── 076530953X.01.MZZZZZZZ.jpg │ ├── 0767908163.01.MZZZZZZZ.jpg │ ├── 0780020685.01.MZZZZZZZ.jpg │ ├── 0780021045.01.MZZZZZZZ.jpg │ ├── 0780022491.01.MZZZZZZZ.jpg │ ├── 0780022513.01.MZZZZZZZ.jpg │ ├── 0785100490.01.MZZZZZZZ.jpg │ ├── 0785108416.01.MZZZZZZZ.jpg │ ├── 0785111174.01.MZZZZZZZ.jpg │ ├── 0786884517.01.MZZZZZZZ.jpg │ ├── 0790729628.01.MZZZZZZZ.jpg │ ├── 0790731029.01.MZZZZZZZ.jpg │ ├── 0790749815.01.MZZZZZZZ.jpg │ ├── 0792844890.01.MZZZZZZZ.jpg │ ├── 0871137380.01.MZZZZZZZ.jpg │ ├── 0887347215.01.MZZZZZZZ.jpg │ ├── 0930289552.01.MZZZZZZZ.jpg │ ├── 0961392126.01.MZZZZZZZ.jpg │ ├── 0961392142.01.MZZZZZZZ.jpg │ ├── 0972179445.01.MZZZZZZZ.jpg │ ├── 1400030927.01.MZZZZZZZ.jpg │ ├── 1400033543.01.MZZZZZZZ.jpg │ ├── 1401201172.01.MZZZZZZZ.jpg │ ├── 1401201199.01.MZZZZZZZ.jpg │ ├── 156097009X.01.MZZZZZZZ.jpg │ ├── 1560971460.01.MZZZZZZZ.jpg │ ├── 1560973056.01.MZZZZZZZ.jpg │ ├── 1563890828.01.MZZZZZZZ.jpg │ ├── 1563892464.01.MZZZZZZZ.jpg │ ├── 1563893304.01.MZZZZZZZ.jpg │ ├── 1563896451.01.MZZZZZZZ.jpg │ ├── 1563896486.01.MZZZZZZZ.jpg │ ├── 1563896575.01.MZZZZZZZ.jpg │ ├── 1563896613.01.MZZZZZZZ.jpg │ ├── 1563896648.01.MZZZZZZZ.jpg │ ├── 1563897113.01.MZZZZZZZ.jpg │ ├── 1563897563.01.MZZZZZZZ.jpg │ ├── 1563898551.01.MZZZZZZZ.jpg │ ├── 1563898586.01.MZZZZZZZ.jpg │ ├── 1563899426.01.MZZZZZZZ.jpg │ ├── 1563899485.01.MZZZZZZZ.jpg │ ├── 1563899809.01.MZZZZZZZ.jpg │ ├── 1563899965.01.MZZZZZZZ.jpg │ ├── 156931778X.01.MZZZZZZZ.jpg │ ├── 156971259X.01.MZZZZZZZ.jpg │ ├── 1569712921.01.MZZZZZZZ.jpg │ ├── 157362408X.01.MZZZZZZZ.jpg │ ├── 1582401837.01.MZZZZZZZ.jpg │ ├── 1582402329.01.MZZZZZZZ.jpg │ ├── 1582403090.01.MZZZZZZZ.jpg │ ├── 1582403317.01.MZZZZZZZ.jpg │ ├── 192999835X.01.MZZZZZZZ.jpg │ ├── 1929998406.01.MZZZZZZZ.jpg │ ├── 192999849X.01.MZZZZZZZ.jpg │ ├── 1929998589.01.MZZZZZZZ.jpg │ ├── 193065247X.01.MZZZZZZZ.jpg │ ├── 6304765231.01.MZZZZZZZ.jpg │ ├── 6305028699.01.MZZZZZZZ.jpg │ ├── 6305168857.01.MZZZZZZZ.jpg │ ├── 6305729328.01.MZZZZZZZ.jpg │ ├── 6305736650.01.MZZZZZZZ.jpg │ ├── B00000JS62.01.MZZZZZZZ.jpg │ ├── B00000K0DT.01.MZZZZZZZ.jpg │ ├── B00000K19E.01.MZZZZZZZ.jpg │ ├── B000021Y77.01.MZZZZZZZ.jpg │ ├── B00003CX5P.01.MZZZZZZZ.jpg │ ├── B00003CXC5.01.MZZZZZZZ.jpg │ ├── B00003CXC6.01.MZZZZZZZ.jpg │ ├── B00003CXE7.01.MZZZZZZZ.jpg │ ├── B00003CXR4.01.MZZZZZZZ.jpg │ ├── B00003CY5D.01.MZZZZZZZ.jpg │ ├── B00005221I.01.MZZZZZZZ.jpg │ ├── B00005ASUM.01.MZZZZZZZ.jpg │ ├── B00005AX6F.01.MZZZZZZZ.jpg │ ├── B00005B1ZL.01.MZZZZZZZ.jpg │ ├── B00005JKCH.01.MZZZZZZZ.jpg │ ├── B00005JKDR.01.MZZZZZZZ.jpg │ ├── B00005JKFA.01.MZZZZZZZ.jpg │ ├── B00005JLF1.01.MZZZZZZZ.jpg │ ├── B00005JM02.01.MZZZZZZZ.jpg │ ├── B00005JM2Y.01.MZZZZZZZ.jpg │ ├── B00005JMJ4.01.MZZZZZZZ.jpg │ ├── B00005LINC.01.MZZZZZZZ.jpg │ ├── B00005MAM2.01.MZZZZZZZ.jpg │ ├── B00005O3V9.01.MZZZZZZZ.jpg │ ├── B00005V0XF.01.MZZZZZZZ.jpg │ ├── B00005YU1M.01.MZZZZZZZ.jpg │ ├── B000063IOT.01.MZZZZZZZ.jpg │ ├── B000065U1N.01.MZZZZZZZ.jpg │ ├── B000066C6Z.01.MZZZZZZZ.jpg │ ├── B000067DNF.01.MZZZZZZZ.jpg │ ├── B000068OCS.01.MZZZZZZZ.jpg │ ├── B000068OCT.01.MZZZZZZZ.jpg │ ├── B00006HBUJ.01.MZZZZZZZ.jpg │ ├── B00006RCNX.01.MZZZZZZZ.jpg │ ├── B00008K2XP.01.MZZZZZZZ.jpg │ ├── B00008RH1H.01.MZZZZZZZ.jpg │ ├── B00009TB5G.01.MZZZZZZZ.jpg │ ├── B0000A14WF.01.MZZZZZZZ.jpg │ └── B0000AXE8I.01.MZZZZZZZ.jpg ├── state.txt ├── graphml-sample.xml ├── treeml-sample.xml └── amazon.txt ├── src └── prefuse │ ├── util │ ├── io │ │ └── package.html │ ├── display │ │ ├── package.html │ │ ├── ItemBoundsListener.java │ │ ├── PaintListener.java │ │ └── DebugStatsPainter.java │ ├── package.html │ ├── ui │ │ ├── package.html │ │ ├── JPrefuseApplet.java │ │ └── ValuedRangeModel.java │ ├── collections │ │ ├── package.html │ │ ├── NullComparator.java │ │ ├── LiteralComparator.java │ │ ├── IntSortedMap.java │ │ ├── LiteralIterator.java │ │ ├── LongIntSortedMap.java │ │ ├── FloatIntSortedMap.java │ │ ├── BooleanIntSortedMap.java │ │ ├── DoubleIntSortedMap.java │ │ ├── IntIntSortedMap.java │ │ ├── ObjectIntSortedMap.java │ │ ├── Queue.java │ │ ├── IntArrayIterator.java │ │ ├── IncompatibleComparatorException.java │ │ ├── CompositeIntIterator.java │ │ ├── CompositeIterator.java │ │ └── ByteArrayList.java │ └── force │ │ ├── Integrator.java │ │ ├── package.html │ │ ├── ForceConfigAction.java │ │ ├── EulerIntegrator.java │ │ └── DragForce.java │ ├── data │ ├── io │ │ ├── package.html │ │ ├── sql │ │ │ ├── package.html │ │ │ └── SQLDataHandler.java │ │ ├── TableReadListener.java │ │ ├── AbstractGraphWriter.java │ │ ├── AbstractTableWriter.java │ │ ├── TableWriter.java │ │ ├── DataIOException.java │ │ ├── GraphWriter.java │ │ ├── TableReader.java │ │ ├── GraphReader.java │ │ └── AbstractTableReader.java │ ├── event │ │ ├── package.html │ │ ├── ExpressionListener.java │ │ ├── ProjectionListener.java │ │ ├── EventConstants.java │ │ ├── TupleSetListener.java │ │ ├── TableListener.java │ │ └── GraphListener.java │ ├── parser │ │ ├── package.html │ │ ├── DateTimeParser.java │ │ ├── ObjectParser.java │ │ ├── DataParseException.java │ │ ├── DataParser.java │ │ ├── StringParser.java │ │ ├── ByteParser.java │ │ ├── IntParser.java │ │ └── ColorIntParser.java │ ├── column │ │ └── package.html │ ├── expression │ │ ├── parser │ │ │ ├── package.html │ │ │ └── ExpressionParserConstants.java │ │ ├── package.html │ │ ├── Predicate.java │ │ ├── ExpressionVisitor.java │ │ ├── AbstractPredicate.java │ │ ├── Function.java │ │ ├── ObjectLiteral.java │ │ ├── BooleanLiteral.java │ │ ├── OrPredicate.java │ │ ├── AndPredicate.java │ │ ├── XorPredicate.java │ │ └── NotPredicate.java │ ├── query │ │ └── package.html │ ├── search │ │ └── package.html │ ├── util │ │ ├── AcceptAllColumnProjection.java │ │ ├── package.html │ │ ├── ColumnProjection.java │ │ ├── NeighborIterator.java │ │ ├── ValidEdgePredicate.java │ │ ├── CascadedRowManager.java │ │ ├── AbstractColumnProjection.java │ │ ├── FilterIterator.java │ │ └── UniqueRowIterator.java │ ├── DataReadOnlyException.java │ ├── package.html │ ├── DataTypeException.java │ ├── tuple │ │ ├── package.html │ │ └── TableEdge.java │ └── Edge.java │ ├── action │ ├── filter │ │ └── package.html │ ├── assignment │ │ └── package.html │ ├── package.html │ ├── layout │ │ ├── graph │ │ │ └── package.html │ │ ├── package.html │ │ └── RandomLayout.java │ ├── animate │ │ ├── package.html │ │ ├── SizeAnimator.java │ │ ├── LocationAnimator.java │ │ ├── QualityControlAnimator.java │ │ └── FontAnimator.java │ ├── distortion │ │ └── package.html │ ├── RepaintAction.java │ └── ActionSwitch.java │ ├── visual │ ├── tuple │ │ ├── package.html │ │ └── TableDecoratorItem.java │ ├── sort │ │ └── package.html │ ├── expression │ │ ├── package.html │ │ ├── StartVisiblePredicate.java │ │ ├── QueryExpression.java │ │ ├── HoverPredicate.java │ │ ├── VisiblePredicate.java │ │ ├── ValidatedPredicate.java │ │ └── InGroupPredicate.java │ ├── NodeItem.java │ ├── DecoratorItem.java │ ├── package.html │ ├── VisualTupleSet.java │ └── EdgeItem.java │ ├── package.html │ ├── activity │ ├── package.html │ ├── ThereAndBackPacer.java │ ├── Pacer.java │ ├── SlowInSlowOutPacer.java │ ├── ActivityAdapter.java │ └── ActivityListener.java │ ├── render │ ├── package.html │ ├── RendererFactory.java │ ├── NullRenderer.java │ └── Renderer.java │ └── controls │ ├── package.html │ └── HoverActionControl.java ├── demos └── prefuse │ └── demos │ └── applets │ ├── DataMountain.java │ ├── TreeMap.java │ ├── TreeView.java │ ├── RadialGraphView.java │ ├── FisheyeMenu.java │ ├── Congress.java │ └── ZipDecode.java ├── test └── test │ └── prefuse │ ├── data │ ├── column │ │ └── All_PrefuseDataColumn_Tests.java │ ├── io │ │ └── All_PrefuseDataIO_Tests.java │ ├── expression │ │ └── All_PrefuseDataExpression_Tests.java │ ├── All_PrefuseData_Tests.java │ └── util │ │ └── All_PrefuseDataUtil_Tests.java │ ├── visual │ └── All_PrefuseVisual_Tests.java │ ├── TestConfig.java │ └── All_Prefuse_Tests.java ├── README └── license-prefuse.txt /lib/ant.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/lib/ant.jar -------------------------------------------------------------------------------- /lib/lucene-1.4.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/lib/lucene-1.4.3.jar -------------------------------------------------------------------------------- /data/chi-ontology.xml.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/chi-ontology.xml.gz -------------------------------------------------------------------------------- /src/prefuse/util/io/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes pertaining to input and output.

3 | -------------------------------------------------------------------------------- /src/prefuse/util/display/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes specific to the Display class.

3 | -------------------------------------------------------------------------------- /data/images/0060929871.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0060929871.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0060936649.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0060936649.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0060938455.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0060938455.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0142001449.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0142001449.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0156006391.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0156006391.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0312282990.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0312282990.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0345368754.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0345368754.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0374528497.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0374528497.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0380789019.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0380789019.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0380789035.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0380789035.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0380977427.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0380977427.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/038097827X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/038097827X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0385333471.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0385333471.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/038533348X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/038533348X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0393320278.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0393320278.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0399143904.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0399143904.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0399149864.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0399149864.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0425164152.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0425164152.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0425164527.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0425164527.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0425165000.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0425165000.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/043935806X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/043935806X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0440414806.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0440414806.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0441003257.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0441003257.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0441172717.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0441172717.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/044661162X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/044661162X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0451524934.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0451524934.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0451526341.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0451526341.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0553380958.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0553380958.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0684833395.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0684833395.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0742525252.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0742525252.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0743249992.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0743249992.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/076530953X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/076530953X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0767908163.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0767908163.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0780020685.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0780020685.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0780021045.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0780021045.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0780022491.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0780022491.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0780022513.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0780022513.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0785100490.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0785100490.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0785108416.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0785108416.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0785111174.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0785111174.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0786884517.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0786884517.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0790729628.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0790729628.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0790731029.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0790731029.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0790749815.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0790749815.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0792844890.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0792844890.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0871137380.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0871137380.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0887347215.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0887347215.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0930289552.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0930289552.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0961392126.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0961392126.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0961392142.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0961392142.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/0972179445.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/0972179445.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1400030927.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1400030927.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1400033543.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1400033543.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1401201172.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1401201172.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1401201199.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1401201199.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/156097009X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/156097009X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1560971460.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1560971460.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1560973056.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1560973056.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563890828.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563890828.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563892464.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563892464.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563893304.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563893304.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563896451.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563896451.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563896486.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563896486.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563896575.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563896575.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563896613.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563896613.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563896648.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563896648.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563897113.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563897113.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563897563.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563897563.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563898551.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563898551.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563898586.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563898586.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563899426.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563899426.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563899485.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563899485.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563899809.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563899809.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1563899965.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1563899965.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/156931778X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/156931778X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/156971259X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/156971259X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1569712921.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1569712921.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/157362408X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/157362408X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1582401837.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1582401837.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1582402329.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1582402329.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1582403090.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1582403090.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1582403317.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1582403317.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/192999835X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/192999835X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1929998406.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1929998406.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/192999849X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/192999849X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/1929998589.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/1929998589.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/193065247X.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/193065247X.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/6304765231.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/6304765231.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/6305028699.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/6305028699.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/6305168857.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/6305168857.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/6305729328.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/6305729328.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/6305736650.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/6305736650.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00000JS62.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00000JS62.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00000K0DT.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00000K0DT.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00000K19E.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00000K19E.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000021Y77.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000021Y77.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00003CX5P.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00003CX5P.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00003CXC5.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00003CXC5.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00003CXC6.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00003CXC6.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00003CXE7.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00003CXE7.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00003CXR4.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00003CXR4.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00003CY5D.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00003CY5D.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005221I.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005221I.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005ASUM.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005ASUM.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005AX6F.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005AX6F.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005B1ZL.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005B1ZL.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JKCH.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JKCH.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JKDR.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JKDR.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JKFA.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JKFA.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JLF1.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JLF1.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JM02.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JM02.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JM2Y.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JM2Y.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005JMJ4.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005JMJ4.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005LINC.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005LINC.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005MAM2.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005MAM2.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005O3V9.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005O3V9.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005V0XF.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005V0XF.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00005YU1M.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00005YU1M.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000063IOT.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000063IOT.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000065U1N.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000065U1N.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000066C6Z.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000066C6Z.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000067DNF.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000067DNF.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000068OCS.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000068OCS.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B000068OCT.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B000068OCT.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00006HBUJ.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00006HBUJ.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00006RCNX.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00006RCNX.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00008K2XP.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00008K2XP.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00008RH1H.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00008RH1H.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B00009TB5G.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B00009TB5G.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B0000A14WF.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B0000A14WF.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /data/images/B0000AXE8I.01.MZZZZZZZ.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/data/images/B0000AXE8I.01.MZZZZZZZ.jpg -------------------------------------------------------------------------------- /src/prefuse/data/io/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Input/output classes for reading and writing data from formatted files.

3 | -------------------------------------------------------------------------------- /lib/drivers/mysql-connector-java-3.1.12-bin.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uwdata/Prefuse/master/lib/drivers/mysql-connector-java-3.1.12-bin.jar -------------------------------------------------------------------------------- /src/prefuse/action/filter/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Action modules for visually filtering items by controlling their visibility.

3 | -------------------------------------------------------------------------------- /src/prefuse/data/event/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Listener interfaces for monitoring prefuse data structures and 3 | expressions.

4 | -------------------------------------------------------------------------------- /src/prefuse/visual/tuple/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementations of VisualItem types and backing TupleManager 3 | instances.

4 | -------------------------------------------------------------------------------- /src/prefuse/action/assignment/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Action modules for assigning visual properties such as colors, sizes, and fonts.

3 | -------------------------------------------------------------------------------- /src/prefuse/package.html: -------------------------------------------------------------------------------- 1 | 2 |

The top-level Visualization and Display classes, as well as Constants 3 | used throughout the toolkit.

4 | -------------------------------------------------------------------------------- /src/prefuse/util/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes for use by both the toolkit and applications, including 3 | color and font support.

4 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Text parsers for different data types and machinery for 3 | automatically inferring data types.

4 | -------------------------------------------------------------------------------- /src/prefuse/action/package.html: -------------------------------------------------------------------------------- 1 | 2 |

A library of reusable and composable modules 3 | for performing data processing or assigning visual attributes.

4 | -------------------------------------------------------------------------------- /src/prefuse/util/ui/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes facilitating the generation and composition of user 3 | interface components. This package contains both custom user interface 4 | widgets and convenience wrappers for existing Swing widgets.

5 | -------------------------------------------------------------------------------- /src/prefuse/visual/sort/package.html: -------------------------------------------------------------------------------- 1 | 2 |

ItemSorter instances for determining the rendering order of VisualItems. 3 | Each {@link prefuse.Display} instance can have a unique item sorter for 4 | controlling the order in which items are drawn to the screen.

5 | -------------------------------------------------------------------------------- /src/prefuse/visual/expression/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Expressions in the prefuse expression language that are specific to 3 | VisualItems. These expression instances can be instantiated directly 4 | and used, or are accessible as functions in the prefuse expression 5 | language.

6 | -------------------------------------------------------------------------------- /src/prefuse/action/layout/graph/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Action modules for computing the layout of graph or tree structured data. 3 | All tree layouts can be used on non-tree Graphs; a spanning tree of the 4 | graph will be requested using the {@link prefuse.data.Graph#getSpanningTree()} 5 | method.

6 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes providing useful data structures not present in the Java 3 | Collections framework. This package includes Map implementations for 4 | various primitive types, a copy-on-write array list, and iterators supporting 5 | primitive types.

6 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/DataMountain.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.util.ui.JPrefuseApplet; 4 | 5 | 6 | public class DataMountain extends JPrefuseApplet { 7 | 8 | public void init() { 9 | this.setContentPane(prefuse.demos.DataMountain.demo()); 10 | } 11 | 12 | } // end of class DataMountain 13 | -------------------------------------------------------------------------------- /src/prefuse/data/column/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Data columns for storing typed data within a data table. 3 | In most cases, these classes should not be 4 | instantiated directly. Instead use the setColumn() methods of 5 | the {@link prefuse.data.Table} class, which will call the 6 | appropriate {@link prefuse.data.column.ColumnFactory} method for you.

7 | -------------------------------------------------------------------------------- /src/prefuse/action/animate/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Action modules for constructing animations. Most Animator actions require 3 | an interpolated data fields--such that a backing data table has 4 | three columns, one each for start values, current values, and ending 5 | values. See {@link prefuse.data.Schema#addInterpolatedColumn(String, Class)} 6 | for more.

7 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/TreeMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.util.ui.JPrefuseApplet; 4 | 5 | 6 | public class TreeMap extends JPrefuseApplet { 7 | 8 | public void init() { 9 | this.setContentPane( 10 | prefuse.demos.TreeMap.demo("/chi-ontology.xml.gz", "name")); 11 | } 12 | 13 | } // end of class TreeMap 14 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/TreeView.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.util.ui.JPrefuseApplet; 4 | 5 | 6 | public class TreeView extends JPrefuseApplet { 7 | 8 | public void init() { 9 | this.setContentPane( 10 | prefuse.demos.TreeView.demo("/chi-ontology.xml.gz", "name")); 11 | } 12 | 13 | } // end of class TreeView 14 | -------------------------------------------------------------------------------- /src/prefuse/action/distortion/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Actions modules which distort the presentation space to 3 | support enhanced navigation and browsing. Most distortion techniques magnify a 4 | "focal" region of space, allocating more screen space and showing items in 5 | higher detail. Non-focal space is compressed/demagnified, but remains visible 6 | to keep everything in context.

7 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/RadialGraphView.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.util.ui.JPrefuseApplet; 4 | 5 | 6 | public class RadialGraphView extends JPrefuseApplet { 7 | 8 | public void init() { 9 | this.setContentPane( 10 | prefuse.demos.RadialGraphView.demo("/socialnet.xml", "name")); 11 | } 12 | 13 | } // end of class RadialGraphView 14 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/parser/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Parser/compiler for the prefuse expression language. The 3 | parser is implemented using the 4 | JavaCC package.

5 | 6 |

The file "ExpressionParser.jj" in the source distrubtion contains the JavaCC 7 | source. This file is meta-compiled by JavaCC into the classes contained within 8 | this package.

9 | -------------------------------------------------------------------------------- /src/prefuse/activity/package.html: -------------------------------------------------------------------------------- 1 | 2 |

General classes for scheduling and running activities 3 | with specified starting times and durations. Used by all 4 | {@link prefuse.action.Action} implementations, these activities can be 5 | used to perform scheduled data processing and animation. Pacers can be 6 | used to control the rate of animation, for example, providing slow-in 7 | slow-out animated transitions.

8 | -------------------------------------------------------------------------------- /src/prefuse/render/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Interfaces and modules for rendering VisualItems into a graphics context. 3 | {@link prefuse.render.Renderer} instances are responsible for drawing 4 | items, computing item bounds, and determining if a point lies within or 5 | without an item. 6 | {@link prefuse.render.RendererFactory} instances, on the other hand, are 7 | used to determine which Renderer should be used for a given VisualItem.

8 | -------------------------------------------------------------------------------- /src/prefuse/action/layout/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Action modules providing layout algorithms for use by prefuse visualizations. 3 | All provided layouts descend from the abstract 4 | {@link prefuse.action.layout.Layout} class, allowing 5 | the layout bounds and anchor point to be customized on a per-Action basis. 6 | Layouts specifically for graph or tree structured data are available in the 7 | {@link prefuse.action.layout.graph} package.

8 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/FisheyeMenu.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.util.ui.JPrefuseApplet; 4 | 5 | 6 | public class FisheyeMenu extends JPrefuseApplet { 7 | 8 | public void init() { 9 | prefuse.demos.FisheyeMenu fm = prefuse.demos.FisheyeMenu.demo(); 10 | this.getContentPane().add(fm); 11 | fm.getVisualization().run("init"); 12 | } 13 | 14 | } // end of class FisheyeMenu 15 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/NullComparator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.Comparator; 4 | 5 | /** 6 | * A do-nothing comparator that simply treats all objects as equal. 7 | * @author jeffrey heer 8 | */ 9 | public class NullComparator implements Comparator { 10 | 11 | public int compare(Object o1, Object o2) { 12 | return 0; 13 | } 14 | 15 | } // end of class NullComparator 16 | -------------------------------------------------------------------------------- /src/prefuse/visual/NodeItem.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual; 2 | 3 | import prefuse.data.Node; 4 | 5 | /** 6 | * VisualItem that represents a node in a graph. This interface combines 7 | * the {@link VisualItem} interface with the {@link prefuse.data.Node} 8 | * interface. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface NodeItem extends VisualItem, Node { 13 | 14 | } // end of interface NodeItem 15 | -------------------------------------------------------------------------------- /src/prefuse/util/force/Integrator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.force; 2 | 3 | /** 4 | * Interface for numerical integration routines. These routines are used 5 | * to update the position and velocity of items in response to forces 6 | * over a given time step. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public interface Integrator { 11 | 12 | public void integrate(ForceSimulator sim, long timestep); 13 | 14 | } // end of interface Integrator 15 | -------------------------------------------------------------------------------- /src/prefuse/data/io/sql/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Input libraries for loading data from SQL databases. One can use the 3 | {@link prefuse.data.io.sql.ConnectionFactory} class to obtain an active 4 | {@link prefuse.data.io.sql.DatabaseDataSource} that can issue and process 5 | database queries both synchronously and asynchronously. 6 | Translation of database types into 7 | Java data types within prefuse data tables is handled by implementations 8 | of the {@link prefuse.data.io.sql.SQLDataHandler} interface.

9 | -------------------------------------------------------------------------------- /test/test/prefuse/data/column/All_PrefuseDataColumn_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse.data.column; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_PrefuseDataColumn_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse.data.column"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(ExpressionColumnTest.class); 12 | //$JUnit-END$ 13 | return suite; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Classes implementing an SQL-like expression language for filtering and manipulating data. 3 | The base type of the language, {@link prefuse.data.expression.Expression}, represents a 4 | calculation over a single 5 | tuple at a time. Expressions can be created programatically by instantiating 6 | the desired classes of this package, or can be compiled from a textual 7 | language with a SQL-like syntax by the 8 | {@link prefuse.data.expression.parser.ExpressionParser} class.

9 | -------------------------------------------------------------------------------- /test/test/prefuse/visual/All_PrefuseVisual_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse.visual; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_PrefuseVisual_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse.visual"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(VisualizationTest.class); 12 | suite.addTestSuite(VisualAggregateTableTest.class); 13 | //$JUnit-END$ 14 | return suite; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /test/test/prefuse/data/io/All_PrefuseDataIO_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse.data.io; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_PrefuseDataIO_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse.data.io"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(CSVTableReaderTest.class); 12 | suite.addTestSuite(DelimitedTextTableReaderTest.class); 13 | //$JUnit-END$ 14 | return suite; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/LiteralComparator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.Comparator; 4 | 5 | /** 6 | * @author jeffrey heer 7 | */ 8 | public interface LiteralComparator extends Comparator { 9 | 10 | int compare(byte x1, byte x2); 11 | int compare(int x1, int x2); 12 | int compare(long x1, long x2); 13 | int compare(float x1, float x2); 14 | int compare(double x1, double x2); 15 | int compare(boolean x1, boolean x2); 16 | 17 | } // end of interface LiteralComparator 18 | -------------------------------------------------------------------------------- /test/test/prefuse/data/expression/All_PrefuseDataExpression_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse.data.expression; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_PrefuseDataExpression_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse.data.expression"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(ExpressionTest.class); 12 | suite.addTestSuite(PredicateChainTest.class); 13 | //$JUnit-END$ 14 | return suite; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/prefuse/data/query/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Dynamic query bindings and data range models for creating 3 | dynamic queries. A dynamic query binding takes a particular 4 | data column and creates a binding between a filtering predicate 5 | over the data and user interface widgets for controlling the 6 | parameters of the predicate. This includes queries over a 7 | range of data ({@link prefuse.data.query.RangeQueryBinding}), selecting between 8 | different categories of data ({@link prefuse.data.query.ListQueryBinding}), 9 | and text search ({@link prefuse.data.query.SearchQueryBinding}).

10 | -------------------------------------------------------------------------------- /src/prefuse/data/search/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Text search support for prefix, keyword, and regular expression searches. 3 | Each search engine type subclasses {@link prefuse.data.search.SearchTupleSet}, an implementation 4 | of the {@link prefuse.data.tuple.TupleSet} interface. Classes derived from 5 | SearchTupleSet (e.g., {@link prefuse.data.search.PrefixSearchTupleSet}, 6 | {@link prefuse.data.search.KeywordSearchTupleSet}, and 7 | {@link prefuse.data.search.RegexSearchTupleSet}) can be 8 | instantiated and used directly or in conjunction with a 9 | {@link prefuse.data.query.SearchQueryBinding}.

10 | -------------------------------------------------------------------------------- /src/prefuse/data/event/ExpressionListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.event; 2 | 3 | import java.util.EventListener; 4 | 5 | import prefuse.data.expression.Expression; 6 | 7 | /** 8 | * Listener interface for monitoring changes to an Expression instance. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface ExpressionListener extends EventListener { 13 | 14 | /** 15 | * Notification that an Expression instance has been modified in some way. 16 | * @param expr the modified expression 17 | */ 18 | public void expressionChanged(Expression expr); 19 | 20 | } // end of interface ExpressionListener 21 | -------------------------------------------------------------------------------- /test/test/prefuse/data/All_PrefuseData_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse.data; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_PrefuseData_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse.data"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(VisualItemTableTest.class); 12 | suite.addTestSuite(CascadedTableTest.class); 13 | suite.addTestSuite(TableTest.class); 14 | suite.addTestSuite(GraphTest.class); 15 | suite.addTestSuite(TreeTest.class); 16 | //$JUnit-END$ 17 | return suite; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/prefuse/data/util/AcceptAllColumnProjection.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import prefuse.data.column.Column; 4 | 5 | /** 6 | * ColumnProjection that simply includes all columns. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public class AcceptAllColumnProjection extends AbstractColumnProjection { 11 | 12 | /** 13 | * Always returns true, accepting all columns. 14 | * @see prefuse.data.util.ColumnProjection#include(prefuse.data.column.Column, java.lang.String) 15 | */ 16 | public boolean include(Column col, String name) { 17 | return true; 18 | } 19 | 20 | } // end of class AcceptAllColumnProjection 21 | -------------------------------------------------------------------------------- /src/prefuse/render/RendererFactory.java: -------------------------------------------------------------------------------- 1 | package prefuse.render; 2 | 3 | import prefuse.visual.VisualItem; 4 | 5 | /** 6 | * The RendererFactory is responsible for providing the proper Renderer 7 | * instance for drawing a given VisualItem. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public interface RendererFactory { 12 | 13 | /** 14 | * Return a Renderer instance to draw the given VisualItem. 15 | * @param item the item for which to retrieve the renderer 16 | * @return the Renderer for the given VisualItem 17 | */ 18 | public Renderer getRenderer(VisualItem item); 19 | 20 | } // end of interface RendererFactory 21 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/Congress.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.data.Table; 4 | import prefuse.data.io.DelimitedTextTableReader; 5 | import prefuse.util.ui.JPrefuseApplet; 6 | 7 | 8 | public class Congress extends JPrefuseApplet { 9 | 10 | public void init() { 11 | // load the data 12 | Table t = null; 13 | try { 14 | t = new DelimitedTextTableReader().readTable("/fec.txt"); 15 | } catch ( Exception e ) { 16 | e.printStackTrace(); 17 | System.exit(1); 18 | } 19 | this.getContentPane().add(new prefuse.demos.Congress(t)); 20 | } 21 | 22 | } // end of class Congress 23 | -------------------------------------------------------------------------------- /lib/license-jakarta-lucene.txt: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright 2004 The Apache Software Foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | -------------------------------------------------------------------------------- /src/prefuse/activity/ThereAndBackPacer.java: -------------------------------------------------------------------------------- 1 | package prefuse.activity; 2 | 3 | /** 4 | * Pacing function that maps the animation fraction f such that it ranges 5 | * from 0 to 1 and then back to 0 again. This is useful for animations 6 | * with periodic activity. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public class ThereAndBackPacer implements Pacer { 11 | 12 | /** 13 | * Pacing function for providing there-and-back (periodic) transitions. 14 | * @see prefuse.activity.Pacer#pace(double) 15 | */ 16 | public double pace(double f) { 17 | return 2*(f <= 0.5 ? f : (1-f)); 18 | } 19 | 20 | } // end of class ThereAndBackPacer 21 | -------------------------------------------------------------------------------- /src/prefuse/controls/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Control modules for incorporating interaction in prefuse Displays. 3 | Examples include clicking a node to make it the new focus, dragging nodes to 4 | change their position, and performing pan and zoom operations. To add 5 | one of these controls to a visualization, create a new instance of 6 | the desired control and register it using the 7 | {@link prefuse.Display#addControlListener(Control)} method of the 8 | {@link prefuse.Display} class. Custom Controls can easily be constructed 9 | by implementing the {@link prefuse.controls.Control} interface, or, more 10 | conveniently, by subclassing the {@link prefuse.controls.ControlAdapter} 11 | class.

12 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/IntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.Comparator; 4 | 5 | 6 | /** 7 | * @author jeffrey heer 8 | */ 9 | public interface IntSortedMap { 10 | 11 | public int getMinimum(); 12 | public int getMaximum(); 13 | public int getMedian(); 14 | public int getUniqueCount(); 15 | 16 | public boolean isAllowDuplicates(); 17 | public int size(); 18 | public boolean isEmpty(); 19 | public Comparator comparator(); 20 | 21 | public void clear(); 22 | public boolean containsValue(int value); 23 | public IntIterator valueIterator(boolean ascending); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/prefuse/data/event/ProjectionListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.event; 2 | 3 | import java.util.EventListener; 4 | 5 | import prefuse.data.util.ColumnProjection; 6 | 7 | /** 8 | * Listener interface for monitoring changes to the state of a 9 | * column projection filter. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public interface ProjectionListener extends EventListener { 14 | 15 | /** 16 | * Notification that the internal state of a projection has been updated. 17 | * @param projection the source of the change notification 18 | */ 19 | public void projectionChanged(ColumnProjection projection); 20 | 21 | } // end of interface ProjectionListener 22 | -------------------------------------------------------------------------------- /test/test/prefuse/data/util/All_PrefuseDataUtil_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse.data.util; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_PrefuseDataUtil_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse.data.util"); 10 | //$JUnit-BEGIN$ 11 | suite.addTestSuite(IntIntTreeMapTest.class); 12 | suite.addTestSuite(LongIntTreeMapTest.class); 13 | suite.addTestSuite(FloatIntTreeMapTest.class); 14 | suite.addTestSuite(DoubleIntTreeMapTest.class); 15 | suite.addTestSuite(ObjectIntTreeMapTest.class); 16 | //$JUnit-END$ 17 | return suite; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /test/test/prefuse/TestConfig.java: -------------------------------------------------------------------------------- 1 | package test.prefuse; 2 | 3 | public class TestConfig { 4 | 5 | public static boolean verbose() { 6 | String v = System.getProperty("verbose"); 7 | return ( v != null && v.equalsIgnoreCase("true") ); 8 | } 9 | 10 | public static String memUse() { 11 | // memory usage 12 | long total = Runtime.getRuntime().totalMemory() / (2<<10); 13 | long free = Runtime.getRuntime().freeMemory() / (2<<10); 14 | long max = Runtime.getRuntime().maxMemory() / (2<<10); 15 | return "Memory: " + (total-free) + "K used / " 16 | + total + "K avail / " 17 | + max + "K max"; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/LiteralIterator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.Iterator; 4 | 5 | /** 6 | * @author jeffrey heer 7 | */ 8 | public interface LiteralIterator extends Iterator { 9 | 10 | public int nextInt(); 11 | public boolean isIntSupported(); 12 | 13 | public long nextLong(); 14 | public boolean isLongSupported(); 15 | 16 | public float nextFloat(); 17 | public boolean isFloatSupported(); 18 | 19 | public double nextDouble(); 20 | public boolean isDoubleSupported(); 21 | 22 | public boolean nextBoolean(); 23 | public boolean isBooleanSupported(); 24 | 25 | } // end of interface LiteralIterator 26 | -------------------------------------------------------------------------------- /src/prefuse/visual/DecoratorItem.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual; 2 | 3 | /** 4 | * VisualItem that "decorates" another VisualItem. DecoratorItem instances 5 | * allow the decorated item to be retrieved, and used to compute visual 6 | * properties for this item. Example decorator items might include attaching 7 | * an external label to an item or adding interactive handles to another 8 | * item. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface DecoratorItem extends VisualItem { 13 | 14 | /** 15 | * Get the VisualItem that this item is decorating. 16 | * @return the decorated VisualItem 17 | */ 18 | public VisualItem getDecoratedItem(); 19 | 20 | } // end of interface DecoratorItem 21 | -------------------------------------------------------------------------------- /src/prefuse/data/util/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes for supporting prefuse data structures, including 3 | indexes, iterators, filters, and column projections.

4 | 5 |

Indexes ({@link prefuse.data.util.Index}) support efficient access to 6 | table rows organized by the data values of a particular column.

7 | 8 |

Filtered Iterators support selecting subsets of data from data tables. 9 | This includes optimized queries over table rows (using availabled indexes). 10 | Currently all query planning is performed by the 11 | {@link prefuse.data.util.FilterIteratorFactory} class. 12 |

13 | 14 |

Column Projections filter out unwanted table columns, controlling what 15 | data fields are inherited by a {@link prefuse.data.CascadedTable}.

16 | -------------------------------------------------------------------------------- /demos/prefuse/demos/applets/ZipDecode.java: -------------------------------------------------------------------------------- 1 | package prefuse.demos.applets; 2 | 3 | import prefuse.data.Table; 4 | import prefuse.data.io.DataIOException; 5 | import prefuse.data.io.DelimitedTextTableReader; 6 | import prefuse.util.ui.JPrefuseApplet; 7 | 8 | 9 | public class ZipDecode extends JPrefuseApplet { 10 | 11 | public void init() { 12 | DelimitedTextTableReader tr = new DelimitedTextTableReader(); 13 | Table t = null; 14 | try { 15 | t = tr.readTable("/zipcode.txt"); 16 | } catch ( DataIOException e ) { 17 | e.printStackTrace(); 18 | System.exit(1); 19 | } 20 | this.setContentPane(new prefuse.demos.ZipDecode(t)); 21 | } 22 | 23 | } // end of class ZipDecode 24 | -------------------------------------------------------------------------------- /src/prefuse/util/display/ItemBoundsListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2006 Regents of the University of California. 3 | * See "license-prefuse.txt" for licensing terms. 4 | */ 5 | package prefuse.util.display; 6 | 7 | import prefuse.Display; 8 | 9 | /** 10 | * Listener interface for monitoring changes to the space occupied by 11 | * VisualItems within the space of a Display. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public interface ItemBoundsListener { 16 | 17 | /** 18 | * Signals a change in the total bounds occupied by VisualItems in 19 | * a particular Display. 20 | * @param d the Display whose item bounds has changed 21 | */ 22 | public void itemBoundsChanged(Display d); 23 | 24 | } // end of interface ItemBoundsListener 25 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/Predicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | /** 4 | * A Predicate is a special type of Expression that carries the guarantee 5 | * that the {@link prefuse.data.expression.Expression#getBoolean(Tuple)} 6 | * method is supported. Predicates are particularly useful for issuing 7 | * queries to prefuse data structures. To create a Predicate, one can 8 | * either instantiate the desired Predicate instances directly, or 9 | * write a parseable textual expression. The documentation for the 10 | * {@link prefuse.data.expression.parser.ExpressionParser} class includes 11 | * a full reference for prefuse's textual expression language. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public interface Predicate extends Expression { 16 | 17 | } // end of interface Predicate 18 | -------------------------------------------------------------------------------- /src/prefuse/data/event/EventConstants.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.event; 2 | 3 | import javax.swing.event.TableModelEvent; 4 | 5 | /** 6 | * Constants used within prefuse data structure modification notifications. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public interface EventConstants { 11 | 12 | /** Indicates a data insert operation. */ 13 | public static final int INSERT = TableModelEvent.INSERT; 14 | /** Indicates a data update operation. */ 15 | public static final int UPDATE = TableModelEvent.UPDATE; 16 | /** Indicates a data delete operation. */ 17 | public static final int DELETE = TableModelEvent.DELETE; 18 | /** Indicates an operation that affects all columns of a table. */ 19 | public static final int ALL_COLUMNS = TableModelEvent.ALL_COLUMNS; 20 | 21 | } // end of interface EventConstants 22 | -------------------------------------------------------------------------------- /test/test/prefuse/All_Prefuse_Tests.java: -------------------------------------------------------------------------------- 1 | package test.prefuse; 2 | 3 | import junit.framework.Test; 4 | import junit.framework.TestSuite; 5 | 6 | public class All_Prefuse_Tests { 7 | 8 | public static Test suite() { 9 | TestSuite suite = new TestSuite("Test for test.prefuse"); 10 | //$JUnit-BEGIN$ 11 | suite.addTest(test.prefuse.data.All_PrefuseData_Tests.suite()); 12 | suite.addTest(test.prefuse.data.column.All_PrefuseDataColumn_Tests.suite()); 13 | suite.addTest(test.prefuse.data.expression.All_PrefuseDataExpression_Tests.suite()); 14 | suite.addTest(test.prefuse.data.io.All_PrefuseDataIO_Tests.suite()); 15 | suite.addTest(test.prefuse.data.util.All_PrefuseDataUtil_Tests.suite()); 16 | suite.addTest(test.prefuse.visual.All_PrefuseVisual_Tests.suite()); 17 | //$JUnit-END$ 18 | return suite; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/prefuse/data/event/TupleSetListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.event; 2 | 3 | import java.util.EventListener; 4 | 5 | import prefuse.data.Tuple; 6 | import prefuse.data.tuple.TupleSet; 7 | 8 | /** 9 | * Listener interface for monitoring changes to a TupleSet instance. Indicates 10 | * when tuples are added or removed from the set. 11 | * 12 | * @author jeffrey heer 13 | */ 14 | public interface TupleSetListener extends EventListener { 15 | 16 | /** 17 | * Notification that a TupleSet has changed. 18 | * @param tset the TupleSet that has changed 19 | * @param added an array (potentially zero-length) of added tuples 20 | * @param removed an array (potentially zero-length) of removed tuples 21 | */ 22 | public void tupleSetChanged(TupleSet tset, Tuple[] added, Tuple[] removed); 23 | 24 | } // end of interface TupleSetListener 25 | -------------------------------------------------------------------------------- /src/prefuse/visual/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Classes for representing and storing VisualItems. In addition to the top 3 | level {@link prefuse.visual.VisualItem} interface, 4 | {@link prefuse.visual.NodeItem} and {@link prefuse.visual.EdgeItem} provide 5 | access to an underlying graph structure, {@link prefuse.visual.DecoratorItem} 6 | represents a VisualItem "attached to" or "decorating" another VisualItem, 7 | and {@link prefuse.visual.AggregateItem} represents an aggregated collection 8 | of VisualItems.

9 | 10 |

VisualItems descend from the {@link prefuse.data.Tuple} interface, and 11 | as such are actually object proxies for a row of a data table. This package 12 | includes the corresponding table and graph implementations, which have been tuned 13 | to the needs of the visual abstraction. More implementational machinery for 14 | these types is in the {@link prefuse.visual.tuple} package.

15 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | Prefuse is a set of software tools for creating rich interactive data visualizations in the Java programming language. Prefuse supports a rich set of features for data modeling, visualization, and interaction. It provides optimized data structures for tables, graphs, and trees, a host of layout and visual encoding techniques, and support for animation, dynamic queries, integrated search, and database connectivity. 2 | 3 | Prefuse is written in Java, using the Java 2D graphics library, and is easily integrated into Java Swing applications or web applets. Prefuse is licensed under the terms of a BSD license, and can be freely used for both commercial and non-commercial purposes. 4 | 5 | Prefuse is a creation of the UC Berkeley Visualization Lab http://vis.berkeley.edu/. For more information see license-prefuse.txt and http://prefuse.org/. 6 | 7 | This repository was initially created from the release available at http://downloads.sourceforge.net/prefuse/prefuse-beta-20071021.zip -------------------------------------------------------------------------------- /src/prefuse/action/RepaintAction.java: -------------------------------------------------------------------------------- 1 | package prefuse.action; 2 | 3 | import prefuse.Visualization; 4 | 5 | /** 6 | * Issues a repaint request to a Visualization. 7 | * 8 | * @version 1.0 9 | * @author jeffrey heer 10 | */ 11 | public class RepaintAction extends Action { 12 | 13 | /** 14 | * Create a new RepaintAction. 15 | */ 16 | public RepaintAction() { 17 | super(); 18 | } 19 | 20 | /** 21 | * Create a new RepaintAction. 22 | * @param vis the Visualization to repaint 23 | */ 24 | public RepaintAction(Visualization vis) { 25 | super(vis); 26 | } 27 | 28 | /** 29 | * Calls the {@link prefuse.Visualization#repaint()} method on 30 | * this Action's associated Visualization. 31 | */ 32 | public void run(double frac) { 33 | getVisualization().repaint(); 34 | } 35 | 36 | } // end of class RepaintAction 37 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/ExpressionVisitor.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | /** 4 | * Visitor interface for objects that visit each sub-expression of an 5 | * Expression instance, performing some computation or data collection. 6 | * 7 | * @author jeffrey heer 8 | */ 9 | public interface ExpressionVisitor { 10 | 11 | /** 12 | * Callback made when visiting a particular expression. 13 | * @param expr the expression currently being visited. 14 | */ 15 | public void visitExpression(Expression expr); 16 | 17 | /** 18 | * Callback to signal that the visitor has just descended 19 | * a level in the Expression tree. 20 | */ 21 | public void down(); 22 | 23 | /** 24 | * Callback to signal that the visitor has just ascended 25 | * a level in the Expression tree. 26 | */ 27 | public void up(); 28 | 29 | } // end of interface ExpressionVisitor 30 | -------------------------------------------------------------------------------- /src/prefuse/visual/VisualTupleSet.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2006 Regents of the University of California. 3 | * See "license-prefuse.txt" for licensing terms. 4 | */ 5 | package prefuse.visual; 6 | 7 | import prefuse.Visualization; 8 | import prefuse.data.tuple.TupleSet; 9 | 10 | /** 11 | * TupleSet sub-interface for TupleSet instances that contain VisualItems, 12 | * Tuple instances that include visual properties. 13 | * 14 | * @author jeffrey heer 15 | */ 16 | public interface VisualTupleSet extends TupleSet { 17 | 18 | /** 19 | * Get the Visualization associated with this VisualTupleSet. 20 | * @return the Visualization instance 21 | */ 22 | public Visualization getVisualization(); 23 | 24 | /** 25 | * Get the data group name for this VisualTupleSet. 26 | * @return the data group name 27 | */ 28 | public String getGroup(); 29 | 30 | } // end of interface VisualTupleSet 31 | -------------------------------------------------------------------------------- /src/prefuse/activity/Pacer.java: -------------------------------------------------------------------------------- 1 | package prefuse.activity; 2 | 3 | /** 4 | * A Pacer, or pacing function, maps one double value to another; they 5 | * are used to parameterize animation rates, where the input value f moves 6 | * from 0 to 1 linearly, but the returned output can vary quite differently 7 | * in response to the input. 8 | * 9 | * @version 1.0 10 | * @author jeffrey heer 11 | * @see prefuse.action.Action 12 | * @see prefuse.activity.SlowInSlowOutPacer 13 | * @see prefuse.activity.ThereAndBackPacer 14 | */ 15 | public interface Pacer { 16 | 17 | /** 18 | * Maps one double value to another to determine animation pacing. Under 19 | * most circumstances, both the input and output values should be in the 20 | * range 0-1, inclusive. 21 | * @param f the input value, should be between 0-1 22 | * @return the output value, should be between 0-1 23 | */ 24 | public double pace(double f); 25 | 26 | } // end of interface Pacer 27 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/AbstractPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import prefuse.data.Schema; 4 | import prefuse.data.Tuple; 5 | 6 | /** 7 | * Abstract base class for dedicated Predicate instances. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public abstract class AbstractPredicate extends AbstractExpression 12 | implements Predicate 13 | { 14 | 15 | /** 16 | * Returns boolean.class. 17 | * @see prefuse.data.expression.Expression#getType(prefuse.data.Schema) 18 | */ 19 | public Class getType(Schema s) { 20 | return boolean.class; 21 | } 22 | 23 | /** 24 | * Returns the wrapper Object type for the result of 25 | * {@link Expression#getBoolean(Tuple)}. 26 | * @see prefuse.data.expression.Expression#get(prefuse.data.Tuple) 27 | */ 28 | public Object get(Tuple t) { 29 | return ( getBoolean(t) ? Boolean.TRUE : Boolean.FALSE ); 30 | } 31 | 32 | } // end of class AbstractPredicate 33 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/LongIntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | /** 4 | * Sorted map that maps from a long key to an int value. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public interface LongIntSortedMap extends IntSortedMap { 9 | 10 | public long firstKey(); 11 | 12 | public long lastKey(); 13 | 14 | public boolean containsKey(long key); 15 | 16 | public IntIterator valueRangeIterator(long fromKey, boolean fromInc, 17 | long toKey, boolean toInc); 18 | 19 | public LiteralIterator keyIterator(); 20 | 21 | public LiteralIterator keyRangeIterator(long fromKey, boolean fromInc, 22 | long toKey, boolean toInc); 23 | 24 | public int get(long key); 25 | 26 | public int remove(long key); 27 | 28 | public int remove(long key, int value); 29 | 30 | public int put(long key, int value); 31 | 32 | } // end of interface LongIntSortedMap 33 | -------------------------------------------------------------------------------- /src/prefuse/visual/expression/StartVisiblePredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual.expression; 2 | 3 | import prefuse.data.expression.ColumnExpression; 4 | import prefuse.data.expression.NotPredicate; 5 | import prefuse.data.expression.Predicate; 6 | import prefuse.visual.VisualItem; 7 | 8 | /** 9 | * Expression that indicates if an item's start visible flag is set. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public class StartVisiblePredicate extends ColumnExpression implements Predicate { 14 | 15 | /** Convenience instance for the start visible == true case. */ 16 | public static final Predicate TRUE = new StartVisiblePredicate(); 17 | /** Convenience instance for the start visible == false case. */ 18 | public static final Predicate FALSE = new NotPredicate(TRUE); 19 | 20 | /** 21 | * Create a new StartVisiblePredicate. 22 | */ 23 | public StartVisiblePredicate() { 24 | super(VisualItem.STARTVISIBLE); 25 | } 26 | 27 | } // end of class StartVisiblePredicate 28 | -------------------------------------------------------------------------------- /src/prefuse/data/event/TableListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.event; 2 | 3 | import java.util.EventListener; 4 | 5 | import prefuse.data.Table; 6 | 7 | /** 8 | * Listener interface for monitoring changes to a table. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface TableListener extends EventListener { 13 | 14 | /** 15 | * Notification that a table has changed. 16 | * @param t the table that has changed 17 | * @param start the starting row index of the changed table region 18 | * @param end the ending row index of the changed table region 19 | * @param col the column that has changed, or 20 | * {@link EventConstants#ALL_COLUMNS} if the operation affects all 21 | * columns 22 | * @param type the type of modification, one of 23 | * {@link EventConstants#INSERT}, {@link EventConstants#DELETE}, or 24 | * {@link EventConstants#UPDATE}. 25 | */ 26 | public void tableChanged(Table t, int start, int end, int col, int type); 27 | 28 | } // end of interface TableListener -------------------------------------------------------------------------------- /src/prefuse/util/collections/FloatIntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | 4 | /** 5 | * Sorted map that maps from a float key to an int value. 6 | * 7 | * @author jeffrey heer 8 | */ 9 | public interface FloatIntSortedMap extends IntSortedMap { 10 | 11 | public float firstKey(); 12 | 13 | public float lastKey(); 14 | 15 | public boolean containsKey(float key); 16 | 17 | public IntIterator valueRangeIterator(float fromKey, boolean fromInc, 18 | float toKey, boolean toInc); 19 | 20 | public LiteralIterator keyIterator(); 21 | 22 | public LiteralIterator keyRangeIterator(float fromKey, boolean fromInc, 23 | float toKey, boolean toInc); 24 | 25 | public int get(float key); 26 | 27 | public int remove(float key); 28 | 29 | public int remove(float key, int value); 30 | 31 | public int put(float key, int value); 32 | 33 | } // end of interface FloatIntSortedMap 34 | -------------------------------------------------------------------------------- /data/state.txt: -------------------------------------------------------------------------------- 1 | code name alpha 2 | 1 Alabama AL 3 | 2 Alaska AK 4 | 4 Arizona AZ 5 | 5 Arkansas AR 6 | 6 California CA 7 | 8 Colorado CO 8 | 9 Connecticut CT 9 | 10 Delaware DE 10 | 11 District of Columbia DC 11 | 12 Florida FL 12 | 13 Georgia GA 13 | 15 Hawaii HI 14 | 16 Idaho ID 15 | 17 Illinois IL 16 | 18 Indiana IN 17 | 19 Iowa IA 18 | 20 Kansas KS 19 | 21 Kentucky KY 20 | 22 Louisiana LA 21 | 23 Maine ME 22 | 24 Maryland MD 23 | 25 Massachusetts MA 24 | 26 Michigan MI 25 | 27 Minnesota MN 26 | 28 Mississippi MS 27 | 29 Missouri MO 28 | 30 Montana MT 29 | 31 Nebraska NE 30 | 32 Nevada NV 31 | 33 New Hampshire NH 32 | 34 New Jersey NJ 33 | 35 New Mexico NM 34 | 36 New York NY 35 | 37 North Carolina NC 36 | 38 North Dakota ND 37 | 39 Ohio OH 38 | 40 Oklahoma OK 39 | 41 Oregon OR 40 | 42 Pennsylvania PA 41 | 44 Rhode Island RI 42 | 45 South Carolina SC 43 | 46 South Dakota SD 44 | 47 Tennessee TN 45 | 48 Texas TX 46 | 49 Utah UT 47 | 50 Vermont VT 48 | 51 Virginia VA 49 | 53 Washington WA 50 | 54 West Virginia WV 51 | 55 Wisconsin WI 52 | 56 Wyoming WY 53 | -------------------------------------------------------------------------------- /src/prefuse/data/io/TableReadListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import prefuse.data.parser.DataParseException; 4 | 5 | /** 6 | * Callback interface used by AbstractTextTableReader instances to be 7 | * used when a table value is encountered in parsing. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public interface TableReadListener { 12 | 13 | /** 14 | * Notification that a text string representing a table value has 15 | * been read. It is the job of this callback to then appropriately 16 | * take action, such as parse and store the value. 17 | * @param line the line of the file at which the value was encountered 18 | * @param col the table column index at which the value was encountered 19 | * @param value the text string representing the data value 20 | * @throws DataParseException if an error occurs while parsing the data 21 | */ 22 | public void readValue(int line, int col, String value) 23 | throws DataParseException; 24 | 25 | } // end of interface TableReadListener 26 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/Function.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | /** 4 | * Expression sub-interface representing a function in the prefuse 5 | * expression language. 6 | * 7 | * @author jeffrey heer 8 | */ 9 | public interface Function extends Expression { 10 | 11 | /** Constant indicating a vriable argument count */ 12 | public static final int VARARGS = -1; 13 | 14 | /** 15 | * Get the name of this function. 16 | * @return the function name 17 | */ 18 | public String getName(); 19 | 20 | /** 21 | * Add a parameter value sub-expression to this function. 22 | * @param e the parameter sub-expression 23 | */ 24 | public void addParameter(Expression e); 25 | 26 | /** 27 | * Get the maximum number of parameters accepted by this Function. 28 | * @return the maximum number of parametes accepted, or 29 | * {@link #VARARGS} is the number is variable. 30 | */ 31 | public int getParameterCount(); 32 | 33 | } // end of interface Function 34 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/BooleanIntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | /** 4 | * Sorted map that maps from a boolean key to an int value. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public interface BooleanIntSortedMap extends IntSortedMap { 9 | 10 | public boolean firstKey(); 11 | 12 | public boolean lastKey(); 13 | 14 | public boolean containsKey(boolean key); 15 | 16 | public IntIterator valueRangeIterator(boolean fromKey, boolean fromInc, 17 | boolean toKey, boolean toInc); 18 | 19 | public LiteralIterator keyIterator(); 20 | 21 | public LiteralIterator keyRangeIterator(boolean fromKey, boolean fromInc, 22 | boolean toKey, boolean toInc); 23 | 24 | public int get(boolean key); 25 | 26 | public int remove(boolean key); 27 | 28 | public int remove(boolean key, int value); 29 | 30 | public int put(boolean key, int value); 31 | 32 | } // end of interface LongIntSortedMap 33 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/DoubleIntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | 4 | /** 5 | * Sorted map that maps from a double key to an int value. 6 | * 7 | * @author jeffrey heer 8 | */ 9 | public interface DoubleIntSortedMap extends IntSortedMap { 10 | 11 | public double firstKey(); 12 | 13 | public double lastKey(); 14 | 15 | public boolean containsKey(double key); 16 | 17 | public IntIterator valueRangeIterator(double fromKey, boolean fromInc, 18 | double toKey, boolean toInc); 19 | 20 | public LiteralIterator keyIterator(); 21 | 22 | public LiteralIterator keyRangeIterator(double fromKey, boolean fromInc, 23 | double toKey, boolean toInc); 24 | 25 | public int get(double key); 26 | 27 | public int remove(double key); 28 | 29 | public int remove(double key, int value); 30 | 31 | public int put(double key, int value); 32 | 33 | } // end of interface DoubleIntSortedMap 34 | -------------------------------------------------------------------------------- /src/prefuse/util/display/PaintListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.display; 2 | 3 | import java.awt.Graphics2D; 4 | import java.util.EventListener; 5 | 6 | import prefuse.Display; 7 | 8 | /** 9 | * Listener interface for monitoring paint events on a Display. This 10 | * listener is notified both directly before and after a Display has 11 | * been painted, and allows for custom painting to be performed. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public interface PaintListener extends EventListener { 16 | 17 | /** 18 | * Notification that Display painting is beginning. 19 | * @param d the Display about to paint itself 20 | * @param g the Graphics context for the Display 21 | */ 22 | public void prePaint(Display d, Graphics2D g); 23 | 24 | /** 25 | * Notification that Display painting has completed. 26 | * @param d the Display about to paint itself 27 | * @param g the Graphics context for the Display 28 | */ 29 | public void postPaint(Display d, Graphics2D g); 30 | 31 | } // end of interface PaintListener 32 | -------------------------------------------------------------------------------- /src/prefuse/action/animate/SizeAnimator.java: -------------------------------------------------------------------------------- 1 | package prefuse.action.animate; 2 | 3 | import prefuse.action.ItemAction; 4 | import prefuse.visual.VisualItem; 5 | 6 | /** 7 | * Animator that linearly interpolates the size of a VisualItems. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class SizeAnimator extends ItemAction { 12 | 13 | /** 14 | * Create a new SizeAnimator that processes all data groups. 15 | */ 16 | public SizeAnimator() { 17 | super(); 18 | } 19 | 20 | /** 21 | * Create a new SizeAnimator that processes the specified group. 22 | * @param group the data group to process. 23 | */ 24 | public SizeAnimator(String group) { 25 | super(group); 26 | } 27 | 28 | /** 29 | * @see prefuse.action.ItemAction#process(prefuse.visual.VisualItem, double) 30 | */ 31 | public void process(VisualItem item, double frac) { 32 | double ss = item.getStartSize(); 33 | item.setSize(ss + frac*(item.getEndSize() - ss)); 34 | } 35 | 36 | } // end of class SizeAnimator 37 | -------------------------------------------------------------------------------- /src/prefuse/activity/SlowInSlowOutPacer.java: -------------------------------------------------------------------------------- 1 | package prefuse.activity; 2 | 3 | /** 4 | * A pacing function that provides slow-in, slow-out animation, where the 5 | * animation begins at a slower rate, speeds up through the middle of the 6 | * animation, and then slows down again before stopping. 7 | * 8 | * This is calculated by using an appropriately phased sigmoid function of 9 | * the form 1/(1+exp(-x)). 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public class SlowInSlowOutPacer implements Pacer { 14 | 15 | /** 16 | * Pacing function providing slow-in, slow-out animation 17 | * @see prefuse.activity.Pacer#pace(double) 18 | */ 19 | public double pace(double f) { 20 | return ( f == 0.0 || f == 1.0 ? f : sigmoid(f) ); 21 | } 22 | 23 | /** 24 | * Computes a normalized sigmoid 25 | * @param x input value in the interval [0,1] 26 | */ 27 | private double sigmoid(double x) { 28 | x = 12.0*x - 6.0; 29 | return (1.0 / (1.0 + Math.exp(-1.0 * x))); 30 | } 31 | 32 | } // end of class SlowInSlowOutPacer 33 | -------------------------------------------------------------------------------- /src/prefuse/util/force/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Utility classes providing a physical force simulation for layout and 3 | animation. Force simulations consist of a series of force functions that 4 | calculate forces acting on data elements, and an integrator that determines 5 | how these calculated forces effect the position and velocity of these elements 6 | over time. The {@link prefuse.util.force.ForceSimulator} class keeps track of 7 | which elements should be included in the simulation, as well as which 8 | {@link prefuse.util.force.Force} functions and 9 | {@link prefuse.util.force.Integrator} are used.

10 | 11 |

To create your own custom simulations, create a new ForceSimulator instance 12 | and add the desired force functions. Custom force functions can be introduced 13 | by subclassing {@link prefuse.util.force.AbstractForce} or implementing the 14 | {@link prefuse.util.force.Force} interface. 15 | Additionally, the {@link prefuse.util.ui.JForcePanel} user interface component 16 | can be used during development to explore different parameterizations of the 17 | various force functions until a desired behavior is found.

18 | -------------------------------------------------------------------------------- /src/prefuse/util/ui/JPrefuseApplet.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.ui; 2 | 3 | import javax.swing.JApplet; 4 | 5 | import prefuse.activity.ActivityManager; 6 | 7 | /** 8 | * A convenience class for creating applets that incorporate 9 | * prefuse visualizations. Clients can subclass this class to 10 | * implement prefuse applets. However if the subclass overrides 11 | * the {@link #destroy()} or {@link #stop()} methods, it should 12 | * be sure to also call these methods on the super class. 13 | * 14 | * @author jeffrey heer 15 | */ 16 | public class JPrefuseApplet extends JApplet { 17 | 18 | /** 19 | * Automatically shuts down the ActivityManager when the applet is 20 | * destroyed. 21 | * @see java.applet.Applet#destroy() 22 | */ 23 | public void destroy() { 24 | ActivityManager.stopThread(); 25 | } 26 | 27 | /** 28 | * Automatically shuts down the ActivityManager when the applet is 29 | * stopped. 30 | * @see java.applet.Applet#stop() 31 | */ 32 | public void stop() { 33 | ActivityManager.stopThread(); 34 | } 35 | 36 | } // end of class JPrefuseApplet 37 | -------------------------------------------------------------------------------- /src/prefuse/data/event/GraphListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.event; 2 | 3 | import java.util.EventListener; 4 | 5 | import prefuse.data.Graph; 6 | 7 | /** 8 | * Listner interface for monitoring changes to a graph or tree structure. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface GraphListener extends EventListener { 13 | 14 | /** 15 | * Notification that a graph has changed. 16 | * @param g the graph that has changed 17 | * @param table the particular table within the graph that has changed 18 | * @param start the starting row index of the changed table region 19 | * @param end the ending row index of the changed table region 20 | * @param col the column that has changed, or 21 | * {@link EventConstants#ALL_COLUMNS} if the operation affects all 22 | * columns 23 | * @param type the type of modification, one of 24 | * {@link EventConstants#INSERT}, {@link EventConstants#DELETE}, or 25 | * {@link EventConstants#UPDATE}. 26 | */ 27 | public void graphChanged(Graph g, String table, 28 | int start, int end, int col, int type); 29 | 30 | } // end of interface GraphListener 31 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/IntIntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | /** 4 | * Sorted map that maps from an int key to an int value. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public interface IntIntSortedMap extends IntSortedMap { 9 | 10 | public int firstKey(); 11 | 12 | public int lastKey(); 13 | 14 | public boolean containsKey(int key); 15 | 16 | public IntIterator valueRangeIterator(int fromKey, boolean fromInc, 17 | int toKey, boolean toInc); 18 | 19 | public LiteralIterator keyIterator(); 20 | 21 | public LiteralIterator keyRangeIterator(int fromKey, boolean fromInc, 22 | int toKey, boolean toInc); 23 | 24 | public int get(int key); 25 | 26 | public int remove(int key); 27 | 28 | public int remove(int key, int value); 29 | 30 | public int put(int key, int value); 31 | 32 | public int getLast(int key); 33 | 34 | public int getNextValue(int key, int value); 35 | 36 | public int getPreviousValue(int key, int value); 37 | 38 | } // end of interface IntIntSortedMap 39 | -------------------------------------------------------------------------------- /src/prefuse/visual/EdgeItem.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual; 2 | 3 | import prefuse.data.Edge; 4 | 5 | /** 6 | * VisualItem that represents an edge in a graph. This interface combines 7 | * the {@link VisualItem} interface with the {@link prefuse.data.Edge} 8 | * interface. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface EdgeItem extends VisualItem, Edge { 13 | 14 | /** 15 | * Get the first, or source, NodeItem upon which this edge is incident. 16 | * @return the source NodeItem 17 | */ 18 | public NodeItem getSourceItem(); 19 | 20 | /** 21 | * Get the second, or target, NodeItem upon which this edge is incident. 22 | * @return the target NodeItem 23 | */ 24 | public NodeItem getTargetItem(); 25 | 26 | /** 27 | * Get the NodeItem connected to the given NodeItem by this edge. 28 | * @param n a NodeItem upon which this edge is incident. If this item 29 | * is not connected to this edge, a runtime exception will be thrown. 30 | * @return the other NodeItem connected to this edge 31 | */ 32 | public NodeItem getAdjacentItem(NodeItem n); 33 | 34 | } // end of interface EdgeItem 35 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/ObjectIntSortedMap.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.Iterator; 4 | 5 | /** 6 | * Sorted map that maps from an Object key to an int value. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public interface ObjectIntSortedMap extends IntSortedMap { 11 | 12 | public static final Object MAX_KEY = new Object(); 13 | public static final Object MIN_KEY = new Object(); 14 | 15 | public Object firstKey(); 16 | 17 | public Object lastKey(); 18 | 19 | public boolean containsKey(Object key); 20 | 21 | public IntIterator valueRangeIterator(Object fromKey, boolean fromInc, 22 | Object toKey, boolean toInc); 23 | 24 | public Iterator keyIterator(); 25 | 26 | public Iterator keyRangeIterator(Object fromKey, boolean fromInc, 27 | Object toKey, boolean toInc); 28 | 29 | public int get(Object key); 30 | 31 | public int remove(Object key); 32 | 33 | public int remove(Object key, int val); 34 | 35 | public int put(Object key, int value); 36 | 37 | } // end of interface ObjectIntSortedMap 38 | -------------------------------------------------------------------------------- /lib/license-colt.txt: -------------------------------------------------------------------------------- 1 | Colt License Agreement 2 | 3 | Packages cern.colt* , cern.jet*, cern.clhep 4 | 5 | Copyright (c) 1999 CERN - European Organization for Nuclear Research. 6 | 7 | Permission to use, copy, modify, distribute and sell this software and 8 | its documentation for any purpose is hereby granted without fee, provided 9 | that the above copyright notice appear in all copies and that both that 10 | copyright notice and this permission notice appear in supporting documentation. 11 | CERN makes no representations about the suitability of this software for 12 | any purpose. It is provided "as is" without expressed or implied 13 | warranty. 14 | 15 | Packages hep.aida.* 16 | 17 | Written by Pavel Binko, Dino Ferrero Merlino, Wolfgang Hoschek, 18 | Tony Johnson, Andreas Pfeiffer, and others. Check the FreeHEP home 19 | page for more info. Permission to use and/or redistribute this 20 | work is granted under the terms of the LGPL License, with the 21 | exception that any usage related to military applications is 22 | expressly forbidden. The software and documentation made available 23 | under the terms of this license are provided with no warranty. 24 | -------------------------------------------------------------------------------- /src/prefuse/util/display/DebugStatsPainter.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.display; 2 | 3 | import java.awt.Graphics2D; 4 | 5 | import prefuse.Display; 6 | import prefuse.util.PrefuseLib; 7 | 8 | /** 9 | * PinatListener that paints useful debugging statistics over a prefuse 10 | * display. This includes the current frame rate, the number of visible 11 | * items, memory usage, and display navigation information. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class DebugStatsPainter implements PaintListener { 16 | 17 | /** 18 | * Does nothing. 19 | * @see prefuse.util.display.PaintListener#prePaint(prefuse.Display, java.awt.Graphics2D) 20 | */ 21 | public void prePaint(Display d, Graphics2D g) { 22 | 23 | } 24 | 25 | /** 26 | * Prints a debugging statistics string in the Display. 27 | * @see prefuse.util.display.PaintListener#postPaint(prefuse.Display, java.awt.Graphics2D) 28 | */ 29 | public void postPaint(Display d, Graphics2D g) { 30 | g.setFont(d.getFont()); 31 | g.setColor(d.getForeground()); 32 | g.drawString(PrefuseLib.getDisplayStats(d), 5, 15); 33 | } 34 | 35 | } // end of class DebugStatsPainter 36 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/DateTimeParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | import java.text.DateFormat; 4 | 5 | /** 6 | * DataParser instance that parses Date values as java.util.Date instances, 7 | * representing a particular date and time. 8 | * This class uses a backing {@link java.text.DateFormat} instance to 9 | * perform parsing. The DateFormat instance to use can be passed in to the 10 | * constructor, or by default the DateFormat returned by 11 | * {@link java.text.DateFormat#getDateTimeInstance(int, int)} with both 12 | * arguments being {@link java.text.DateFormat#SHORT} is used. 13 | * 14 | * @author jeffrey heer 15 | */ 16 | public class DateTimeParser extends DateParser { 17 | 18 | /** 19 | * Create a new DateTimeParser. 20 | */ 21 | public DateTimeParser() { 22 | this(DateFormat.getDateTimeInstance( 23 | DateFormat.SHORT, DateFormat.SHORT)); 24 | } 25 | 26 | /** 27 | * Create a new DateTimeParser. 28 | * @param dateFormat the DateFormat instance to use for parsing 29 | */ 30 | public DateTimeParser(DateFormat dateFormat) { 31 | super(dateFormat); 32 | } 33 | 34 | } // end of class DateTimeParser 35 | -------------------------------------------------------------------------------- /src/prefuse/action/animate/LocationAnimator.java: -------------------------------------------------------------------------------- 1 | package prefuse.action.animate; 2 | 3 | import prefuse.action.ItemAction; 4 | import prefuse.visual.VisualItem; 5 | 6 | 7 | /** 8 | * Animator that linearly interpolates between two positions. This 9 | * is useful for performing animated transitions. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public class LocationAnimator extends ItemAction { 14 | 15 | /** 16 | * Create a new LocationAnimator that processes all data groups. 17 | */ 18 | public LocationAnimator() { 19 | super(); 20 | } 21 | 22 | /** 23 | * Create a new LocationAnimator that processes the specified group. 24 | * @param group the data group to process. 25 | */ 26 | public LocationAnimator(String group) { 27 | super(group); 28 | } 29 | 30 | /** 31 | * @see prefuse.action.ItemAction#process(prefuse.visual.VisualItem, double) 32 | */ 33 | public void process(VisualItem item, double frac) { 34 | double sx = item.getStartX(); 35 | double sy = item.getStartY(); 36 | item.setX(sx + frac*(item.getEndX()-sx)); 37 | item.setY(sy + frac*(item.getEndY()-sy)); 38 | } 39 | 40 | } // end of class LocationAnimator 41 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/ObjectParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | /** 4 | * DataParser instance that handles arbitrary Objects. The parse method throws 5 | * an exception and the format method simply returns the Object's toString() 6 | * method. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public class ObjectParser implements DataParser { 11 | 12 | /** 13 | * Returns Object.class. 14 | * @see prefuse.data.parser.DataParser#getType() 15 | */ 16 | public Class getType() { 17 | return Object.class; 18 | } 19 | 20 | /** 21 | * @see prefuse.data.parser.DataParser#format(java.lang.Object) 22 | */ 23 | public String format(Object value) { 24 | return value==null ? null : value.toString(); 25 | } 26 | 27 | /** 28 | * @see prefuse.data.parser.DataParser#canParse(java.lang.String) 29 | */ 30 | public boolean canParse(String text) { 31 | return false; 32 | } 33 | 34 | /** 35 | * @see prefuse.data.parser.DataParser#parse(java.lang.String) 36 | */ 37 | public Object parse(String text) throws DataParseException { 38 | throw new UnsupportedOperationException(); 39 | } 40 | 41 | } // end of class ObjectParser 42 | -------------------------------------------------------------------------------- /src/prefuse/controls/HoverActionControl.java: -------------------------------------------------------------------------------- 1 | package prefuse.controls; 2 | 3 | import java.awt.event.MouseEvent; 4 | 5 | import prefuse.visual.VisualItem; 6 | 7 | /** 8 | * Control that executes an action when the mouse passes over an item. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public class HoverActionControl extends ControlAdapter { 13 | 14 | private String m_action; 15 | 16 | /** 17 | * Create a new HoverActionControl. 18 | * @param action the action to run upon mouse-over. The action is run 19 | * both upon entering and upon exiting the item. 20 | */ 21 | public HoverActionControl(String action) { 22 | m_action = action; 23 | } 24 | 25 | /** 26 | * @see prefuse.controls.Control#itemEntered(prefuse.visual.VisualItem, java.awt.event.MouseEvent) 27 | */ 28 | public void itemEntered(VisualItem item, MouseEvent e) { 29 | item.getVisualization().run(m_action); 30 | } 31 | 32 | /** 33 | * @see prefuse.controls.Control#itemExited(prefuse.visual.VisualItem, java.awt.event.MouseEvent) 34 | */ 35 | public void itemExited(VisualItem item, MouseEvent e) { 36 | item.getVisualization().run(m_action); 37 | } 38 | 39 | } // end of class HoverActionControl 40 | -------------------------------------------------------------------------------- /src/prefuse/data/util/ColumnProjection.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import prefuse.data.column.Column; 4 | import prefuse.data.event.ProjectionListener; 5 | 6 | /** 7 | * Interface for filtering only a subset of a Table columns, computing 8 | * a projection of the available data fields. Used in conjunction with 9 | * CascadedTable instances to control what fields are inherited from 10 | * a parent table. 11 | * 12 | * @author jeffrey heer 13 | */ 14 | public interface ColumnProjection { 15 | 16 | /** 17 | * Determine if the given Column should be included. 18 | * @param col the Column to test 19 | * @param name the name of the column 20 | * @return true if the column passes the projection, false otherwise 21 | */ 22 | public boolean include(Column col, String name); 23 | 24 | /** 25 | * Add a listener to this column projection 26 | * @param lstnr the listener to add 27 | */ 28 | public void addProjectionListener(ProjectionListener lstnr); 29 | 30 | /** 31 | * Remove a listener from this column projection 32 | * @param lstnr the listener to remove 33 | */ 34 | public void removeProjectionListener(ProjectionListener lstnr); 35 | 36 | } // end of interface ColumnProjection 37 | -------------------------------------------------------------------------------- /src/prefuse/data/io/AbstractGraphWriter.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import java.io.File; 4 | import java.io.FileNotFoundException; 5 | import java.io.FileOutputStream; 6 | 7 | import prefuse.data.Graph; 8 | 9 | /** 10 | * Abstract base class implementation of the GraphWriter interface. Provides 11 | * implementations for all but the 12 | * {@link prefuse.data.io.GraphWriter#writeGraph(Graph, OutputStream)} 13 | * method. 14 | * 15 | * @author jeffrey heer 16 | */ 17 | public abstract class AbstractGraphWriter implements GraphWriter { 18 | 19 | /** 20 | * @see prefuse.data.io.GraphWriter#writeGraph(prefuse.data.Graph, java.lang.String) 21 | */ 22 | public void writeGraph(Graph graph, String filename) throws DataIOException 23 | { 24 | writeGraph(graph, new File(filename)); 25 | } 26 | 27 | /** 28 | * @see prefuse.data.io.GraphWriter#writeGraph(prefuse.data.Graph, java.io.File) 29 | */ 30 | public void writeGraph(Graph graph, File f) throws DataIOException { 31 | try { 32 | writeGraph(graph, new FileOutputStream(f)); 33 | } catch ( FileNotFoundException e ) { 34 | throw new DataIOException(e); 35 | } 36 | } 37 | 38 | } // end of abstract class AbstractGraphReader 39 | -------------------------------------------------------------------------------- /src/prefuse/activity/ActivityAdapter.java: -------------------------------------------------------------------------------- 1 | package prefuse.activity; 2 | 3 | /** 4 | * Adapter class for ActivityListeners. Provides empty implementations of 5 | * ActivityListener routines. 6 | * 7 | * @version 1.0 8 | * @author jeffrey heer 9 | */ 10 | public class ActivityAdapter implements ActivityListener { 11 | 12 | /** 13 | * @see prefuse.activity.ActivityListener#activityScheduled(prefuse.activity.Activity) 14 | */ 15 | public void activityScheduled(Activity a) { 16 | } 17 | 18 | /** 19 | * @see prefuse.activity.ActivityListener#activityStarted(prefuse.activity.Activity) 20 | */ 21 | public void activityStarted(Activity a) { 22 | } 23 | 24 | /** 25 | * @see prefuse.activity.ActivityListener#activityStepped(prefuse.activity.Activity) 26 | */ 27 | public void activityStepped(Activity a) { 28 | } 29 | 30 | /** 31 | * @see prefuse.activity.ActivityListener#activityFinished(prefuse.activity.Activity) 32 | */ 33 | public void activityFinished(Activity a) { 34 | } 35 | 36 | /** 37 | * @see prefuse.activity.ActivityListener#activityCancelled(prefuse.activity.Activity) 38 | */ 39 | public void activityCancelled(Activity a) { 40 | } 41 | 42 | } // end of class ActivityAdapter 43 | -------------------------------------------------------------------------------- /src/prefuse/data/io/AbstractTableWriter.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import java.io.File; 4 | import java.io.FileNotFoundException; 5 | import java.io.FileOutputStream; 6 | 7 | import prefuse.data.Table; 8 | 9 | /** 10 | * Abstract base class implementation of the TableWriter interface. Provides 11 | * implementations for all but the 12 | * {@link prefuse.data.io.TableWriter#writeTable(Table, java.io.OutputStream)} 13 | * method. 14 | * 15 | * @author jeffrey heer 16 | */ 17 | public abstract class AbstractTableWriter implements TableWriter { 18 | 19 | /** 20 | * @see prefuse.data.io.TableWriter#writeTable(prefuse.data.Table, java.lang.String) 21 | */ 22 | public void writeTable(Table table, String filename) throws DataIOException 23 | { 24 | writeTable(table, new File(filename)); 25 | } 26 | 27 | /** 28 | * @see prefuse.data.io.TableWriter#writeTable(prefuse.data.Table, java.io.File) 29 | */ 30 | public void writeTable(Table table, File f) throws DataIOException { 31 | try { 32 | writeTable(table, new FileOutputStream(f)); 33 | } catch ( FileNotFoundException e ) { 34 | throw new DataIOException(e); 35 | } 36 | } 37 | 38 | } // end of abstract class AbstractTableReader 39 | -------------------------------------------------------------------------------- /src/prefuse/data/io/TableWriter.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import java.io.File; 4 | import java.io.OutputStream; 5 | 6 | import prefuse.data.Table; 7 | 8 | /** 9 | * Interface for classes that write Table data to a particular file format. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public interface TableWriter { 14 | 15 | /** 16 | * Write a table to the file with the given filename. 17 | * @param table the Table to write 18 | * @param filename the file to write the table to 19 | * @throws DataWriteException 20 | */ 21 | public void writeTable(Table table, String filename) throws DataIOException; 22 | 23 | /** 24 | * Write a table to the given File. 25 | * @param table the Table to write 26 | * @param f the file to write the table to 27 | * @throws DataWriteException 28 | */ 29 | public void writeTable(Table table, File f) throws DataIOException; 30 | 31 | /** 32 | * Write a table from the given OutputStream. 33 | * @param table the Table to write 34 | * @param os the OutputStream to write the table to 35 | * @throws DataWriteException 36 | */ 37 | public void writeTable(Table table, OutputStream os) throws DataIOException; 38 | 39 | } // end of interface TableWriter 40 | -------------------------------------------------------------------------------- /src/prefuse/render/NullRenderer.java: -------------------------------------------------------------------------------- 1 | package prefuse.render; 2 | 3 | import java.awt.Graphics2D; 4 | import java.awt.geom.Point2D; 5 | 6 | import prefuse.visual.VisualItem; 7 | 8 | 9 | /** 10 | * Renderer that does nothing, causing an item to be rendered "into 11 | * the void". Possibly useful for items that must exist and have a spatial 12 | * location but should otherwise be invisible and non-interactive (e.g., 13 | * invisible end-points for visible edges). 14 | * 15 | * @author jeffrey heer 16 | */ 17 | public class NullRenderer implements Renderer { 18 | 19 | /** 20 | * @see prefuse.render.Renderer#render(java.awt.Graphics2D, prefuse.visual.VisualItem) 21 | */ 22 | public void render(Graphics2D g, VisualItem item) { 23 | // do nothing 24 | } 25 | 26 | /** 27 | * @see prefuse.render.Renderer#locatePoint(java.awt.geom.Point2D, prefuse.visual.VisualItem) 28 | */ 29 | public boolean locatePoint(Point2D p, VisualItem item) { 30 | return false; 31 | } 32 | 33 | /** 34 | * @see prefuse.render.Renderer#setBounds(prefuse.visual.VisualItem) 35 | */ 36 | public void setBounds(VisualItem item) { 37 | item.setBounds(item.getX(), item.getY(), 0, 0); 38 | } 39 | 40 | } // end of class NullRenderer 41 | -------------------------------------------------------------------------------- /src/prefuse/activity/ActivityListener.java: -------------------------------------------------------------------------------- 1 | package prefuse.activity; 2 | 3 | import java.util.EventListener; 4 | 5 | /** 6 | * Callback interface by which interested classes can be notified of 7 | * the progress of a scheduled activity. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public interface ActivityListener extends EventListener { 12 | 13 | /** 14 | * Called when an activity has been scheduled with an ActivityManager 15 | * @param a the scheduled Activity 16 | */ 17 | public void activityScheduled(Activity a); 18 | 19 | /** 20 | * Called when an activity is first started. 21 | * @param a the started Activity 22 | */ 23 | public void activityStarted(Activity a); 24 | 25 | /** 26 | * Called when an activity is stepped. 27 | * @param a the stepped Activity 28 | */ 29 | public void activityStepped(Activity a); 30 | 31 | /** 32 | * Called when an activity finishes. 33 | * @param a the finished Activity 34 | */ 35 | public void activityFinished(Activity a); 36 | 37 | /** 38 | * Called when an activity is cancelled. 39 | * @param a the cancelled Activity 40 | */ 41 | public void activityCancelled(Activity a); 42 | 43 | } // end of interface ActivityListener 44 | -------------------------------------------------------------------------------- /src/prefuse/data/io/DataIOException.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | /** 4 | * Exception indicating an error occurred during reading or writing data. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public class DataIOException extends Exception { 9 | 10 | /** 11 | * Create a new DataIOException. 12 | */ 13 | public DataIOException() { 14 | super(); 15 | } 16 | 17 | /** 18 | * Create a new DataIOException. 19 | * @param message a descriptive error message 20 | */ 21 | public DataIOException(String message) { 22 | super(message); 23 | } 24 | 25 | /** 26 | * Create a new DataIOException. 27 | * @param message a descriptive error message 28 | * @param cause a Throwable (e.g., error or exception) that was the cause 29 | * for this exception being thrown 30 | */ 31 | public DataIOException(String message, Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | /** 36 | * Create a new DataIOException. 37 | * @param cause a Throwable (e.g., error or exception) that was the cause 38 | * for this exception being thrown 39 | */ 40 | public DataIOException(Throwable cause) { 41 | super(cause); 42 | } 43 | 44 | } // end of class DataIOException 45 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/Queue.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.HashMap; 4 | import java.util.LinkedList; 5 | 6 | /** 7 | * Maintains a breadth-first-search queue as well as depth labels. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class Queue { 12 | 13 | // TODO: create an optimized implementation of this class 14 | 15 | private LinkedList m_list = new LinkedList(); 16 | private HashMap m_map = new HashMap(); 17 | 18 | public void clear() { 19 | m_list.clear(); 20 | m_map.clear(); 21 | } 22 | 23 | public boolean isEmpty() { 24 | return m_list.isEmpty(); 25 | } 26 | 27 | public void add(Object o, int depth) { 28 | m_list.add(o); 29 | visit(o, depth); 30 | } 31 | 32 | public int getDepth(Object o) { 33 | Integer d = (Integer)m_map.get(o); 34 | return ( d==null ? -1 : d.intValue() ); 35 | } 36 | 37 | public void visit(Object o, int depth) { 38 | m_map.put(o, new Integer(depth)); 39 | } 40 | 41 | public Object removeFirst() { 42 | return m_list.removeFirst(); 43 | } 44 | 45 | public Object removeLast() { 46 | return m_list.removeLast(); 47 | } 48 | 49 | } // end of class Queue 50 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/IntArrayIterator.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2006 Regents of the University of California. 3 | * See "license-prefuse.txt" for licensing terms. 4 | */ 5 | package prefuse.util.collections; 6 | 7 | import java.util.NoSuchElementException; 8 | 9 | /** 10 | * IntIterator implementation that provides an iteration over the 11 | * contents of an int array. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class IntArrayIterator extends IntIterator { 16 | 17 | private int[] m_array; 18 | private int m_cur; 19 | private int m_end; 20 | 21 | public IntArrayIterator(int[] array, int start, int len) { 22 | m_array = array; 23 | m_cur = start; 24 | m_end = start+len; 25 | } 26 | 27 | /** 28 | * @see prefuse.util.collections.IntIterator#nextInt() 29 | */ 30 | public int nextInt() { 31 | if ( m_cur >= m_end ) 32 | throw new NoSuchElementException(); 33 | return m_array[m_cur++]; 34 | } 35 | 36 | /** 37 | * @see java.util.Iterator#hasNext() 38 | */ 39 | public boolean hasNext() { 40 | return m_cur < m_end; 41 | } 42 | 43 | public void remove() { 44 | throw new UnsupportedOperationException(); 45 | } 46 | 47 | } // end of class IntArrayIterator 48 | -------------------------------------------------------------------------------- /src/prefuse/action/animate/QualityControlAnimator.java: -------------------------------------------------------------------------------- 1 | package prefuse.action.animate; 2 | 3 | import prefuse.action.Action; 4 | 5 | /** 6 | * Animator that toggles rendering quality to allow for smooth animations but 7 | * high quality rendering of still images. At the beginning of an animation, 8 | * high quality rendering (if enabled) is disabled, and at the end the original 9 | * setting is restored. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public class QualityControlAnimator extends Action { 14 | 15 | /** 16 | * @see prefuse.action.Action#run(double) 17 | */ 18 | public void run(double frac) { 19 | if ( m_vis == null ) return; 20 | if ( frac == 0.0 || frac == 1.0 ) { 21 | boolean quality = frac >= 1.0; 22 | for ( int i=0; ijeffrey heer 7 | */ 8 | public class DataParseException extends Exception { 9 | 10 | /** 11 | * Create a new DataParseException. 12 | */ 13 | public DataParseException() { 14 | super(); 15 | } 16 | 17 | /** 18 | * Create a new DataParseException. 19 | * @param message a descriptive error message 20 | */ 21 | public DataParseException(String message) { 22 | super(message); 23 | } 24 | 25 | /** 26 | * Create a new DataParseException. 27 | * @param message a descriptive error message 28 | * @param cause a Throwable (e.g., error or exception) that was the cause 29 | * for this exception being thrown 30 | */ 31 | public DataParseException(String message, Throwable cause) { 32 | super(message, cause); 33 | } 34 | 35 | /** 36 | * Create a new DataParseException. 37 | * @param cause a Throwable (e.g., error or exception) that was the cause 38 | * for this exception being thrown 39 | */ 40 | public DataParseException(Throwable cause) { 41 | super(cause); 42 | } 43 | 44 | } // end of class DataParseException 45 | -------------------------------------------------------------------------------- /src/prefuse/data/DataReadOnlyException.java: -------------------------------------------------------------------------------- 1 | package prefuse.data; 2 | 3 | /** 4 | * Exception indicating an attempt to write to a read-only data value was made. 5 | * @author jeffrey heer 6 | */ 7 | public class DataReadOnlyException extends RuntimeException { 8 | 9 | /** 10 | * Create a new DataReadOnlyException. 11 | */ 12 | public DataReadOnlyException() { 13 | super(); 14 | } 15 | 16 | /** 17 | * Create a new DataReadOnlyException. 18 | * @param message a descriptive error message 19 | * @param cause a Throwable (e.g., error or exception) that was the cause 20 | * for this exception being thrown 21 | */ 22 | public DataReadOnlyException(String message, Throwable cause) { 23 | super(message, cause); 24 | } 25 | 26 | /** 27 | * Create a new DataReadOnlyException. 28 | * @param message a descriptive error message 29 | */ 30 | public DataReadOnlyException(String message) { 31 | super(message); 32 | } 33 | 34 | /** 35 | * Create a new DataReadOnlyException. 36 | * @param cause a Throwable (e.g., error or exception) that was the cause 37 | * for this exception being thrown 38 | */ 39 | public DataReadOnlyException(Throwable cause) { 40 | super(cause); 41 | } 42 | 43 | } // end of class DataReadOnlyException 44 | -------------------------------------------------------------------------------- /src/prefuse/data/util/NeighborIterator.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import java.util.Iterator; 4 | 5 | import prefuse.data.Edge; 6 | import prefuse.data.Node; 7 | 8 | /** 9 | * Iterator over neighbors of a given Node. Resolves Edge instances to 10 | * provide direct iteration over the Node instances. 11 | * 12 | * @author jeffrey heer 13 | */ 14 | public class NeighborIterator implements Iterator { 15 | 16 | private Iterator m_edges; 17 | private Node m_node; 18 | 19 | /** 20 | * Create a new NeighborIterator. 21 | * @param n the source node 22 | * @param edges the node edges to iterate over 23 | */ 24 | public NeighborIterator(Node n, Iterator edges) { 25 | m_node = n; 26 | m_edges = edges; 27 | } 28 | 29 | /** 30 | * @see java.util.Iterator#remove() 31 | */ 32 | public void remove() { 33 | throw new UnsupportedOperationException(); 34 | } 35 | 36 | /** 37 | * @see java.util.Iterator#hasNext() 38 | */ 39 | public boolean hasNext() { 40 | return m_edges.hasNext(); 41 | } 42 | 43 | /** 44 | * @see java.util.Iterator#next() 45 | */ 46 | public Object next() { 47 | Edge e = (Edge)m_edges.next(); 48 | return e.getAdjacentNode(m_node); 49 | } 50 | 51 | } // end of class NeighborIterator 52 | -------------------------------------------------------------------------------- /src/prefuse/util/ui/ValuedRangeModel.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.ui; 2 | 3 | import javax.swing.BoundedRangeModel; 4 | 5 | /** 6 | * BoundedRangeModel that additionally supports a mapping between the integer 7 | * range used by interface components and a richer range of values, such 8 | * as numbers or arbitrary objects. 9 | * 10 | * @author jeffrey heer 11 | * @see javax.swing.BoundedRangeModel 12 | */ 13 | public interface ValuedRangeModel extends BoundedRangeModel { 14 | 15 | /** 16 | * Get the minimum value backing the range model. This is 17 | * the absolute minimum value possible for the range span. 18 | * @return the minimum value 19 | */ 20 | public Object getMinValue(); 21 | 22 | /** 23 | * Get the maximum value backing the range model. This is 24 | * the absolute maximum value possible for the range span. 25 | * @return the maximum value 26 | */ 27 | public Object getMaxValue(); 28 | 29 | /** 30 | * Get the value at the low point of the range span. 31 | * @return the lowest value of the current range 32 | */ 33 | public Object getLowValue(); 34 | 35 | /** 36 | * Get the value at the high point of the range span. 37 | * @return the highest value of the current range 38 | */ 39 | public Object getHighValue(); 40 | 41 | } // end of interface ValuedRangeModel 42 | -------------------------------------------------------------------------------- /src/prefuse/util/force/ForceConfigAction.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.force; 2 | 3 | import java.awt.event.ActionEvent; 4 | 5 | import javax.swing.AbstractAction; 6 | import javax.swing.JDialog; 7 | import javax.swing.JFrame; 8 | import javax.swing.JPanel; 9 | 10 | import prefuse.util.ui.JForcePanel; 11 | 12 | /** 13 | * Swing Action components that brings up a dialog allowing users to configure 14 | * a force simulation. 15 | * 16 | * @author jeffrey heer 17 | * @see prefuse.util.ui.JForcePanel 18 | */ 19 | public class ForceConfigAction extends AbstractAction { 20 | 21 | private JDialog dialog; 22 | 23 | /** 24 | * Create a new ForceConfigAction. 25 | * @param frame the parent frame for which to create the dialog 26 | * @param fsim the force simulator to configure 27 | */ 28 | public ForceConfigAction(JFrame frame, ForceSimulator fsim) { 29 | dialog = new JDialog(frame, false); 30 | dialog.setTitle("Configure Force Simulator"); 31 | JPanel forcePanel = new JForcePanel(fsim); 32 | dialog.getContentPane().add(forcePanel); 33 | dialog.pack(); 34 | } 35 | 36 | /** 37 | * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent) 38 | */ 39 | public void actionPerformed(ActionEvent e) { 40 | dialog.setVisible(true); 41 | } 42 | 43 | } // end of class ForceConfigAction 44 | -------------------------------------------------------------------------------- /src/prefuse/action/animate/FontAnimator.java: -------------------------------------------------------------------------------- 1 | package prefuse.action.animate; 2 | 3 | import java.awt.Font; 4 | 5 | import prefuse.action.ItemAction; 6 | import prefuse.util.FontLib; 7 | import prefuse.visual.VisualItem; 8 | 9 | 10 | /** 11 | * Animator that interpolates between starting and ending Fonts for VisualItems 12 | * during an animation. Font sizes are interpolated linearly. If the 13 | * animation fraction is under 0.5, the face and style of the starting 14 | * font are used, otherwise the face and style of the second font are 15 | * applied. 16 | * 17 | * @author jeffrey heer 18 | */ 19 | public class FontAnimator extends ItemAction { 20 | 21 | /** 22 | * Create a new FontAnimator that processes all data groups. 23 | */ 24 | public FontAnimator() { 25 | super(); 26 | } 27 | 28 | /** 29 | * Create a new FontAnimator that processes the specified group. 30 | * @param group the data group to process. 31 | */ 32 | public FontAnimator(String group) { 33 | super(group); 34 | } 35 | 36 | /** 37 | * @see prefuse.action.ItemAction#process(prefuse.visual.VisualItem, double) 38 | */ 39 | public void process(VisualItem item, double frac) { 40 | Font f1 = item.getStartFont(), f2 = item.getEndFont(); 41 | item.setFont(FontLib.getIntermediateFont(f1,f2,frac)); 42 | } 43 | 44 | } // end of class FontAnimator 45 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/ObjectLiteral.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import prefuse.data.Schema; 4 | import prefuse.data.Tuple; 5 | 6 | /** 7 | * Literal expression of an Object value. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class ObjectLiteral extends Literal { 12 | 13 | private final Object m_value; 14 | 15 | /** 16 | * Create a new ObjectLiteral. 17 | * @param value the literal value 18 | */ 19 | public ObjectLiteral(Object value) { 20 | m_value = value; 21 | } 22 | 23 | // ------------------------------------------------------------------------ 24 | // Expression Interface 25 | 26 | /** 27 | * @see prefuse.data.expression.Expression#getType(prefuse.data.Schema) 28 | */ 29 | public Class getType(Schema s) { 30 | return m_value==null ? Object.class : m_value.getClass(); 31 | } 32 | 33 | /** 34 | * @see prefuse.data.expression.Expression#get(prefuse.data.Tuple) 35 | */ 36 | public Object get(Tuple t) { 37 | return m_value; 38 | } 39 | 40 | /** 41 | * @see java.lang.Object#toString() 42 | */ 43 | public String toString() { 44 | if ( m_value == null ) { 45 | return "NULL"; 46 | } else { 47 | return "'"+m_value.toString()+"'"; 48 | } 49 | } 50 | 51 | } // end of class ObjectLiteral 52 | -------------------------------------------------------------------------------- /src/prefuse/data/io/GraphWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2004-2006 Regents of the University of California. 3 | * See "license-prefuse.txt" for licensing terms. 4 | */ 5 | package prefuse.data.io; 6 | 7 | import java.io.File; 8 | import java.io.OutputStream; 9 | 10 | import prefuse.data.Graph; 11 | 12 | /** 13 | * Interface for classes that write Graph data to a particular file format. 14 | * 15 | * @author jeffrey heer 16 | */ 17 | public interface GraphWriter { 18 | 19 | /** 20 | * Write a graph to the file with the given filename. 21 | * @param graph the Graph to write 22 | * @param filename the file to write the graph to 23 | * @throws DataWriteException 24 | */ 25 | public void writeGraph(Graph graph, String filename) throws DataIOException; 26 | 27 | /** 28 | * Write a graph to the given File. 29 | * @param graph the Graph to write 30 | * @param f the file to write the graph to 31 | * @throws DataWriteException 32 | */ 33 | public void writeGraph(Graph graph, File f) throws DataIOException; 34 | 35 | /** 36 | * Write a graph from the given OutputStream. 37 | * @param graph the Graph to write 38 | * @param os the OutputStream to write the graph to 39 | * @throws DataWriteException 40 | */ 41 | public void writeGraph(Graph graph, OutputStream os) throws DataIOException; 42 | 43 | } // end of interface GraphWriter 44 | -------------------------------------------------------------------------------- /data/graphml-sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | yellow 6 | 7 | 8 | 9 | green 10 | 11 | 12 | 13 | blue 14 | 15 | 16 | red 17 | 18 | 19 | 20 | turquoise 21 | 22 | 23 | 1.0 24 | 25 | 26 | 1.0 27 | 28 | 29 | 2.0 30 | 31 | 32 | 33 | 34 | 35 | 1.1 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /src/prefuse/data/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Table, Graph, and Tree data structures for organizing data. 3 | {@link prefuse.data.Table} 4 | instances store any number of type data in a row and column format. Each column 5 | of data is separately represented in a {@link prefuse.data.column.Column} 6 | instance. Row data can be accessed directly by the row index, or can be 7 | accessed in an object-oriented manner using the {@link prefuse.data.Tuple} 8 | interface. The {@link prefuse.data.CascadedTable} class provides filtered views over 9 | backing Table instances. Table {@link prefuse.data.Schema Schemas} are used to represent 10 | the names, data type, and default values of table columns, and can be used 11 | to instantiate tables of the desired type.

12 | 13 |

{@link prefuse.data.Graph} and {@link prefuse.data.Tree} instances also use a tabular representation, 14 | using separate data tables to store node and edge data. At the cost of a little 15 | complexity, this allows for a very flexible system. For example, the same data 16 | table can be used as the node table for multiple graphs, supporting efficient 17 | memory use and allowing easy propagation of data changes. Similar to tables, 18 | graphs and trees can be accessed using the row indices of the respective 19 | tables, or through object-oriented Tuple proxies. The 20 | {@link prefuse.data.Node} and {@link prefuse.data.Edge} interfaces 21 | provide a more typical object-oriented API to the graph structure and data. 22 |

23 | -------------------------------------------------------------------------------- /src/prefuse/visual/tuple/TableDecoratorItem.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual.tuple; 2 | 3 | import prefuse.data.Graph; 4 | import prefuse.data.Table; 5 | import prefuse.visual.DecoratorItem; 6 | import prefuse.visual.VisualItem; 7 | import prefuse.visual.VisualTable; 8 | 9 | /** 10 | * DecoratorItem implementation that uses data values from a backing 11 | * VisualTable. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class TableDecoratorItem extends TableVisualItem 16 | implements DecoratorItem 17 | { 18 | /** 19 | * Initialize a new TableDecoratorItem for the given table and row. This 20 | * method is used by the appropriate TupleManager instance, and should 21 | * not be called directly by client code, unless by a client-supplied 22 | * custom TupleManager. 23 | * @param table the data Table 24 | * @param graph ignored by this class 25 | * @param row the table row index 26 | */ 27 | protected void init(Table table, Graph graph, int row) { 28 | m_table = table; 29 | m_row = m_table.isValidRow(row) ? row : -1; 30 | } 31 | 32 | /** 33 | * @see prefuse.visual.DecoratorItem#getDecoratedItem() 34 | */ 35 | public VisualItem getDecoratedItem() { 36 | VisualTable vt = (VisualTable)getTable(); 37 | int prow = vt.getParentRow(getRow()); 38 | return (VisualItem)vt.getParentTable().getTuple(prow); 39 | } 40 | 41 | } // end of class TableDecoratorItem 42 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/IncompatibleComparatorException.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | /** 4 | * Exception indicating a comparator is incompatible with the data type 5 | * to be compared. 6 | * 7 | * @author jeffrey heer 8 | */ 9 | public class IncompatibleComparatorException extends Exception { 10 | 11 | /** 12 | * Create a new IncompatibleComparatorException. 13 | */ 14 | public IncompatibleComparatorException() { 15 | super(); 16 | } 17 | 18 | /** 19 | * Create a new IncompatibleComparatorException. 20 | * @param message a descriptive error message 21 | */ 22 | public IncompatibleComparatorException(String message) { 23 | super(message); 24 | } 25 | 26 | /** 27 | * Create a new IncompatibleComparatorException. 28 | * @param cause a Throwable (e.g., error or exception) that was the cause 29 | * for this exception being thrown 30 | */ 31 | public IncompatibleComparatorException(Throwable cause) { 32 | super(cause); 33 | } 34 | 35 | /** 36 | * Create a new IncompatibleComparatorException. 37 | * @param message a descriptive error message 38 | * @param cause a Throwable (e.g., error or exception) that was the cause 39 | * for this exception being thrown 40 | */ 41 | public IncompatibleComparatorException(String message, Throwable cause) { 42 | super(message, cause); 43 | } 44 | 45 | } // end of class IncompatibleComparatorException 46 | -------------------------------------------------------------------------------- /src/prefuse/util/force/EulerIntegrator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.force; 2 | 3 | import java.util.Iterator; 4 | 5 | /** 6 | * Updates velocity and position data using Euler's Method. This is the 7 | * simplest and fastest method, but is somewhat inaccurate and less smooth 8 | * than more costly approaches. 9 | * 10 | * @author jeffrey heer 11 | * @see RungeKuttaIntegrator 12 | */ 13 | public class EulerIntegrator implements Integrator { 14 | 15 | /** 16 | * @see prefuse.util.force.Integrator#integrate(prefuse.util.force.ForceSimulator, long) 17 | */ 18 | public void integrate(ForceSimulator sim, long timestep) { 19 | float speedLimit = sim.getSpeedLimit(); 20 | Iterator iter = sim.getItems(); 21 | while ( iter.hasNext() ) { 22 | ForceItem item = (ForceItem)iter.next(); 23 | item.location[0] += timestep * item.velocity[0]; 24 | item.location[1] += timestep * item.velocity[1]; 25 | float coeff = timestep / item.mass; 26 | item.velocity[0] += coeff * item.force[0]; 27 | item.velocity[1] += coeff * item.force[1]; 28 | float vx = item.velocity[0]; 29 | float vy = item.velocity[1]; 30 | float v = (float)Math.sqrt(vx*vx+vy*vy); 31 | if ( v > speedLimit ) { 32 | item.velocity[0] = speedLimit * vx / v; 33 | item.velocity[1] = speedLimit * vy / v; 34 | } 35 | } 36 | } 37 | 38 | } // end of class EulerIntegrator 39 | -------------------------------------------------------------------------------- /src/prefuse/data/DataTypeException.java: -------------------------------------------------------------------------------- 1 | package prefuse.data; 2 | 3 | /** 4 | * Exception indicating an incompatible data type assignment. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public class DataTypeException extends RuntimeException { 9 | 10 | /** 11 | * Create a new DataTypeException. 12 | */ 13 | public DataTypeException() { 14 | super(); 15 | } 16 | 17 | /** 18 | * Create a new DataTypeException. 19 | * @param message a descriptive error message 20 | * @param cause a Throwable (e.g., error or exception) that was the cause 21 | * for this exception being thrown 22 | */ 23 | public DataTypeException(String message, Throwable cause) { 24 | super(message, cause); 25 | } 26 | 27 | /** 28 | * Create a new DataTypeException. 29 | * @param message a descriptive error message 30 | */ 31 | public DataTypeException(String message) { 32 | super(message); 33 | } 34 | 35 | /** 36 | * Create a new DataTypeException. 37 | * @param cause a Throwable (e.g., error or exception) that was the cause 38 | * for this exception being thrown 39 | */ 40 | public DataTypeException(Throwable cause) { 41 | super(cause); 42 | } 43 | 44 | /** 45 | * Create a new DataTypeException. 46 | * @param type the incompatible data type 47 | */ 48 | public DataTypeException(Class type) { 49 | super("Type "+type.getName()+" not supported."); 50 | } 51 | 52 | } // end of class DataTypeException 53 | -------------------------------------------------------------------------------- /src/prefuse/data/tuple/package.html: -------------------------------------------------------------------------------- 1 | 2 |

Implementing classes for data tuples, object proxies to a row of table 3 | data. Prefuse data tables can be accessed and manipulated directly, indexed 4 | by row numbers, but that is not always the most convenient. The 5 | {@link prefuse.data.Tuple} 6 | interface provides an object-relational mapping, providing an object-oriented 7 | interface to a row of table data. Furthermore, tuples provide enhanced 8 | safety, as a deleted row will result in an invalidated tuple, while a 9 | row index provides no such guarantees.

10 | 11 |

Groups of tuples can be collected and monitored using the 12 | {@link prefuse.data.tuple.TupleSet} 13 | interface, which {@link prefuse.data.Table}, {@link prefuse.data.Graph}, and 14 | {@link prefuse.data.Tree} all implement. Other TupleSet instances can 15 | be used to collect Tuples from any number of backing tables 16 | ({@link prefuse.data.tuple.DefaultTupleSet}) or aggregate multiple 17 | TupleSets ({@link prefuse.data.tuple.CompositeTupleSet}).

18 | 19 |

Graph nodes and edges are also represented as Tuples, with additional 20 | methods for accessing the underlying graph structure. Any methods that 21 | reference a tree structure will first request a spanning tree from the 22 | backing graph.

23 | 24 |

Tuples are created and stored by 25 | {@link prefuse.data.tuple.TupleManager} instances. To 26 | customize tuple creation, one needs to register the appropriate 27 | concrete Tuple type with an enclosing data table. This is done 28 | using the {@link prefuse.data.Table#Table(int,int,Class)} 29 | constructor.

30 | -------------------------------------------------------------------------------- /src/prefuse/data/util/ValidEdgePredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import prefuse.data.Graph; 4 | import prefuse.data.Node; 5 | import prefuse.data.Tuple; 6 | import prefuse.data.expression.AbstractPredicate; 7 | 8 | /** 9 | * Filtering predicate over a potential edge table that indicates which 10 | * edges are valid edges according to a backing node table. Useful for 11 | * creating a pool of edges for which not all node have been created, and 12 | * then filtering out the valid edges using the node pool. 13 | * 14 | * @author jeffrey heer 15 | */ 16 | public class ValidEdgePredicate extends AbstractPredicate { 17 | 18 | private Graph m_g; 19 | 20 | /** 21 | * Creates a new ValidEdgePredicate. 22 | * @param g the backing graph, the node table of this graph will be used 23 | * to check for valid edges. 24 | */ 25 | public ValidEdgePredicate(Graph g) { 26 | m_g = g; 27 | } 28 | 29 | /** 30 | * Indicates if the given tuple can be used as a valid edge for 31 | * the nodes of the backing graph. 32 | * @param tpl a data tuple from a potential edge table 33 | * @return true if the tuple contents allow it to serve as a valid 34 | * edge of between nodes in the backing graph 35 | */ 36 | public boolean getBoolean(Tuple tpl) { 37 | Node s = m_g.getNodeFromKey(tpl.getInt(m_g.getEdgeSourceField())); 38 | Node t = m_g.getNodeFromKey(tpl.getInt(m_g.getEdgeTargetField())); 39 | return ( s != null && t != null ); 40 | } 41 | 42 | } // end of class ValidEdgePredicate 43 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/DataParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | 4 | /** 5 | * Interface for data parsers, which parse data values from text Strings 6 | * and generated formatted text Strings for data values. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public interface DataParser { 11 | 12 | /** 13 | * Get the data type for the values parsed by this parser. 14 | * @return the parsed data type for this parser as a Java Class instance 15 | */ 16 | public Class getType(); 17 | 18 | 19 | /** 20 | * Get a String representation for the given value. 21 | * @param value the object value to format 22 | * @return a formatted String representing the input value 23 | */ 24 | public String format(Object value); 25 | 26 | /** 27 | * Indicates if the given text string can be successfully parsed by 28 | * this parser. 29 | * @param text the text string to check for parsability 30 | * @return true if the string can be successfully parsed into this 31 | * parser's data type, false otherwise 32 | */ 33 | public boolean canParse(String text); 34 | 35 | /** 36 | * Parse the given text string to a data value. 37 | * @param text the text string to parse 38 | * @return the parsed data value, which will be an instance of the 39 | * Class returned by the {@link #getType()} method 40 | * @throws DataParseException if an error occurs during parsing 41 | */ 42 | public Object parse(String text) throws DataParseException; 43 | 44 | } // end of interface DataParser 45 | -------------------------------------------------------------------------------- /src/prefuse/data/util/CascadedRowManager.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import prefuse.data.CascadedTable; 4 | import prefuse.data.Table; 5 | 6 | /** 7 | * RowManager instance that additionally takes into account tables which 8 | * inherit from a parent table but can also have their own, dedicated 9 | * columns. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public class CascadedRowManager extends FilteredRowManager { 14 | 15 | /** 16 | * Create a new CascadedRowManager. 17 | * @param table the table to manage 18 | */ 19 | public CascadedRowManager(Table table) { 20 | super(table); 21 | } 22 | 23 | /** 24 | * @see prefuse.data.util.RowManager#getColumnRow(int, int) 25 | */ 26 | public int getColumnRow(int row, int col) { 27 | if ( !isValidRow(row) ) 28 | return -1; 29 | else if ( col >= ((CascadedTable)getTable()).getLocalColumnCount() ) 30 | return ((CascadedTable)m_table).getParentTable() 31 | .getColumnRow(getParentRow(row), col); 32 | else 33 | return row; 34 | } 35 | 36 | /** 37 | * @see prefuse.data.util.RowManager#getTableRow(int, int) 38 | */ 39 | public int getTableRow(int columnRow, int col) { 40 | int row; 41 | if ( col < ((CascadedTable)getTable()).getLocalColumnCount() ) { 42 | row = columnRow; 43 | } else { 44 | row = getChildRow(columnRow); 45 | } 46 | return isValidRow(row) ? row : -1; 47 | } 48 | 49 | } // end of class CascadedRowManager 50 | -------------------------------------------------------------------------------- /license-prefuse.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2004-2011 Regents of the University of California. 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions 7 | are met: 8 | 9 | 1. Redistributions of source code must retain the above copyright 10 | notice, this list of conditions and the following disclaimer. 11 | 12 | 2. Redistributions in binary form must reproduce the above copyright 13 | notice, this list of conditions and the following disclaimer in the 14 | documentation and/or other materials provided with the distribution. 15 | 16 | 3. Neither the name of the University nor the names of its contributors 17 | may be used to endorse or promote products derived from this software 18 | without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /src/prefuse/data/io/sql/SQLDataHandler.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io.sql; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | import prefuse.data.Table; 7 | 8 | /** 9 | * Interface for taking a value in a SQL ResultSet and translating it into 10 | * a Java data value for use in a prefuse Table. 11 | * 12 | * @author jeffrey heer 13 | */ 14 | public interface SQLDataHandler { 15 | 16 | /** 17 | * Process a data value from a ResultSet, translating it into a 18 | * Java data value and storing it in a Table. 19 | * @param t the Table in which to store the result value 20 | * @param trow the Table row to add to 21 | * @param rset the ResultSet to read the SQL value from, assumed 22 | * to be set to the desired row 23 | * @param rcol the column index of the data value in the row set. 24 | * This is also used to look up the column name, which is used 25 | * to access the correct data field of the Table. 26 | * @throws SQLException if an error occurs accessing the ResultSet 27 | */ 28 | public void process(Table t, int trow, ResultSet rset, int rcol) 29 | throws SQLException; 30 | 31 | /** 32 | * Return the Java data type for the given data field name and 33 | * its sql data type. 34 | * @param columnName the name of data field / column 35 | * @param sqlType the field's sql data type, one of the constants 36 | * in the {@link java.sql.Types} class. 37 | * @return the Java Class data type 38 | */ 39 | public Class getDataType(String columnName, int sqlType); 40 | 41 | } // end of interface SQLDataValueHandler 42 | -------------------------------------------------------------------------------- /src/prefuse/data/Edge.java: -------------------------------------------------------------------------------- 1 | package prefuse.data; 2 | 3 | 4 | /** 5 | * Tuple sub-interface that represents an edge in a graph structure. Each edge 6 | * has both a source node and a target node. For directed edges, this 7 | * distinction indicates the directionality of the edge. For undirected edges 8 | * this distinction merely reflects the underlying storage of the nodes. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public interface Edge extends Tuple { 13 | 14 | /** 15 | * Returns the graph of which this Edge is a member. 16 | * @return the Graph containing this Edge 17 | */ 18 | public Graph getGraph(); 19 | 20 | /** 21 | * Indicates if this edge is directed or undirected. 22 | * @return true if directed, false if undirected. 23 | */ 24 | public boolean isDirected(); 25 | 26 | /** 27 | * Returns the first, or source, node upon which this Edge 28 | * is incident. 29 | * @return the source Node 30 | */ 31 | public Node getSourceNode(); 32 | 33 | /** 34 | * Returns the second, or target, node upon which this Edge 35 | * is incident. 36 | * @return the source Node 37 | */ 38 | public Node getTargetNode(); 39 | 40 | /** 41 | * Given a Node upon which this Edge is incident, the opposite incident 42 | * Node is returned. Throws an exception if the input node is not incident 43 | * on this Edge. 44 | * @param n a Node upon which this Edge is incident 45 | * @return the other Node touched by this Edge 46 | */ 47 | public Node getAdjacentNode(Node n); 48 | 49 | } // end of interface Edge 50 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/BooleanLiteral.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import prefuse.data.Schema; 4 | import prefuse.data.Tuple; 5 | 6 | /** 7 | * Literal expression of a boolean value. 8 | * @author jeffrey heer 9 | */ 10 | public class BooleanLiteral extends Literal implements Predicate 11 | { 12 | /** The true boolean literal. */ 13 | public static final BooleanLiteral TRUE = new BooleanLiteral(true); 14 | /** The false boolean literal. */ 15 | public static final BooleanLiteral FALSE = new BooleanLiteral(false); 16 | 17 | private final boolean m_value; 18 | 19 | /** 20 | * Create a new BooleanLiteral. 21 | * @param b the boolean value 22 | */ 23 | public BooleanLiteral(boolean b) { 24 | m_value = b; 25 | } 26 | 27 | /** 28 | * @see prefuse.data.expression.Expression#getBoolean(prefuse.data.Tuple) 29 | */ 30 | public boolean getBoolean(Tuple tuple) { 31 | return m_value; 32 | } 33 | 34 | /** 35 | * @see prefuse.data.expression.Expression#getType(prefuse.data.Schema) 36 | */ 37 | public Class getType(Schema s) { 38 | return boolean.class; 39 | } 40 | 41 | /** 42 | * @see prefuse.data.expression.Expression#get(prefuse.data.Tuple) 43 | */ 44 | public Object get(Tuple t) { 45 | return ( getBoolean(t) ? Boolean.TRUE : Boolean.FALSE ); 46 | } 47 | 48 | /** 49 | * @see java.lang.Object#toString() 50 | */ 51 | public String toString() { 52 | return String.valueOf(m_value).toUpperCase(); 53 | } 54 | 55 | } // end of class BooleanLiteral 56 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/CompositeIntIterator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.NoSuchElementException; 4 | 5 | /** 6 | * IntIterator implementation that combines the results of multiple 7 | * int iterators. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class CompositeIntIterator extends IntIterator { 12 | 13 | private IntIterator[] m_iters; 14 | private int m_cur; 15 | 16 | public CompositeIntIterator(IntIterator iter1, IntIterator iter2) { 17 | this(new IntIterator[] { iter1, iter2 }); 18 | } 19 | 20 | public CompositeIntIterator(IntIterator[] iters) { 21 | m_iters = iters; 22 | m_cur = 0; 23 | } 24 | 25 | /** 26 | * @see prefuse.util.collections.IntIterator#nextInt() 27 | */ 28 | public int nextInt() { 29 | if ( hasNext() ) { 30 | return m_iters[m_cur].nextInt(); 31 | } else { 32 | throw new NoSuchElementException(); 33 | } 34 | } 35 | 36 | /** 37 | * @see java.util.Iterator#hasNext() 38 | */ 39 | public boolean hasNext() { 40 | if ( m_iters == null ) 41 | return false; 42 | 43 | while ( true ) { 44 | if ( m_iters[m_cur].hasNext() ) { 45 | return true; 46 | } else if ( ++m_cur >= m_iters.length ) { 47 | m_iters = null; 48 | return false; 49 | } 50 | } 51 | } 52 | 53 | public void remove() { 54 | throw new UnsupportedOperationException(); 55 | } 56 | 57 | } // end of class CompositeIntIterator 58 | -------------------------------------------------------------------------------- /src/prefuse/action/layout/RandomLayout.java: -------------------------------------------------------------------------------- 1 | package prefuse.action.layout; 2 | 3 | import java.awt.geom.Rectangle2D; 4 | import java.util.Iterator; 5 | import java.util.Random; 6 | 7 | import prefuse.visual.VisualItem; 8 | 9 | 10 | /** 11 | * Performs a random layout of items within the layout bounds. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class RandomLayout extends Layout { 16 | 17 | private Random r = new Random(12345678L); 18 | 19 | /** 20 | * Create a new RandomLayout that processes all items. 21 | */ 22 | public RandomLayout() { 23 | super(); 24 | } 25 | 26 | /** 27 | * Create a new RandomLayout. 28 | * @param group the data group to layout 29 | */ 30 | public RandomLayout(String group) { 31 | super(group); 32 | } 33 | 34 | /** 35 | * Set the seed value for the random number generator. 36 | * @param seed the random seed value 37 | */ 38 | public void setRandomSeed(long seed) { 39 | r.setSeed(seed); 40 | } 41 | 42 | /** 43 | * @see prefuse.action.Action#run(double) 44 | */ 45 | public void run(double frac) { 46 | Rectangle2D b = getLayoutBounds(); 47 | double x, y; 48 | double w = b.getWidth(); 49 | double h = b.getHeight(); 50 | Iterator iter = getVisualization().visibleItems(m_group); 51 | while ( iter.hasNext() ) { 52 | VisualItem item = (VisualItem)iter.next(); 53 | x = (int)(b.getX() + r.nextDouble()*w); 54 | y = (int)(b.getY() + r.nextDouble()*h); 55 | setX(item,null,x); 56 | setY(item,null,y); 57 | } 58 | } 59 | 60 | } // end of class RandomLayout 61 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/OrPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import java.util.Iterator; 4 | 5 | import prefuse.data.Tuple; 6 | 7 | /** 8 | * Predicate representing an "or" clause of sub-predicates. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public class OrPredicate extends CompositePredicate { 13 | 14 | /** 15 | * Create an empty OrPredicate. Empty OrPredicates return false 16 | * by default. 17 | */ 18 | public OrPredicate() { 19 | } 20 | 21 | /** 22 | * Create a new OrPredicate. 23 | * @param p1 the sole clause of this predicate 24 | */ 25 | public OrPredicate(Predicate p1) { 26 | add(p1); 27 | } 28 | 29 | /** 30 | * Create a new OrPredicate. 31 | * @param p1 the first clause of this predicate 32 | * @param p2 the second clause of this predicate 33 | */ 34 | public OrPredicate(Predicate p1, Predicate p2) { 35 | super(p1, p2); 36 | } 37 | 38 | /** 39 | * @see prefuse.data.expression.Expression#getBoolean(prefuse.data.Tuple) 40 | */ 41 | public boolean getBoolean(Tuple t) { 42 | if ( m_clauses.size() == 0 ) 43 | return false; 44 | 45 | Iterator iter = m_clauses.iterator(); 46 | while ( iter.hasNext() ) { 47 | Predicate p = (Predicate)iter.next(); 48 | if ( p.getBoolean(t) ) { 49 | return true; 50 | } 51 | } 52 | return false; 53 | } 54 | 55 | /** 56 | * @see java.lang.Object#toString() 57 | */ 58 | public String toString() { 59 | return ( size() == 0 ? "FALSE" : toString("OR") ); 60 | } 61 | 62 | } // end of class OrPredicate 63 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/AndPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import java.util.Iterator; 4 | 5 | import prefuse.data.Tuple; 6 | 7 | /** 8 | * Predicate representing an "and" clause of sub-predicates. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public class AndPredicate extends CompositePredicate { 13 | 14 | /** 15 | * Create an empty AndPredicate. Empty AndPredicates return false 16 | * by default. 17 | */ 18 | public AndPredicate() { 19 | } 20 | 21 | /** 22 | * Create a new AndPredicate. 23 | * @param p1 the sole clause of this predicate 24 | */ 25 | public AndPredicate(Predicate p1) { 26 | add(p1); 27 | } 28 | 29 | /** 30 | * Create a new AndPredicate. 31 | * @param p1 the first clause of this predicate 32 | * @param p2 the second clause of this predicate 33 | */ 34 | public AndPredicate(Predicate p1, Predicate p2) { 35 | super(p1, p2); 36 | } 37 | 38 | /** 39 | * @see prefuse.data.expression.Expression#getBoolean(prefuse.data.Tuple) 40 | */ 41 | public boolean getBoolean(Tuple t) { 42 | if ( m_clauses.size() == 0 ) 43 | return false; 44 | 45 | Iterator iter = m_clauses.iterator(); 46 | while ( iter.hasNext() ) { 47 | Predicate p = (Predicate)iter.next(); 48 | if ( !p.getBoolean(t) ) { 49 | return false; 50 | } 51 | } 52 | return true; 53 | } 54 | 55 | /** 56 | * @see java.lang.Object#toString() 57 | */ 58 | public String toString() { 59 | return ( size() == 0 ? "FALSE" : toString("AND") ); 60 | } 61 | 62 | } // end of class AndPredicate 63 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/StringParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | /** 4 | * DataParser instance that "parses" a String value from a text string, this 5 | * is the default fallback parser, which simply returns the string value 6 | * to be parsed. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public class StringParser implements DataParser { 11 | 12 | /** 13 | * Returns String.class. 14 | * @see prefuse.data.parser.DataParser#getType() 15 | */ 16 | public Class getType() { 17 | return String.class; 18 | } 19 | 20 | /** 21 | * @see prefuse.data.parser.DataParser#format(java.lang.Object) 22 | */ 23 | public String format(Object value) { 24 | if ( value == null ) return null; 25 | if ( !(value instanceof String) ) 26 | throw new IllegalArgumentException( 27 | "This class can only format Objects of type String."); 28 | return (String)value; 29 | } 30 | 31 | /** 32 | * @see prefuse.data.parser.DataParser#canParse(java.lang.String) 33 | */ 34 | public boolean canParse(String text) { 35 | return true; 36 | } 37 | 38 | /** 39 | * @see prefuse.data.parser.DataParser#parse(java.lang.String) 40 | */ 41 | public Object parse(String text) throws DataParseException { 42 | return text; 43 | } 44 | 45 | /** 46 | * Simply returns the input string. 47 | * @param text the text string to "parse" 48 | * @return the input text string 49 | * @throws DataParseException never actually throws an exception 50 | */ 51 | public String parseString(String text) throws DataParseException { 52 | return text; 53 | } 54 | 55 | } // end of class StringParser 56 | -------------------------------------------------------------------------------- /src/prefuse/data/util/AbstractColumnProjection.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import prefuse.data.event.ProjectionListener; 4 | import prefuse.util.collections.CopyOnWriteArrayList; 5 | 6 | /** 7 | * Abstract base class for column projection instances. Implements the 8 | * listener functionality. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public abstract class AbstractColumnProjection implements ColumnProjection { 13 | 14 | // ------------------------------------------------------------------------ 15 | // Listener Methods 16 | 17 | private CopyOnWriteArrayList m_listeners; 18 | 19 | /** 20 | * @see prefuse.data.util.ColumnProjection#addProjectionListener(prefuse.data.event.ProjectionListener) 21 | */ 22 | public void addProjectionListener(ProjectionListener lstnr) { 23 | if ( m_listeners == null ) 24 | m_listeners = new CopyOnWriteArrayList(); 25 | if ( !m_listeners.contains(lstnr) ) 26 | m_listeners.add(lstnr); 27 | } 28 | 29 | /** 30 | * @see prefuse.data.util.ColumnProjection#removeProjectionListener(prefuse.data.event.ProjectionListener) 31 | */ 32 | public void removeProjectionListener(ProjectionListener lstnr) { 33 | if ( m_listeners != null ) 34 | m_listeners.remove(lstnr); 35 | if ( m_listeners.size() == 0 ) 36 | m_listeners = null; 37 | } 38 | 39 | public void fireUpdate() { 40 | if ( m_listeners == null ) 41 | return; 42 | Object[] lstnrs = m_listeners.getArray(); 43 | for ( int i=0; ijeffrey heer 15 | */ 16 | public class QueryExpression extends GroupExpression { 17 | 18 | /** 19 | * Create a new QueryExpression. 20 | */ 21 | public QueryExpression() { 22 | super(); 23 | } 24 | 25 | /** 26 | * Create a new QueryExpression. 27 | * @param group @param group the data group name to use as a parameter 28 | */ 29 | public QueryExpression(String group) { 30 | super(group); 31 | } 32 | 33 | /** 34 | * @see prefuse.data.expression.Function#getName() 35 | */ 36 | public String getName() { 37 | return "QUERY"; 38 | } 39 | 40 | /** 41 | * @see prefuse.data.expression.Expression#getType(prefuse.data.Schema) 42 | */ 43 | public Class getType(Schema s) { 44 | return String.class; 45 | } 46 | 47 | /** 48 | * @see prefuse.data.expression.Expression#get(prefuse.data.Tuple) 49 | */ 50 | public Object get(Tuple t) { 51 | VisualItem item = (VisualItem)t; 52 | Visualization vis = item.getVisualization(); 53 | String group = getGroup(t); 54 | SearchTupleSet sts = (SearchTupleSet)vis.getGroup(group); 55 | return sts.getQuery(); 56 | } 57 | 58 | } // end of class QueryExpression 59 | -------------------------------------------------------------------------------- /src/prefuse/util/force/DragForce.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.force; 2 | 3 | /** 4 | * Implements a viscosity/drag force to help stabilize items. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public class DragForce extends AbstractForce { 9 | 10 | private static String[] pnames = new String[] { "DragCoefficient" }; 11 | 12 | public static final float DEFAULT_DRAG_COEFF = 0.01f; 13 | public static final float DEFAULT_MIN_DRAG_COEFF = 0.0f; 14 | public static final float DEFAULT_MAX_DRAG_COEFF = 0.1f; 15 | public static final int DRAG_COEFF = 0; 16 | 17 | /** 18 | * Create a new DragForce. 19 | * @param dragCoeff the drag co-efficient 20 | */ 21 | public DragForce(float dragCoeff) { 22 | params = new float[] { dragCoeff }; 23 | minValues = new float[] { DEFAULT_MIN_DRAG_COEFF }; 24 | maxValues = new float[] { DEFAULT_MAX_DRAG_COEFF }; 25 | } 26 | 27 | /** 28 | * Create a new DragForce with default drag co-efficient. 29 | */ 30 | public DragForce() { 31 | this(DEFAULT_DRAG_COEFF); 32 | } 33 | 34 | /** 35 | * Returns true. 36 | * @see prefuse.util.force.Force#isItemForce() 37 | */ 38 | public boolean isItemForce() { 39 | return true; 40 | } 41 | 42 | /** 43 | * @see prefuse.util.force.AbstractForce#getParameterNames() 44 | */ 45 | protected String[] getParameterNames() { 46 | return pnames; 47 | } 48 | 49 | /** 50 | * @see prefuse.util.force.Force#getForce(prefuse.util.force.ForceItem) 51 | */ 52 | public void getForce(ForceItem item) { 53 | item.force[0] -= params[DRAG_COEFF]*item.velocity[0]; 54 | item.force[1] -= params[DRAG_COEFF]*item.velocity[1]; 55 | } 56 | 57 | } // end of class DragForce 58 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/XorPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import java.util.Iterator; 4 | 5 | import prefuse.data.Tuple; 6 | 7 | /** 8 | * Predicate representing an "xor" clause of sub-predicates. 9 | * 10 | * @author jeffrey heer 11 | */ 12 | public class XorPredicate extends CompositePredicate { 13 | 14 | /** 15 | * Create an empty XorPredicate. Empty XorPredicates return false 16 | * by default. 17 | */ 18 | public XorPredicate() { 19 | } 20 | 21 | /** 22 | * Create a new XorPredicate. 23 | * @param p1 the sole clause of this predicate 24 | */ 25 | public XorPredicate(Predicate p1) { 26 | add(p1); 27 | } 28 | 29 | /** 30 | * Create a new XorPredicate. 31 | * @param p1 the first clause of this predicate 32 | * @param p2 the second clause of this predicate 33 | */ 34 | public XorPredicate(Predicate p1, Predicate p2) { 35 | super(p1, p2); 36 | } 37 | 38 | /** 39 | * @see prefuse.data.expression.Expression#getBoolean(prefuse.data.Tuple) 40 | */ 41 | public boolean getBoolean(Tuple t) { 42 | if ( m_clauses.size() == 0 ) 43 | return false; 44 | 45 | boolean val = false; 46 | Iterator iter = m_clauses.iterator(); 47 | if ( iter.hasNext() ) { 48 | val = ((Predicate)iter.next()).getBoolean(t); 49 | } 50 | while ( iter.hasNext() ) { 51 | val ^= ((Predicate)iter.next()).getBoolean(t); 52 | } 53 | return val; 54 | } 55 | 56 | /** 57 | * @see java.lang.Object#toString() 58 | */ 59 | public String toString() { 60 | return ( size() == 0 ? "FALSE" : toString("XOR") ); 61 | } 62 | 63 | } // end of class XorPredicate 64 | -------------------------------------------------------------------------------- /src/prefuse/visual/expression/HoverPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual.expression; 2 | 3 | import prefuse.data.expression.ColumnExpression; 4 | import prefuse.data.expression.Expression; 5 | import prefuse.data.expression.Function; 6 | import prefuse.data.expression.NotPredicate; 7 | import prefuse.data.expression.Predicate; 8 | import prefuse.visual.VisualItem; 9 | 10 | /** 11 | * Expression that indicates if an item is currently under the mouse 12 | * pointer. 13 | * 14 | * @author jeffrey heer 15 | */ 16 | public class HoverPredicate extends ColumnExpression 17 | implements Predicate, Function 18 | { 19 | /** Convenience instance for the hover == true case. */ 20 | public static final Predicate TRUE = new HoverPredicate(); 21 | /** Convenience instance for the hover == false case. */ 22 | public static final Predicate FALSE = new NotPredicate(TRUE); 23 | 24 | /** 25 | * Create a new HoverPredicate. 26 | */ 27 | public HoverPredicate() { 28 | super(VisualItem.HOVER); 29 | } 30 | 31 | /** 32 | * @see prefuse.data.expression.Function#getName() 33 | */ 34 | public String getName() { 35 | return "HOVER"; 36 | } 37 | 38 | /** 39 | * @see prefuse.data.expression.Function#addParameter(prefuse.data.expression.Expression) 40 | */ 41 | public void addParameter(Expression e) { 42 | throw new IllegalStateException("This function takes 0 parameters"); 43 | } 44 | 45 | /** 46 | * @see prefuse.data.expression.Function#getParameterCount() 47 | */ 48 | public int getParameterCount() { 49 | return 0; 50 | } 51 | 52 | /** 53 | * @see java.lang.Object#toString() 54 | */ 55 | public String toString() { 56 | return getName()+"()"; 57 | } 58 | 59 | } // end of class HoverPredicate 60 | -------------------------------------------------------------------------------- /src/prefuse/visual/expression/VisiblePredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual.expression; 2 | 3 | import prefuse.data.expression.ColumnExpression; 4 | import prefuse.data.expression.Expression; 5 | import prefuse.data.expression.Function; 6 | import prefuse.data.expression.NotPredicate; 7 | import prefuse.data.expression.Predicate; 8 | import prefuse.visual.VisualItem; 9 | 10 | /** 11 | * Expression that indicates if an item's visible flag is set. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class VisiblePredicate extends ColumnExpression 16 | implements Predicate, Function 17 | { 18 | 19 | /** Convenience instance for the visible == true case. */ 20 | public static final Predicate TRUE = new VisiblePredicate(); 21 | /** Convenience instance for the visible == false case. */ 22 | public static final Predicate FALSE = new NotPredicate(TRUE); 23 | 24 | /** 25 | * Create a new VisiblePredicate. 26 | */ 27 | public VisiblePredicate() { 28 | super(VisualItem.VISIBLE); 29 | } 30 | 31 | /** 32 | * @see prefuse.data.expression.Function#getName() 33 | */ 34 | public String getName() { 35 | return "VISIBLE"; 36 | } 37 | 38 | /** 39 | * @see prefuse.data.expression.Function#addParameter(prefuse.data.expression.Expression) 40 | */ 41 | public void addParameter(Expression e) { 42 | throw new IllegalStateException("This function takes 0 parameters"); 43 | } 44 | 45 | /** 46 | * @see prefuse.data.expression.Function#getParameterCount() 47 | */ 48 | public int getParameterCount() { 49 | return 0; 50 | } 51 | 52 | /** 53 | * @see java.lang.Object#toString() 54 | */ 55 | public String toString() { 56 | return getName()+"()"; 57 | } 58 | 59 | } // end of class VisiblePredicate 60 | -------------------------------------------------------------------------------- /src/prefuse/data/io/TableReader.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import java.io.File; 4 | import java.io.InputStream; 5 | import java.net.URL; 6 | 7 | import prefuse.data.Table; 8 | 9 | /** 10 | * Interface for classes that read in Table data from a particular file format. 11 | * 12 | * @author jeffrey heer 13 | */ 14 | public interface TableReader { 15 | 16 | /** 17 | * Read in a table from the file at the given location. Though 18 | * not required by this interface, the String is typically resolved 19 | * using the {@link prefuse.util.io.IOLib#streamFromString(String)} method, 20 | * allowing URLs, classpath references, and files on the file system 21 | * to be accessed. 22 | * @param location the location to read the table from 23 | * @return the loaded Table 24 | * @throws DataIOException 25 | * @see prefuse.util.io.IOLib#streamFromString(String) 26 | */ 27 | public Table readTable(String location) throws DataIOException; 28 | 29 | /** 30 | * Read in a table from the given URL. 31 | * @param url the url to read the graph from 32 | * @return the loaded Table 33 | * @throws DataIOException 34 | */ 35 | public Table readTable(URL url) throws DataIOException; 36 | 37 | /** 38 | * Read in a table from the given File. 39 | * @param f the file to read the table from 40 | * @return the loaded Table 41 | * @throws DataIOException 42 | */ 43 | public Table readTable(File f) throws DataIOException; 44 | 45 | /** 46 | * Read in a table from the given InputStream. 47 | * @param is the InputStream to read the table from 48 | * @return the loaded Table 49 | * @throws DataIOException 50 | */ 51 | public Table readTable(InputStream is) throws DataIOException; 52 | 53 | } // end of interface TableReader 54 | -------------------------------------------------------------------------------- /src/prefuse/visual/expression/ValidatedPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual.expression; 2 | 3 | import prefuse.data.expression.ColumnExpression; 4 | import prefuse.data.expression.Expression; 5 | import prefuse.data.expression.Function; 6 | import prefuse.data.expression.NotPredicate; 7 | import prefuse.data.expression.Predicate; 8 | import prefuse.visual.VisualItem; 9 | 10 | /** 11 | * Expression that indicates if an item's validated flag is set. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class ValidatedPredicate extends ColumnExpression 16 | implements Predicate, Function 17 | { 18 | /** Convenience instance for the validated == true case. */ 19 | public static final Predicate TRUE = new ValidatedPredicate(); 20 | /** Convenience instance for the validated == false case. */ 21 | public static final Predicate FALSE = new NotPredicate(TRUE); 22 | 23 | /** 24 | * Create a new ValidatedPredicate. 25 | */ 26 | public ValidatedPredicate() { 27 | super(VisualItem.VALIDATED); 28 | } 29 | 30 | /** 31 | * @see prefuse.data.expression.Function#getName() 32 | */ 33 | public String getName() { 34 | return "VALIDATED"; 35 | } 36 | 37 | /** 38 | * @see prefuse.data.expression.Function#addParameter(prefuse.data.expression.Expression) 39 | */ 40 | public void addParameter(Expression e) { 41 | throw new IllegalStateException("This function takes 0 parameters"); 42 | } 43 | 44 | /** 45 | * @see prefuse.data.expression.Function#getParameterCount() 46 | */ 47 | public int getParameterCount() { 48 | return 0; 49 | } 50 | 51 | /** 52 | * @see java.lang.Object#toString() 53 | */ 54 | public String toString() { 55 | return getName()+"()"; 56 | } 57 | 58 | } // end of class ValidatedPredicate 59 | -------------------------------------------------------------------------------- /src/prefuse/render/Renderer.java: -------------------------------------------------------------------------------- 1 | package prefuse.render; 2 | 3 | import java.awt.Graphics2D; 4 | import java.awt.geom.Point2D; 5 | import java.awt.image.BufferedImage; 6 | 7 | import prefuse.visual.VisualItem; 8 | 9 | 10 | /** 11 | * Interface for rendering VisualItems, providing drawing as well as location 12 | * checking and bounding box routines. 13 | * 14 | * @author jeffrey heer 15 | * @author alan newberger 16 | */ 17 | public interface Renderer { 18 | 19 | /** 20 | * Provides a default graphics context for renderers to do useful 21 | * things like compute string widths when an external graphics context 22 | * has not yet been provided. 23 | */ 24 | public static final Graphics2D DEFAULT_GRAPHICS = (Graphics2D) 25 | new BufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB).getGraphics(); 26 | 27 | /** 28 | * Render item into a Graphics2D context. 29 | * @param g the Graphics2D context 30 | * @param item the visual item to draw 31 | */ 32 | public void render(Graphics2D g, VisualItem item); 33 | 34 | /** 35 | * Returns true if the Point is located inside the extents of the item. 36 | * This calculation matches against the exaxt item shape, and so is more 37 | * sensitive than just checking within a bounding box. 38 | * @param p the point to test for containment 39 | * @param item the item to test containment against 40 | * @return true if the point is contained within the the item, else false 41 | */ 42 | public boolean locatePoint(Point2D p, VisualItem item); 43 | 44 | /** 45 | * Calculates and sets the bounding rectangle for an item. This is called 46 | * by a VisualItem when it validates its bounds. 47 | * @param item the item to compute the bounding box for 48 | */ 49 | public void setBounds(VisualItem item); 50 | 51 | } // end of interface Renderer 52 | -------------------------------------------------------------------------------- /data/treeml-sample.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/NotPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.expression; 2 | 3 | import prefuse.data.Tuple; 4 | 5 | /** 6 | * Predicate representing the negation of another predicate. 7 | * 8 | * @author jeffrey heer 9 | */ 10 | public class NotPredicate extends AbstractPredicate { 11 | 12 | private Predicate m_predicate; 13 | 14 | /** 15 | * Create a new NotPredicate. 16 | * @param p the predicate to negate 17 | */ 18 | public NotPredicate(Predicate p) { 19 | m_predicate = p; 20 | } 21 | 22 | /** 23 | * Get the negated predicate. 24 | * @return the negated predicate 25 | */ 26 | public Predicate getPredicate() { 27 | return m_predicate; 28 | } 29 | 30 | /** 31 | * @see prefuse.data.expression.Expression#getBoolean(prefuse.data.Tuple) 32 | */ 33 | public boolean getBoolean(Tuple t) { 34 | return !m_predicate.getBoolean(t); 35 | } 36 | 37 | /** 38 | * @see prefuse.data.expression.Expression#visit(prefuse.data.expression.ExpressionVisitor) 39 | */ 40 | public void visit(ExpressionVisitor v) { 41 | v.visitExpression(this); 42 | v.down(); 43 | m_predicate.visit(v); 44 | v.up(); 45 | } 46 | 47 | /** 48 | * @see java.lang.Object#toString() 49 | */ 50 | public String toString() { 51 | return "NOT "+m_predicate.toString(); 52 | } 53 | 54 | /** 55 | * @see prefuse.data.expression.AbstractExpression#addChildListeners() 56 | */ 57 | protected void addChildListeners() { 58 | m_predicate.addExpressionListener(this); 59 | } 60 | 61 | /** 62 | * @see prefuse.data.expression.AbstractExpression#removeChildListeners() 63 | */ 64 | protected void removeChildListeners() { 65 | m_predicate.removeExpressionListener(this); 66 | } 67 | 68 | } // end of class NotPredicate -------------------------------------------------------------------------------- /src/prefuse/data/util/FilterIterator.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import java.util.Iterator; 4 | import java.util.NoSuchElementException; 5 | 6 | import prefuse.data.Tuple; 7 | import prefuse.data.expression.Predicate; 8 | 9 | /** 10 | * Iterator over tuples that filters the output by a given predicate. 11 | * 12 | * @author jeffrey heer 13 | */ 14 | public class FilterIterator implements Iterator { 15 | 16 | private Predicate predicate; 17 | private Iterator tuples; 18 | private Tuple next; 19 | 20 | /** 21 | * Create a new FilterIterator. 22 | * @param tuples an iterator over tuples 23 | * @param p the filter predicate to use 24 | */ 25 | public FilterIterator(Iterator tuples, Predicate p) { 26 | this.predicate = p; 27 | this.tuples = tuples; 28 | next = advance(); 29 | } 30 | 31 | private Tuple advance() { 32 | while ( tuples.hasNext() ) { 33 | Tuple t = (Tuple)tuples.next(); 34 | if ( predicate.getBoolean(t) ) { 35 | return t; 36 | } 37 | } 38 | tuples = null; 39 | next = null; 40 | return null; 41 | } 42 | 43 | /** 44 | * @see java.util.Iterator#next() 45 | */ 46 | public Object next() { 47 | if ( !hasNext() ) { 48 | throw new NoSuchElementException("No more elements"); 49 | } 50 | Tuple retval = next; 51 | next = advance(); 52 | return retval; 53 | } 54 | 55 | /** 56 | * @see java.util.Iterator#hasNext() 57 | */ 58 | public boolean hasNext() { 59 | return ( tuples != null ); 60 | } 61 | 62 | /** 63 | * Not supported. 64 | * @see java.util.Iterator#remove() 65 | */ 66 | public void remove() { 67 | throw new UnsupportedOperationException(); 68 | } 69 | 70 | } // end of class FilterIterator 71 | -------------------------------------------------------------------------------- /src/prefuse/data/io/GraphReader.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import java.io.File; 4 | import java.io.FileNotFoundException; 5 | import java.io.IOException; 6 | import java.io.InputStream; 7 | import java.net.URL; 8 | 9 | import prefuse.data.Graph; 10 | 11 | /** 12 | * interface for classes that read in Graph or Tree data from a particular 13 | * file format. 14 | * 15 | * @author jeffrey heer 16 | */ 17 | public interface GraphReader { 18 | 19 | /** 20 | * Read in a graph from the file at the given location. Though 21 | * not required by this interface, the String is typically resolved 22 | * using the {@link prefuse.util.io.IOLib#streamFromString(String)} method, 23 | * allowing URLs, classpath references, and files on the file system 24 | * to be accessed. 25 | * @param location the location to read the graph from 26 | * @return the loaded Graph 27 | * @throws FileNotFoundException 28 | * @throws IOException 29 | */ 30 | public Graph readGraph(String location) throws DataIOException; 31 | 32 | /** 33 | * Read in a graph from the given URL. 34 | * @param url the url to read the graph from 35 | * @return the loaded Graph 36 | * @throws IOException 37 | */ 38 | public Graph readGraph(URL url) throws DataIOException; 39 | 40 | /** 41 | * Read in a graph from the given File. 42 | * @param f the file to read the graph from 43 | * @return the loaded Graph 44 | * @throws FileNotFoundException 45 | * @throws IOException 46 | */ 47 | public Graph readGraph(File f) throws DataIOException; 48 | 49 | /** 50 | * Read in a graph from the given InputStream. 51 | * @param is the InputStream to read the graph from 52 | * @return the loaded Graph 53 | * @throws IOException 54 | */ 55 | public Graph readGraph(InputStream is) throws DataIOException; 56 | 57 | } // end of interface GraphReader 58 | -------------------------------------------------------------------------------- /src/prefuse/action/ActionSwitch.java: -------------------------------------------------------------------------------- 1 | package prefuse.action; 2 | 3 | /** 4 | * The ActionSwitch selects between a set of Actions, allowing only one 5 | * of a group of Actions to be executed at a time. 6 | * 7 | * @version 1.0 8 | * @author jeffrey heer 9 | */ 10 | public class ActionSwitch extends CompositeAction { 11 | 12 | private int m_switchVal; 13 | 14 | /** 15 | * Creates an empty action switch. 16 | */ 17 | public ActionSwitch() { 18 | m_switchVal = 0; 19 | } 20 | 21 | /** 22 | * Creates a new ActionSwitch with the given actions and switch value. 23 | * @param acts the Actions to include in this switch 24 | * @param switchVal the switch value indicating which Action to run 25 | */ 26 | public ActionSwitch(Action[] acts, int switchVal) { 27 | for ( int i=0; i 0 ) { 37 | get(getSwitchValue()).run(frac); 38 | } 39 | } 40 | 41 | /** 42 | * Returns the current switch value, indicating the index of the Action 43 | * that will be executed in reponse to run() invocations. 44 | * @return the switch value 45 | */ 46 | public int getSwitchValue() { 47 | return m_switchVal; 48 | } 49 | 50 | /** 51 | * Set the switch value. This is the index of the Action that will be 52 | * executed in response to run() invocations. 53 | * @param s the new switch value 54 | */ 55 | public void setSwitchValue(int s) { 56 | if ( s < 0 || s >= size() ) 57 | throw new IllegalArgumentException( 58 | "Switch value out of legal range"); 59 | m_switchVal = s; 60 | } 61 | 62 | } // end of class ActionSwitch 63 | -------------------------------------------------------------------------------- /src/prefuse/data/expression/parser/ExpressionParserConstants.java: -------------------------------------------------------------------------------- 1 | /* Generated By:JavaCC: Do not edit this line. ExpressionParserConstants.java */ 2 | package prefuse.data.expression.parser; 3 | 4 | public interface ExpressionParserConstants { 5 | 6 | int EOF = 0; 7 | int TRUE = 6; 8 | int FALSE = 7; 9 | int NULL = 8; 10 | int IF = 9; 11 | int THEN = 10; 12 | int ELSE = 11; 13 | int AND = 12; 14 | int OR = 13; 15 | int NOT = 14; 16 | int XOR = 15; 17 | int INT = 16; 18 | int DECIMAL_LITERAL = 17; 19 | int HEX_LITERAL = 18; 20 | int OCTAL_LITERAL = 19; 21 | int LONG = 20; 22 | int DOUBLE = 21; 23 | int FLOAT = 22; 24 | int EXPONENT = 23; 25 | int STRING = 24; 26 | int QUOTED = 25; 27 | int IDENTIFIER = 26; 28 | int LETTER = 27; 29 | int DIGIT = 28; 30 | int LPAREN = 29; 31 | int RPAREN = 30; 32 | int EQ = 31; 33 | int GT = 32; 34 | int LT = 33; 35 | int LE = 34; 36 | int GE = 35; 37 | int NE = 36; 38 | int ADD = 37; 39 | int SUB = 38; 40 | int MUL = 39; 41 | int DIV = 40; 42 | int POW = 41; 43 | int MOD = 42; 44 | 45 | int DEFAULT = 0; 46 | 47 | String[] tokenImage = { 48 | "", 49 | "\" \"", 50 | "\"\\t\"", 51 | "\"\\n\"", 52 | "\"\\r\"", 53 | "\"\\f\"", 54 | "", 55 | "", 56 | "", 57 | "", 58 | "", 59 | "", 60 | "", 61 | "", 62 | "", 63 | "", 64 | "", 65 | "", 66 | "", 67 | "", 68 | "", 69 | "", 70 | "", 71 | "", 72 | "", 73 | "", 74 | "", 75 | "", 76 | "", 77 | "\"(\"", 78 | "\")\"", 79 | "", 80 | "\">\"", 81 | "\"<\"", 82 | "\"<=\"", 83 | "\">=\"", 84 | "", 85 | "\"+\"", 86 | "\"-\"", 87 | "\"*\"", 88 | "\"/\"", 89 | "\"^\"", 90 | "\"%\"", 91 | "\",\"", 92 | }; 93 | 94 | } 95 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/ByteParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | /** 4 | * DataParser instance the parses int values from a text string. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public class ByteParser implements DataParser { 9 | 10 | /** 11 | * Returns int.class. 12 | * @see prefuse.data.parser.DataParser#getType() 13 | */ 14 | public Class getType() { 15 | return byte.class; 16 | } 17 | 18 | /** 19 | * @see prefuse.data.parser.DataParser#format(java.lang.Object) 20 | */ 21 | public String format(Object value) { 22 | if ( value == null ) return null; 23 | if ( !(value instanceof Number) ) 24 | throw new IllegalArgumentException( 25 | "This class can only format Objects of type Number."); 26 | return String.valueOf(((Number)value).byteValue()); 27 | } 28 | 29 | /** 30 | * @see prefuse.data.parser.DataParser#canParse(java.lang.String) 31 | */ 32 | public boolean canParse(String text) { 33 | try { 34 | Byte.parseByte(text); 35 | return true; 36 | } catch ( NumberFormatException e ) { 37 | return false; 38 | } 39 | } 40 | 41 | /** 42 | * @see prefuse.data.parser.DataParser#parse(java.lang.String) 43 | */ 44 | public Object parse(String text) throws DataParseException { 45 | return new Byte(parseByte(text)); 46 | } 47 | 48 | /** 49 | * Parse an int value from a text string. 50 | * @param text the text string to parse 51 | * @return the parsed int value 52 | * @throws DataParseException if an error occurs during parsing 53 | */ 54 | public static byte parseByte(String text) throws DataParseException { 55 | try { 56 | return Byte.parseByte(text); 57 | } catch ( NumberFormatException e ) { 58 | throw new DataParseException(e); 59 | } 60 | } 61 | 62 | } // end of class IntParser 63 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/IntParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | /** 4 | * DataParser instance the parses int values from a text string. 5 | * 6 | * @author jeffrey heer 7 | */ 8 | public class IntParser implements DataParser { 9 | 10 | /** 11 | * Returns int.class. 12 | * @see prefuse.data.parser.DataParser#getType() 13 | */ 14 | public Class getType() { 15 | return int.class; 16 | } 17 | 18 | /** 19 | * @see prefuse.data.parser.DataParser#format(java.lang.Object) 20 | */ 21 | public String format(Object value) { 22 | if ( value == null ) return null; 23 | if ( !(value instanceof Number) ) 24 | throw new IllegalArgumentException( 25 | "This class can only format Objects of type Number."); 26 | return String.valueOf(((Number)value).intValue()); 27 | } 28 | 29 | /** 30 | * @see prefuse.data.parser.DataParser#canParse(java.lang.String) 31 | */ 32 | public boolean canParse(String text) { 33 | try { 34 | Integer.parseInt(text); 35 | return true; 36 | } catch ( NumberFormatException e ) { 37 | return false; 38 | } 39 | } 40 | 41 | /** 42 | * @see prefuse.data.parser.DataParser#parse(java.lang.String) 43 | */ 44 | public Object parse(String text) throws DataParseException { 45 | return new Integer(parseInt(text)); 46 | } 47 | 48 | /** 49 | * Parse an int value from a text string. 50 | * @param text the text string to parse 51 | * @return the parsed int value 52 | * @throws DataParseException if an error occurs during parsing 53 | */ 54 | public static int parseInt(String text) throws DataParseException { 55 | try { 56 | return Integer.parseInt(text); 57 | } catch ( NumberFormatException e ) { 58 | throw new DataParseException(e); 59 | } 60 | } 61 | 62 | } // end of class IntParser 63 | -------------------------------------------------------------------------------- /src/prefuse/data/io/AbstractTableReader.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.io; 2 | 3 | import java.io.File; 4 | import java.io.FileInputStream; 5 | import java.io.FileNotFoundException; 6 | import java.io.IOException; 7 | import java.io.InputStream; 8 | import java.net.URL; 9 | 10 | import prefuse.data.Table; 11 | import prefuse.util.io.IOLib; 12 | 13 | 14 | /** 15 | * Abstract base class implementation of the TableReader interface. Provides 16 | * implementations for all but the 17 | * {@link prefuse.data.io.TableReader#readTable(InputStream)} method. 18 | * 19 | * @author jeffrey heer 20 | */ 21 | public abstract class AbstractTableReader implements TableReader { 22 | 23 | /** 24 | * @see prefuse.data.io.TableReader#readTable(java.lang.String) 25 | */ 26 | public Table readTable(String location) throws DataIOException 27 | { 28 | try { 29 | InputStream is = IOLib.streamFromString(location); 30 | if ( is == null ) 31 | throw new DataIOException("Couldn't find " + location 32 | + ". Not a valid file, URL, or resource locator."); 33 | return readTable(is); 34 | } catch ( IOException e ) { 35 | throw new DataIOException(e); 36 | } 37 | } 38 | 39 | /** 40 | * @see prefuse.data.io.TableReader#readTable(java.net.URL) 41 | */ 42 | public Table readTable(URL url) throws DataIOException { 43 | try { 44 | return readTable(url.openStream()); 45 | } catch ( IOException e ) { 46 | throw new DataIOException(e); 47 | } 48 | } 49 | 50 | /** 51 | * @see prefuse.data.io.TableReader#readTable(java.io.File) 52 | */ 53 | public Table readTable(File f) throws DataIOException { 54 | try { 55 | return readTable(new FileInputStream(f)); 56 | } catch ( FileNotFoundException e ) { 57 | throw new DataIOException(e); 58 | } 59 | } 60 | 61 | } // end of abstract class AbstractTableReader 62 | -------------------------------------------------------------------------------- /src/prefuse/visual/expression/InGroupPredicate.java: -------------------------------------------------------------------------------- 1 | package prefuse.visual.expression; 2 | 3 | import prefuse.data.Schema; 4 | import prefuse.data.Tuple; 5 | import prefuse.data.expression.Predicate; 6 | import prefuse.visual.VisualItem; 7 | 8 | /** 9 | * Expression that indicates if an item is currently a member of a particular 10 | * data group. The data group name is provided by a String-valued 11 | * sub-expression. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class InGroupPredicate extends GroupExpression implements Predicate { 16 | 17 | /** 18 | * Create a new InGroupPredicate. 19 | */ 20 | public InGroupPredicate() { 21 | } 22 | 23 | /** 24 | * Create a new InGroupPredicate. 25 | * @param group @param group the data group name to use as a parameter 26 | */ 27 | public InGroupPredicate(String group) { 28 | super(group); 29 | } 30 | 31 | /** 32 | * @see prefuse.data.expression.Expression#get(prefuse.data.Tuple) 33 | */ 34 | public Object get(Tuple t) { 35 | return getBoolean(t) ? Boolean.TRUE : Boolean.FALSE; 36 | } 37 | 38 | /** 39 | * @see prefuse.data.expression.Expression#getBoolean(prefuse.data.Tuple) 40 | */ 41 | public boolean getBoolean(Tuple t) { 42 | if ( !(t instanceof VisualItem) ) 43 | return false; 44 | 45 | String group = getGroup(t); 46 | if ( group == null ) { 47 | return false; 48 | } 49 | VisualItem item = (VisualItem)t; 50 | return item.getVisualization().isInGroup(item, group); 51 | } 52 | 53 | /** 54 | * @see prefuse.data.expression.Function#getName() 55 | */ 56 | public String getName() { 57 | return "INGROUP"; 58 | } 59 | 60 | /** 61 | * @see prefuse.data.expression.Expression#getType(prefuse.data.Schema) 62 | */ 63 | public Class getType(Schema s) { 64 | return boolean.class; 65 | } 66 | 67 | } // end of class InGroupPredicate 68 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/CompositeIterator.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.util.Iterator; 4 | import java.util.NoSuchElementException; 5 | 6 | /** 7 | * Iterator implementation that combines the results of multiple iterators. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class CompositeIterator implements Iterator { 12 | 13 | private Iterator[] m_iters; 14 | private int m_cur; 15 | 16 | public CompositeIterator(int size) { 17 | m_iters = new Iterator[size]; 18 | } 19 | 20 | public CompositeIterator(Iterator iter1, Iterator iter2) { 21 | this(new Iterator[] {iter1, iter2}); 22 | } 23 | 24 | public CompositeIterator(Iterator[] iters) { 25 | m_iters = iters; 26 | m_cur = 0; 27 | } 28 | 29 | public void setIterator(int idx, Iterator iter) { 30 | m_iters[idx] = iter; 31 | } 32 | 33 | /** 34 | * Not supported. 35 | * @see java.util.Iterator#remove() 36 | */ 37 | public void remove() { 38 | throw new UnsupportedOperationException(); 39 | } 40 | 41 | /** 42 | * @see java.util.Iterator#next() 43 | */ 44 | public Object next() { 45 | if ( hasNext() ) { 46 | return m_iters[m_cur].next(); 47 | } else { 48 | throw new NoSuchElementException(); 49 | } 50 | } 51 | 52 | /** 53 | * @see java.util.Iterator#hasNext() 54 | */ 55 | public boolean hasNext() { 56 | if ( m_iters == null ) 57 | return false; 58 | 59 | while ( true ) { 60 | if ( m_cur >= m_iters.length ) { 61 | m_iters = null; 62 | return false; 63 | } if ( m_iters[m_cur] == null ) { 64 | ++m_cur; 65 | } else if ( m_iters[m_cur].hasNext() ) { 66 | return true; 67 | } else { 68 | ++m_cur; 69 | } 70 | } 71 | } 72 | 73 | } // end of class CompositeIterator 74 | -------------------------------------------------------------------------------- /src/prefuse/data/tuple/TableEdge.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.tuple; 2 | 3 | import prefuse.data.Edge; 4 | import prefuse.data.Graph; 5 | import prefuse.data.Node; 6 | import prefuse.data.Table; 7 | 8 | /** 9 | * Edge implementation that reads Edge data from a backing edge table. 10 | * 11 | * @author jeffrey heer 12 | */ 13 | public class TableEdge extends TableTuple implements Edge { 14 | 15 | /** 16 | * The backing graph. 17 | */ 18 | protected Graph m_graph; 19 | 20 | /** 21 | * Initialize a new Edge backed by an edge table. This method is used by 22 | * the appropriate TupleManager instance, and should not be called 23 | * directly by client code, unless by a client-supplied custom 24 | * TupleManager. 25 | * @param table the edge Table 26 | * @param graph the backing Graph 27 | * @param row the row in the edge table to which this Node instance 28 | * corresponds. 29 | */ 30 | protected void init(Table table, Graph graph, int row) { 31 | m_table = table; 32 | m_graph = graph; 33 | m_row = m_table.isValidRow(row) ? row : -1; 34 | } 35 | 36 | /** 37 | * @see prefuse.data.Edge#getGraph() 38 | */ 39 | public Graph getGraph() { 40 | return m_graph; 41 | } 42 | 43 | /** 44 | * @see prefuse.data.Edge#isDirected() 45 | */ 46 | public boolean isDirected() { 47 | return m_graph.isDirected(); 48 | } 49 | 50 | /** 51 | * @see prefuse.data.Edge#getSourceNode() 52 | */ 53 | public Node getSourceNode() { 54 | return m_graph.getSourceNode(this); 55 | } 56 | 57 | /** 58 | * @see prefuse.data.Edge#getTargetNode() 59 | */ 60 | public Node getTargetNode() { 61 | return m_graph.getTargetNode(this); 62 | } 63 | 64 | /** 65 | * @see prefuse.data.Edge#getAdjacentNode(prefuse.data.Node) 66 | */ 67 | public Node getAdjacentNode(Node n) { 68 | return m_graph.getAdjacentNode(this, n); 69 | } 70 | 71 | } // end of class TableEdge 72 | -------------------------------------------------------------------------------- /src/prefuse/util/collections/ByteArrayList.java: -------------------------------------------------------------------------------- 1 | package prefuse.util.collections; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.io.InputStream; 5 | 6 | /** 7 | * A resizable array that maintains a list of byte values. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class ByteArrayList { 12 | 13 | private byte[] m_bytes; 14 | private int m_size; 15 | 16 | public ByteArrayList() { 17 | this(4096); 18 | } 19 | 20 | public ByteArrayList(int capacity) { 21 | m_bytes = new byte[capacity]; 22 | m_size = 0; 23 | } 24 | 25 | private void rangeCheck(int i) { 26 | if ( i < 0 || i >= m_size ) 27 | throw new IndexOutOfBoundsException( 28 | "Index: "+i+" Size: " + m_size); 29 | } 30 | 31 | private void ensureCapacity(int cap) { 32 | if ( m_bytes.length < cap ) { 33 | int capacity = Math.max((3*m_bytes.length)/2 + 1, cap); 34 | byte[] nbytes = new byte[capacity]; 35 | System.arraycopy(m_bytes, 0, nbytes, 0, m_size); 36 | m_bytes = nbytes; 37 | } 38 | } 39 | 40 | public byte get(int i) { 41 | rangeCheck(i); 42 | return m_bytes[i]; 43 | } 44 | 45 | public void set(int i, byte b) { 46 | rangeCheck(i); 47 | m_bytes[i] = b; 48 | } 49 | 50 | public int size() { 51 | return m_size; 52 | } 53 | 54 | public void add(byte b) { 55 | ensureCapacity(m_size+1); 56 | m_bytes[m_size++] = b; 57 | } 58 | 59 | public void add(byte[] b, int start, int len) { 60 | ensureCapacity(m_size+len); 61 | System.arraycopy(b,start,m_bytes,m_size,len); 62 | m_size += len; 63 | } 64 | 65 | public InputStream getAsInputStream() { 66 | return new ByteArrayInputStream(m_bytes,0,m_size); 67 | } 68 | 69 | public byte[] toArray() { 70 | byte[] b = new byte[m_size]; 71 | System.arraycopy(m_bytes,0,b,0,m_size); 72 | return b; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/prefuse/data/util/UniqueRowIterator.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.util; 2 | 3 | import java.util.BitSet; 4 | import java.util.NoSuchElementException; 5 | 6 | import prefuse.util.collections.IntIterator; 7 | 8 | /** 9 | * IntIterator over rows that ensures that no duplicates appear in the 10 | * iteration. Uses a bitset to note rows it has has seen and not pass along 11 | * duplicate row values. 12 | * 13 | * @author jeffrey heer 14 | */ 15 | public class UniqueRowIterator extends IntIterator { 16 | 17 | private IntIterator m_iter; 18 | private int m_next; 19 | private BitSet m_visited; 20 | 21 | /** 22 | * Create a new UniqueRowIterator. 23 | * @param iter a source iterator over table rows 24 | */ 25 | public UniqueRowIterator(IntIterator iter) { 26 | m_iter = iter; 27 | m_visited = new BitSet(); 28 | advance(); 29 | } 30 | 31 | private void advance() { 32 | int r = -1; 33 | while ( r == -1 && m_iter.hasNext() ) { 34 | r = m_iter.nextInt(); 35 | if ( visit(r) ) 36 | r = -1; 37 | } 38 | m_next = r; 39 | } 40 | 41 | private boolean visit(int row) { 42 | if ( m_visited.get(row) ) { 43 | return true; 44 | } else { 45 | m_visited.set(row); 46 | return false; 47 | } 48 | } 49 | 50 | /** 51 | * @see java.util.Iterator#hasNext() 52 | */ 53 | public boolean hasNext() { 54 | return m_next != -1; 55 | } 56 | 57 | /** 58 | * @see prefuse.util.collections.LiteralIterator#nextInt() 59 | */ 60 | public int nextInt() { 61 | if ( m_next == -1 ) 62 | throw new NoSuchElementException(); 63 | int retval = m_next; 64 | advance(); 65 | return retval; 66 | } 67 | 68 | /** 69 | * Not supported. 70 | * @see java.util.Iterator#remove() 71 | */ 72 | public void remove() { 73 | throw new UnsupportedOperationException(); 74 | } 75 | 76 | } // end of class UniqueRowIterator 77 | -------------------------------------------------------------------------------- /data/amazon.txt: -------------------------------------------------------------------------------- 1 | id 2 | 0060929871 3 | 0060936649 4 | 0060938455 5 | 0142001449 6 | 0156006391 7 | 0312282990 8 | 0345368754 9 | 0374528497 10 | 0380789019 11 | 0380789035 12 | 0380977427 13 | 038097827X 14 | 0385333471 15 | 038533348X 16 | 0393320278 17 | 0399143904 18 | 0399149864 19 | 0425164152 20 | 0425164527 21 | 0425165000 22 | 043935806X 23 | 0440414806 24 | 0441003257 25 | 0441172717 26 | 044661162X 27 | 0451524934 28 | 0451526341 29 | 0553380958 30 | 0684833395 31 | 0742525252 32 | 0743249992 33 | 076530953X 34 | 0767908163 35 | 0780020685 36 | 0780021045 37 | 0780022491 38 | 0780022513 39 | 0785100490 40 | 0785108416 41 | 0785111174 42 | 0786884517 43 | 0790729628 44 | 0790731029 45 | 0790749815 46 | 0792844890 47 | 0871137380 48 | 0887347215 49 | 0930289552 50 | 0961392126 51 | 0961392142 52 | 0972179445 53 | 1400030927 54 | 1400033543 55 | 1401201172 56 | 1401201199 57 | 156097009X 58 | 1560971460 59 | 1563890828 60 | 1563892464 61 | 1563893304 62 | 1563896451 63 | 1563896486 64 | 1563896575 65 | 1563896613 66 | 1563896648 67 | 1563897113 68 | 1563897563 69 | 1563898551 70 | 1563898586 71 | 1563899426 72 | 1563899485 73 | 1563899809 74 | 1563899965 75 | 156931778X 76 | 156971259X 77 | 1569712921 78 | 157362408X 79 | 1582401837 80 | 1582402329 81 | 1582403090 82 | 1582403317 83 | 192999835X 84 | 1929998406 85 | 192999849X 86 | 1929998589 87 | 193065247X 88 | 6304765231 89 | 6305028699 90 | 6305168857 91 | 6305729328 92 | 6305736650 93 | B00000JS62 94 | B00000K0DT 95 | B00000K19E 96 | B000021Y77 97 | B00003CX5P 98 | B00003CXC5 99 | B00003CXC6 100 | B00003CXE7 101 | B00003CXR4 102 | B00003CY5D 103 | B00005221I 104 | B00005ASUM 105 | B00005AX6F 106 | B00005B1ZL 107 | B00005JKCH 108 | B00005JKDR 109 | B00005JKFA 110 | B00005JLF1 111 | B00005JM02 112 | B00005JM2Y 113 | B00005LINC 114 | B00005MAM2 115 | B00005O3V9 116 | B00005V0XF 117 | B00005YU1M 118 | B000063IOT 119 | B000065U1N 120 | B000066C6Z 121 | B000067DNF 122 | B000068OCS 123 | B000068OCT 124 | B00006HBUJ 125 | B00006RCNX 126 | B00008K2XP 127 | B00008RH1H 128 | B00009TB5G 129 | B0000A14WF 130 | B0000AXE8I 131 | -------------------------------------------------------------------------------- /src/prefuse/data/parser/ColorIntParser.java: -------------------------------------------------------------------------------- 1 | package prefuse.data.parser; 2 | 3 | import prefuse.util.ColorLib; 4 | 5 | /** 6 | * DataParser instance the parses int color values from a 7 | * hexadecimal text string. 8 | * 9 | * @author jeffrey heer 10 | */ 11 | public class ColorIntParser implements DataParser { 12 | 13 | /** 14 | * Returns int.class. 15 | * @see prefuse.data.parser.DataParser#getType() 16 | */ 17 | public Class getType() { 18 | return int.class; 19 | } 20 | 21 | /** 22 | * @see prefuse.data.parser.DataParser#format(java.lang.Object) 23 | */ 24 | public String format(Object value) { 25 | if ( value == null ) return null; 26 | if ( !(value instanceof Number) ) 27 | throw new IllegalArgumentException( 28 | "This class can only format Objects of type Number."); 29 | return String.valueOf(((Number)value).intValue()); 30 | } 31 | 32 | /** 33 | * @see prefuse.data.parser.DataParser#canParse(java.lang.String) 34 | */ 35 | public boolean canParse(String text) { 36 | try { 37 | if ( text.charAt(0) == ColorLib.HEX_PREFIX ) { 38 | parseInt(text); 39 | } else { 40 | return false; 41 | } 42 | return true; 43 | } catch ( Exception e ) { 44 | return false; 45 | } 46 | } 47 | 48 | /** 49 | * @see prefuse.data.parser.DataParser#parse(java.lang.String) 50 | */ 51 | public Object parse(String text) throws DataParseException { 52 | return new Integer(parseInt(text)); 53 | } 54 | 55 | /** 56 | * Parse an int value from a text string. 57 | * @param text the text string to parse 58 | * @return the parsed int value 59 | * @throws DataParseException if an error occurs during parsing 60 | */ 61 | public static int parseInt(String text) throws DataParseException { 62 | try { 63 | return ColorLib.hex(text); 64 | } catch ( Exception e ) { 65 | throw new DataParseException(e); 66 | } 67 | } 68 | 69 | } // end of class IntParser 70 | --------------------------------------------------------------------------------