Giter Site home page Giter Site logo

andrograph's Introduction

andrograph

Display and edit JGraphT graphs on android

Installation

As dependency

  1. Save AAR as ${project}/app/libs/andrograph.aar
  2. project/build.gradle (excerpt):
allprojects {
	repositories {
		//your repos here
		flatDir{
            dirs 'libs'
        }
    }
}
  1. project/app/build.gradle (excerpt):
dependencies {
	//your dependencies here
	compile 'org.jgrapht:jgrapht-core:0.9.2'
    compile(name:'andrograph', ext:'aar')
}

As module

  1. Head to "Releases" and grab latest AAR
  2. Add to Android Studio as "New Module -> Import .JAR/.AAR"
  3. Edit your apps build.gradle to add compile project(':andrograph-release') as dependency

Usage

  • Have a JGraphT graph
  • Add a GraphView to an Activity
  • Build a GraphViewController
  • Attach GraphViewController to GraphView
  • Enjoy editing

Select edges

DefaultGraphViewController can be equipped with an EdgeEvent instance. This will be called before edges are updated, i.e. before adding and removing edges. By consuming the event (return true), no further actions will be done. By not consuming the event (return false), the default action will be performed.

This can be used e.g. to catch selection of edges, store it somehow, and paint it differently (via reference to an EdgePaintProvider)

Architecture

Interfaces

diagram

Defaults

diagram2

Credits

andrograph's People

Contributors

agp8x avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

captblacktea

andrograph's Issues

Build fails after import

AGPBI: {"kind":"error","text":"Attribute "color" has already been defined","sources":[{"file":"/app/build/intermediates/res/merged/debug/values/values.xml","position":{"startLine":346}}],"original":"","tool":"AAPT"}
/app/build/intermediates/res/merged/debug/values/values.xml:347: error: Attribute "color" has already been defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.