Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gs-gama
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
graphstream
gs-gama
Commits
5a5fafd3
Commit
5a5fafd3
authored
Feb 06, 2014
by
Thibaut Démare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a java program which listen event and build the corresponding graph
parent
5a042684
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
0 deletions
+43
-0
src-java-test/org/graphstream/gama/tests/SimpleNetStreamViewer.java
...est/org/graphstream/gama/tests/SimpleNetStreamViewer.java
+22
-0
src-java-test/org/graphstream/gama/tests/Tests.java
src-java-test/org/graphstream/gama/tests/Tests.java
+21
-0
No files found.
src-java-test/org/graphstream/gama/tests/SimpleNetStreamViewer.java
0 → 100644
View file @
5a5fafd3
package
org.graphstream.gama.tests
;
import
org.graphstream.stream.netstream.NetStreamReceiver
;
import
org.graphstream.ui.swingViewer.Viewer
;
public
class
SimpleNetStreamViewer
extends
Viewer
{
public
SimpleNetStreamViewer
(
NetStreamReceiver
receiver
)
{
this
(
receiver
,
true
);
}
public
SimpleNetStreamViewer
(
NetStreamReceiver
receiver
,
boolean
autoLayout
)
{
super
(
receiver
.
getDefaultStream
());
addDefaultView
(
true
);
if
(
autoLayout
)
enableAutoLayout
();
}
public
SimpleNetStreamViewer
(
NetStreamReceiver
receiver
,
boolean
autoLayout
,
int
width
,
int
height
)
{
this
(
receiver
,
autoLayout
);
getDefaultView
().
resizeFrame
(
width
,
height
);
}
}
\ No newline at end of file
src-java-test/org/graphstream/gama/tests/Tests.java
0 → 100644
View file @
5a5fafd3
package
org.graphstream.gama.tests
;
import
java.io.IOException
;
import
java.net.UnknownHostException
;
import
org.graphstream.stream.netstream.NetStreamReceiver
;
public
class
Tests
{
public
static
void
main
(
String
[]
args
)
throws
UnknownHostException
,
IOException
{
// System.setProperty("gs.ui.renderer", "org.graphstream.ui.j2dviewer.J2DGraphRenderer");
// test graph viewer
new
SimpleNetStreamViewer
(
new
NetStreamReceiver
(
2000
),
true
,
500
,
500
);
// test graph viewer
new
SimpleNetStreamViewer
(
new
NetStreamReceiver
(
2001
),
true
,
500
,
500
);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment